PI 审核

Uat_Study
hang 2023-07-13 09:34:23 +08:00
parent 888dfbcafb
commit a85255b5fd
4 changed files with 10 additions and 5 deletions

View File

@ -476,6 +476,8 @@ namespace IRaCIS.Core.Application.ViewModel
public UserTypeEnum UserTypeEnum { get; set; } public UserTypeEnum UserTypeEnum { get; set; }
} }

View File

@ -215,7 +215,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1)) .WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
.WhereIf(trialConfig?.EnrollConfirmDefaultUserType == UserTypeEnum.MIM && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM, t => t.SourceSubjectVisit.IsBaseLine == true) .WhereIf(trialConfig?.EnrollConfirmDefaultUserType == UserTypeEnum.MIM && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM, t => t.SourceSubjectVisit.IsBaseLine == true)
.WhereIf(trialConfig?.PDProgressDefaultUserType == UserTypeEnum.MIM && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM, t => t.SourceSubjectVisit.IsBaseLine == false) .WhereIf(trialConfig?.PDProgressDefaultUserType == UserTypeEnum.MIM && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM, t => t.SourceSubjectVisit.IsBaseLine == false)
.WhereIf(queryVisitTask.IsWaitPIAudit == true, t => t.FirstAuditUserId == null) .WhereIf(queryVisitTask.IsWaitPIAudit == true, t => t.FirstAuditUserId == null)
@ -276,6 +276,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
//发送对话 //发送对话
var addDialig = _mapper.Map<PIAudit>(incommand); var addDialig = _mapper.Map<PIAudit>(incommand);
addDialig.PIAuditImagePath = visitTask.PIAuditImagePath;
await _PIAuditRepository.AddAsync(addDialig); await _PIAuditRepository.AddAsync(addDialig);
await _visitTaskRepository.SaveChangesAsync(); await _visitTaskRepository.SaveChangesAsync();
@ -292,7 +294,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
var visitTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == incommand.VisitTaskId); var visitTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == incommand.VisitTaskId);
visitTask.IsEnrollment = incommand.IsEnrollment != null ? incommand.IsEnrollment : visitTask.IsEnrollment; visitTask.IsEnrollment = incommand.IsEnrollment != null ? incommand.IsEnrollment : visitTask.IsEnrollment;
visitTask.IsPDConfirm = incommand.IsPDConfirm != null ? incommand.IsPDConfirm : visitTask.IsPDConfirm; visitTask.IsPDConfirm = incommand.IsPDConfirm != null ? incommand.IsPDConfirm : visitTask.IsPDConfirm;
visitTask.LatestReplyUserId = _userInfo.Id;
visitTask.LatestReplyTime = DateTime.Now;
await _visitTaskRepository.SaveChangesAsync(); await _visitTaskRepository.SaveChangesAsync();
@ -1500,7 +1503,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
return ResponseOutput.NotOk(_localizer["VisitTask_NoImageReturn"]); return ResponseOutput.NotOk(_localizer["VisitTask_NoImageReturn"]);
} }
if (task.TaskState != TaskState.Effect || task.ReadingCategory != ReadingCategory.Visit || task.ReadingTaskState == ReadingTaskState.HaveSigned) if (task.TaskState != TaskState.Effect || task.ReadingCategory != ReadingCategory.Visit /*|| task.ReadingTaskState == ReadingTaskState.HaveSigned*/)
{ {
//---仅仅允许针对生效、未完成的访视任务进行退回操作,请刷新页面数据 //---仅仅允许针对生效、未完成的访视任务进行退回操作,请刷新页面数据
return ResponseOutput.NotOk(_localizer["VisitTask_NonEffectiveTaskCannotBeReturned"]); return ResponseOutput.NotOk(_localizer["VisitTask_NonEffectiveTaskCannotBeReturned"]);

View File

@ -55,7 +55,7 @@ namespace IRaCIS.Core.Domain.Models
try try
{ {
return this.PIAuditImagePath.Trim().Split('|').ToList(); return this.PIAuditImagePath?.Trim().Split('|').ToList();
} }
catch (Exception) catch (Exception)
{ {

View File

@ -437,7 +437,7 @@ namespace IRaCIS.Core.Domain.Models
try try
{ {
return this.PIAuditImagePath.Trim().Split('|').ToList(); return this.PIAuditImagePath?.Trim().Split('|').ToList();
} }
catch (Exception) catch (Exception)
{ {