修改维护数据
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.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate)
.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.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!))
.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 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;
@ -185,15 +192,15 @@ namespace IRaCIS.Core.Application.Service
await _identityUserRepository.SaveChangesAsync();
}
// UPDATE[User]
//SET
// UserName = IdentityUser.UserName,
// FirstName = IdentityUser.FirstName,
//LastName = IdentityUser.LastName,
// EMail = IdentityUser.EMail
//FROM[User]
//INNER JOIN IdentityUser
//ON[User].IdentityUserId = IdentityUser.Id
// UPDATE[User]
//SET
// UserName = IdentityUser.UserName,
// FirstName = IdentityUser.FirstName,
//LastName = IdentityUser.LastName,
// EMail = IdentityUser.EMail
//FROM[User]
//INNER JOIN IdentityUser
//ON[User].IdentityUserId = IdentityUser.Id
@ -365,7 +372,7 @@ namespace IRaCIS.Core.Application.Service
ConfirmTime = confirm.ConfirmTime,
RealName = confirm.ConfirmUser.FullName,
UserName = confirm.ConfirmUser.UserName,
FullFilePath = sysDoc.Path
};

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 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)
{
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,
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)