修改维护数据
continuous-integration/drone/push Build is passing Details

Temp_Event_IRC_Met8
hang 2025-01-13 16:55:04 +08:00
parent 3f2315c96d
commit 538cfa279a
3 changed files with 35 additions and 23 deletions

View File

@ -173,7 +173,14 @@ namespace IRaCIS.Core.Application.Service
var identityUserId = NewId.NextSequentialGuid();
var identityUser = _mapper.Map<IdentityUser>(item.FirstOrDefault());
var selectUser = item.OrderByDescending(t => t.Status).FirstOrDefault();
var identityUser = _mapper.Map<IdentityUser>(selectUser);
if (identityUser.IsFirstAdd)
{
identityUser.UserName = "";
}
identityUser.Id = identityUserId;

View File

@ -1729,17 +1729,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
});
}
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(UserRole)))
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(IdentityUser)))
{
var type = GetEntityAuditOpt(item);
var entity = item.Entity as UserRole;
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
await InsertInspection<UserRole>(entity, type, x => new InspectionConvertDTO
var entity = item.Entity as IdentityUser;
if (!_userInfo.IsNotNeedInspection)
{
await InsertInspection<IdentityUser>(entity, type, x => new InspectionConvertDTO
{
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
});
}
}
// 项目参与人员
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialIdentityUser)))
@ -1764,7 +1767,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ObjectRelationParentId = x.TrialId,
ExtraIndentification = extraIndentification,
//ObjectRelationParentId2 = x.IdentityUserId,
},new {
}, new
{
identityUser.FullName,
identityUser.EMail,
@ -1797,8 +1801,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ObjectRelationParentId = x.TrialId,
ExtraIndentification = extraIndentification,
ObjectRelationParentId2 = x.UserId,
}, new {
UserTypeEnum= userTypeEnum,
}, new
{
UserTypeEnum = userTypeEnum,
});
}
@ -3061,7 +3066,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as ReadingTaskQuestionMark;
var answer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer)
.Where(x => x.RowId == entity.RowId&&x.TableQuestionId== entity.TableQuestionId).Select(x => x.Answer).FirstOrDefault();
.Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).Select(x => x.Answer).FirstOrDefault();
var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync();
@ -3402,7 +3407,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
};
var extraIdentification = string.Empty;
var isDistinctionInterface = true ;
var isDistinctionInterface = true;
#region 标识区分
if (type == AuditOpt.Add)