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

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

View File

@ -928,7 +928,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType) .WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
.WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate) .WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate)
.WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate) .WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate)
.WhereIf(inQuery.IsLoginUncommonly != null, t => t.IsLoginUncommonly == inQuery.IsLoginUncommonly) .WhereIf(inQuery.IsLoginUncommonly != null, t => t.IsLoginUncommonly == inQuery.IsLoginUncommonly)
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!)) .WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!)) .WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!)) .WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!))

View File

@ -173,7 +173,14 @@ namespace IRaCIS.Core.Application.Service
var identityUserId = NewId.NextSequentialGuid(); 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; identityUser.Id = identityUserId;
@ -185,15 +192,15 @@ namespace IRaCIS.Core.Application.Service
await _identityUserRepository.SaveChangesAsync(); await _identityUserRepository.SaveChangesAsync();
} }
// UPDATE[User] // UPDATE[User]
//SET //SET
// UserName = IdentityUser.UserName, // UserName = IdentityUser.UserName,
// FirstName = IdentityUser.FirstName, // FirstName = IdentityUser.FirstName,
//LastName = IdentityUser.LastName, //LastName = IdentityUser.LastName,
// EMail = IdentityUser.EMail // EMail = IdentityUser.EMail
//FROM[User] //FROM[User]
//INNER JOIN IdentityUser //INNER JOIN IdentityUser
//ON[User].IdentityUserId = IdentityUser.Id //ON[User].IdentityUserId = IdentityUser.Id

View File

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