用户角色重命名初步修改
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-12-25 09:31:36 +08:00
parent 76649f264b
commit 32c6d745b6
92 changed files with 749 additions and 776 deletions
@@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
{
subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
}
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
if (subjectVisit!.CurrentActionUserId != _userInfo.UserRoleId)
{
//---您不是该质控任务当前领取人,没有操作权限!
throw new BusinessValidationFailedException(_localizer["QCCommon_NoPermission"]);
@@ -52,7 +52,7 @@ namespace IRaCIS.Core.Application.Image.QA
.WhereIf(inQuery.SubmitState != null, t => t.SubmitState == inQuery.SubmitState)
.WhereIf(inQuery.ChallengeState != null, t => t.ChallengeState == inQuery.ChallengeState)
.WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
.ProjectTo<QCCRCVisitViewModel>(_mapper.ConfigurationProvider);
@@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Image.QA
.WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime)
.WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime)
.WhereIf(inQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == inQuery.IsUrgent)
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
.ProjectTo<QCCRCChallengeViewModel>(_mapper.ConfigurationProvider);
var pageList = await query.ToPagedListAsync(inQuery, new string[] { nameof(QCCRCChallengeViewModel.IsUrgent) + " desc", nameof(QCCRCChallengeViewModel.CreateTime) });
@@ -209,7 +209,7 @@ namespace IRaCIS.Core.Application.Image.QA
var result = await GetQCVisitList(new QCVisitSearchDTO()
{
TrialId = inDto.TrialId,
CurrentActionUserId = _userInfo.Id,
CurrentActionUserId = _userInfo.UserRoleId,
VisitId = inDto.VisitId,
PageIndex = 1,
PageSize = 1,
@@ -291,7 +291,7 @@ namespace IRaCIS.Core.Application.Image.QA
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression)
//.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))//CRC 过滤负责的site
.ProjectTo<QCCheckWithModalityView>(_mapper.ConfigurationProvider);
var pageList = await query.ToPagedListAsync(inQuery);
@@ -313,7 +313,7 @@ namespace IRaCIS.Core.Application.Image.QA
var sv = (await _subjectVisitRepository.Where(t => t.Id == subjectVisitId)
.ProjectTo<CheckDialogDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
sv.DialogList.ForEach(t => t.IsCurrentUser = _userInfo.Id == t.CreateUserId);
sv.DialogList.ForEach(t => t.IsCurrentUser = _userInfo.UserRoleId == t.CreateUserId);
return sv;
}
@@ -544,7 +544,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
var list = await _qcChallengeRepository.Where(t => t.Id == qaChallengeId)
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.Id }).ToListAsync();
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId }).ToListAsync();
//利用automapper 运行时映射
//list.ForEach(t => t.IsCurrentUser = _userInfo.Id == t.CreateUserId);
@@ -566,7 +566,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
var qaChallengeQuery = _qcChallengeRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.QCProcessEnum == trialQCProcess)
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.Id });
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId });
var list = await qaChallengeQuery.ToListAsync();
@@ -224,7 +224,7 @@ namespace IRaCIS.Core.Application.Image.QA
dbQCChallenge.LatestMsgTime = DateTime.Now;
dbQCChallenge.LatestReplyUserId = _userInfo.Id;
dbQCChallenge.LatestReplyUserId = _userInfo.UserRoleId;
var success = await _qCChallengeDialogrepository.SaveChangesAsync();
@@ -345,7 +345,7 @@ namespace IRaCIS.Core.Application.Image.QA
ResponseOutput.NotOk(_localizer["QCOperation_PassAfterClose"]);
}
sv.CheckUserId = _userInfo.Id;
sv.CheckUserId = _userInfo.UserRoleId;
sv.CheckState = CheckStateEnum.CVPassed;
sv.ReadingStatus = ReadingStatusEnum.TaskAllocate;
@@ -835,7 +835,7 @@ namespace IRaCIS.Core.Application.Image.QA
subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId)).IfNullThrowException();
}
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
if (subjectVisit!.CurrentActionUserId != _userInfo.UserRoleId)
{
//---您不是该质控任务当前领取人,没有操作权限!
throw new BusinessValidationFailedException(_localizer["QCOperation_NoRecipient"]);
@@ -863,7 +863,7 @@ namespace IRaCIS.Core.Application.Image.QA
dbSubjectVisit.IsTake = true;
dbSubjectVisit.CurrentActionUserId = _userInfo.Id;
dbSubjectVisit.CurrentActionUserId = _userInfo.UserRoleId;
dbSubjectVisit.CurrentActionUserExpireTime = DateTime.Now.AddHours(1);
@@ -919,8 +919,8 @@ namespace IRaCIS.Core.Application.Image.QA
break;
case TrialQCProcess.SingleAudit:
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted
&& x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.Id && (x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake)))
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id)
&& x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.UserRoleId && (x.CurrentActionUserId == _userInfo.UserRoleId || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake)))
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
.Include(x => x.Subject).ToListAsync();
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId)
@@ -953,9 +953,9 @@ namespace IRaCIS.Core.Application.Image.QA
case TrialQCProcess.DoubleAudit:
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId &&
((x.CurrentActionUserId == _userInfo.Id) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.Id)))
((x.CurrentActionUserId == _userInfo.UserRoleId) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.UserRoleId)))
)
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id)
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
.Include(x => x.Subject).ToListAsync();
if (subjectVisit != null)
{
@@ -1046,7 +1046,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
else if (trialConfig.QCProcessEnum == TrialQCProcess.SingleAudit)
{
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.Id)
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.UserRoleId)
{
//---初审已通过,不能继续领取
return ResponseOutput.NotOk(_localizer["QCOperation_InitialAuditPassed"]);
@@ -1068,7 +1068,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit)
{
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.Id)
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.UserRoleId)
{
//---复审不能和初审是同一个人
return ResponseOutput.NotOk(_localizer["QCOperation_NoSameReviewer"]);
@@ -1099,7 +1099,7 @@ namespace IRaCIS.Core.Application.Image.QA
dbSubjectVisit.IsTake = true;
dbSubjectVisit.CurrentActionUserId = _userInfo.Id;
dbSubjectVisit.CurrentActionUserId = _userInfo.UserRoleId;
dbSubjectVisit.CurrentActionUserExpireTime = DateTime.Now.AddHours(1);
@@ -1109,7 +1109,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
else
{
if (dbSubjectVisit!.CurrentActionUserId != _userInfo.Id)
if (dbSubjectVisit!.CurrentActionUserId != _userInfo.UserRoleId)
{
//---您不是该质控任务当前领取人,没有操作权限!
return ResponseOutput.NotOk(_localizer["QCOperation_NoRecipient"], ApiResponseCodeEnum.NeedTips);
@@ -1414,7 +1414,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
dbSubjectVisit.SubmitState = SubmitStateEnum.Submitted;
dbSubjectVisit.SubmitTime = DateTime.Now;
dbSubjectVisit.SubmitUserId = _userInfo.Id;
dbSubjectVisit.SubmitUserId = _userInfo.UserRoleId;
//维护统一状态
dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ImageQuality;
@@ -1513,7 +1513,7 @@ namespace IRaCIS.Core.Application.Image.QA
public async Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState)
{
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.Id))
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.UserRoleId))
{
//---您已经被移出项目,没有操作权限。
return ResponseOutput.NotOk(_localizer["QCOperation_RemoveItem"]);
@@ -1574,7 +1574,7 @@ namespace IRaCIS.Core.Application.Image.QA
dbSubjectVisit.AuditState = AuditStateEnum.QCPassed;
dbSubjectVisit.CheckState = trialConfig.IsImageConsistencyVerification ? CheckStateEnum.ToCheck : CheckStateEnum.CVPassed;
dbSubjectVisit.ForwardState = trialConfig.IsImageConsistencyVerification ? ForwardStateEnum.None : ForwardStateEnum.ToForward;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
dbSubjectVisit.PreliminaryAuditTime = DateTime.Now;
@@ -1618,7 +1618,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
dbSubjectVisit.AuditState = AuditStateEnum.PrimaryQCPassed;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
dbSubjectVisit.PreliminaryAuditTime = DateTime.Now;
@@ -1638,7 +1638,7 @@ namespace IRaCIS.Core.Application.Image.QA
dbSubjectVisit.ForwardState = trialConfig.IsImageConsistencyVerification ? ForwardStateEnum.None : ForwardStateEnum.ToForward;
dbSubjectVisit.ReviewAuditUserId = _userInfo.Id;
dbSubjectVisit.ReviewAuditUserId = _userInfo.UserRoleId;
dbSubjectVisit.ReviewAuditTime = DateTime.Now;
@@ -1682,7 +1682,7 @@ namespace IRaCIS.Core.Application.Image.QA
if (dbSubjectVisit.AuditState == AuditStateEnum.InPrimaryQC)
{
dbSubjectVisit.AuditState = AuditStateEnum.QCFailed;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
}
else
@@ -1697,12 +1697,12 @@ namespace IRaCIS.Core.Application.Image.QA
if (dbSubjectVisit.AuditState == AuditStateEnum.InPrimaryQC)
{
dbSubjectVisit.AuditState = AuditStateEnum.QCFailed;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
}
else if (dbSubjectVisit.AuditState == AuditStateEnum.InSecondaryQC)
{
dbSubjectVisit.AuditState = AuditStateEnum.QCFailed;
dbSubjectVisit.ReviewAuditUserId = _userInfo.Id;
dbSubjectVisit.ReviewAuditUserId = _userInfo.UserRoleId;
}
else
{
@@ -1717,7 +1717,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
dbSubjectVisit.Auditor = _userInfo.Id;
dbSubjectVisit.Auditor = _userInfo.UserRoleId;
dbSubjectVisit.IsTake = false;
dbSubjectVisit.CurrentActionUserId = null;
dbSubjectVisit.CurrentActionUserExpireTime = null;
@@ -1818,7 +1818,7 @@ namespace IRaCIS.Core.Application.Image.QA
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.QCAgreeUpload;
qcChallenge.LatestMsgTime = DateTime.Now;
qcChallenge.LatestReplyUserId = _userInfo.Id;
qcChallenge.LatestReplyUserId = _userInfo.UserRoleId;
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = true });
@@ -1845,7 +1845,7 @@ namespace IRaCIS.Core.Application.Image.QA
sv.AuditState = AuditStateEnum.InPrimaryQC;
sv.CurrentActionUserExpireTime = DateTime.Now.AddHours(1);
sv.CurrentActionUserId = _userInfo.Id;
sv.CurrentActionUserId = _userInfo.UserRoleId;
//BackgroundJob.Schedule<IObtainTaskAutoCancelJob>(t => t.CancelQCObtaion(qcChallenge.SubjectVisitId, DateTime.Now), TimeSpan.FromHours(1));
sv.IsTake = true;
@@ -1936,13 +1936,13 @@ namespace IRaCIS.Core.Application.Image.QA
qcChallenge.ReUploadedTime = DateTime.Now;
qcChallenge.ReUploadUserId = _userInfo.Id;
qcChallenge.ReUploadUserId = _userInfo.UserRoleId;
qcChallenge.ReUploader = _userInfo.FullName;
qcChallenge.LatestMsgTime = DateTime.Now;
qcChallenge.LatestReplyUserId = _userInfo.Id;
qcChallenge.LatestReplyUserId = _userInfo.UserRoleId;
var dbSubjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == qcChallenge.SubjectVisitId).IfNullThrowException();
@@ -2013,7 +2013,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
qcChallenge.LatestMsgTime = DateTime.Now;
qcChallenge.LatestReplyUserId = _userInfo.Id;
qcChallenge.LatestReplyUserId = _userInfo.UserRoleId;
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.CRCRequestReupload;
qcChallenge.DialogList.Add(new QCChallengeDialog()
@@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<QCChallengeDialog, DialogInfo>()
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.FullName))
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
CreateMap<QCChallenge, QCChanllengeExportDto>()
@@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode))
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
.ForMember(d => d.LatestReplyUserFullName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
.ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList))
@@ -89,8 +89,8 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.RadiologyClinicalDataCount, u => u.MapFrom(s => s.ClinicalDataList.Count(t => t.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead)))
.ForMember(d => d.OncologyClinicalDataCount, u => u.MapFrom(s => s.ClinicalDataList.Count(t => t.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)))
.ForMember(d => d.ChallengeWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.SelectMany(c => c.QCChallengeList).Count(t => t.IsClosed == false && !t.DialogList.Any(t => t.CreateUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
.ForMember(d => d.CheckWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeState != CheckChanllengeTypeEnum.Closed && !t.CheckChallengeDialogList.Any(t => t.CreateUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
.ForMember(d => d.ChallengeWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.SelectMany(c => c.QCChallengeList).Count(t => t.IsClosed == false && !t.DialogList.Any(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
.ForMember(d => d.CheckWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeState != CheckChanllengeTypeEnum.Closed && !t.CheckChallengeDialogList.Any(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
;
CreateMap<Subject, SubjectProgressDto>()
@@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<CheckChallengeDialog, DialogInfo>()
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.FullName))
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
CreateMap<SubjectVisit, PMKCheckEXportDTO>()
@@ -554,8 +554,8 @@ namespace IRaCIS.Core.Application.Service
//一致性核查 质疑对话
CreateMap<CheckChallengeDialog, CheckChanllengeDialogDTO>()
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName));
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.UserName))
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.FullName));
CreateMap<SubjectVisit, CheckDialogDTO>()
.ForMember(d => d.SubjectVisitCheck, u => u.MapFrom(t => t))
@@ -586,13 +586,13 @@ namespace IRaCIS.Core.Application.Service
// 临床数据上传 路径拼接返回
CreateMap<PreviousHistory, PreviousHistoryView>()
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.FullName))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
CreateMap<PreviousOther, PreviousOtherView>()
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.FullName))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
CreateMap<PreviousSurgery, PreviousSurgeryView>()
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.FullName))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
@@ -602,14 +602,14 @@ namespace IRaCIS.Core.Application.Service
//QC 质疑对话
var currentUserId = Guid.Empty;
CreateMap<QCChallengeDialog, QCChanllengeDialogDTO>()
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.UserName))
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.FullName))
.ForMember(d => d.IsCurrentUser, u => u.MapFrom(s => s.CreateUserId == currentUserId));
//质疑编号
CreateMap<QCChallenge, QCChallengeWithUser>()
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName))
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
@@ -624,7 +624,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<QCChallenge, ChallengeAndDialog>()
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName))
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
@@ -641,7 +641,7 @@ namespace IRaCIS.Core.Application.Service
// 一致性核查文件
CreateMap<InspectionFile, GetUserUploadFileDto>()
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName));
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName));
//CRC 质疑列表
@@ -666,7 +666,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName))
//.ForMember(d => d.ClosedUserUserName, u => u.MapFrom(s => s.ClosedUser.UserName))
.ForMember(d => d.IsQCConfirmedReupload, u => u.MapFrom(s => s.SubjectVisit.IsQCConfirmedReupload))
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
.ForMember(d => d.LatestReplyUserFullName, u => u.MapFrom(t => t.LatestReplyUser.FullName))