Uat_Study
parent
e8f2dfc5d6
commit
b0a3aa4b18
|
@ -1,4 +1,4 @@
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
// 生成时间 2022-06-07 14:10:49
|
// 生成时间 2022-06-07 14:10:49
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
@ -109,7 +109,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (list.Count == 0)
|
if (list.Count == 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("该项目还未确认任何一个阅片标准");
|
//---该项目还未确认任何一个阅片标准
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_VisitTask_TaskAlreadyApplied"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,7 +266,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == cancelCommand.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading))
|
if (await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == cancelCommand.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前医生已开始做该Subject 该标准的任务,不允许取消分配");
|
//---当前医生已开始做该Subject 该标准的任务,不允许取消分配
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_DoctorConfigNotFound"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id);
|
await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id);
|
||||||
|
@ -312,25 +314,29 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && t.TaskAllocationState == TaskAllocationState.Allocated && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
|
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && t.TaskAllocationState == TaskAllocationState.Allocated && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("其中一个任务已分配给该医生,不允许分配");
|
//---其中一个任务已分配给该医生,不允许分配
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_BackendDataError"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (visitTask.SouceReadModuleId != null)
|
else if (visitTask.SouceReadModuleId != null)
|
||||||
{
|
{
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SouceReadModuleId == visitTask.SouceReadModuleId && t.TaskAllocationState == TaskAllocationState.Allocated && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
|
if (await _visitTaskRepository.AnyAsync(t => t.SouceReadModuleId == visitTask.SouceReadModuleId && t.TaskAllocationState == TaskAllocationState.Allocated && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("其中一个任务已分配给该医生,不允许分配");
|
//---其中一个任务已分配给该医生,不允许分配
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_BackendDataError"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("出现脏数据 任务来源字段没有值");
|
//---出现脏数据 任务来源字段没有值
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_DirtyData"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//PM 回退了 但是还没生成任务 当前任务编号前有访视进行了回退就不允许分配
|
//PM 回退了 但是还没生成任务 当前任务编号前有访视进行了回退就不允许分配
|
||||||
if (await _subjectVisitRepository.AnyAsync(t => t.SubjectId == visitTask.SubjectId && t.IsPMBackOrReReading && t.VisitNum <= visitTask.VisitTaskNum))
|
if (await _subjectVisitRepository.AnyAsync(t => t.SubjectId == visitTask.SubjectId && t.IsPMBackOrReReading && t.VisitNum <= visitTask.VisitTaskNum))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("该受试者有访视进入了退回流程,还未经过一致性核查通过,不允许分配");
|
//---该受试者有访视进入了退回流程,还未经过一致性核查通过,不允许分配
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_MissingTaskSource"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -473,12 +479,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum != armEnum && t.OrignalSubjectUserId == null))
|
if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum != armEnum && t.OrignalSubjectUserId == null))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("有Subject 在其他Arm组已有该医生,不允许在新的组添加该医生");
|
//---有Subject 在其他Arm组已有该医生,不允许在新的组添加该医生
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_InconsistentSubjectStatus"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum == armEnum && t.OrignalSubjectUserId == null))
|
if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum == armEnum && t.OrignalSubjectUserId == null))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("有Subject 已有该Arm组的医生,不允许继续分配,请刷新页面,确认页面数据是否过期");
|
//---有Subject 已有该Arm组的医生,不允许继续分配,请刷新页面,确认页面数据是否过期
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_DuplicateDoctorInArm"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -510,7 +518,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == subjectId && t.DoctorUserId != null && t.ArmEnum == Arm.JudgeArm))
|
if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == subjectId && t.DoctorUserId != null && t.ArmEnum == Arm.JudgeArm))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("有Subject任务已应用,不允许取消分配");
|
//---有Subject任务已应用,不允许取消分配
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_DoctorAlreadyInArm"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _subjectUserRepository.DeleteFromQueryAsync(t => t.SubjectId == subjectId && t.ArmEnum == Arm.JudgeArm);
|
await _subjectUserRepository.DeleteFromQueryAsync(t => t.SubjectId == subjectId && t.ArmEnum == Arm.JudgeArm);
|
||||||
|
@ -522,7 +531,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == subjectId && t.DoctorUserId != null && t.ArmEnum != Arm.JudgeArm))
|
if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == subjectId && t.DoctorUserId != null && t.ArmEnum != Arm.JudgeArm))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("有Subject任务已应用,不允许取消分配");
|
//---有Subject任务已应用,不允许取消分配
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_DoctorAlreadyInArm"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _subjectUserRepository.DeleteFromQueryAsync(t => t.SubjectId == subjectId && t.ArmEnum != Arm.JudgeArm);
|
await _subjectUserRepository.DeleteFromQueryAsync(t => t.SubjectId == subjectId && t.ArmEnum != Arm.JudgeArm);
|
||||||
|
@ -614,7 +624,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("在配置表中未找到配置的医生,无法应用绑定,请核对数据");
|
//---在配置表中未找到配置的医生,无法应用绑定,请核对数据
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_TaskAlreadyApplied"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1217,7 +1228,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (requestRecordList.Count() != baseLineTaskIdList.Count())
|
if (requestRecordList.Count() != baseLineTaskIdList.Count())
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("后台数据有错误");
|
//---后台数据有错误
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_DoctorConfiguration"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await ConfirmReReading(new ConfirmReReadingCommand()
|
await ConfirmReReading(new ConfirmReReadingCommand()
|
||||||
|
@ -1261,12 +1273,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (task.ReadingTaskState != ReadingTaskState.HaveSigned || task.TaskState != TaskState.Effect)
|
if (task.ReadingTaskState != ReadingTaskState.HaveSigned || task.TaskState != TaskState.Effect)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("未阅片完成,或者未生效的任务不允许申请重阅");
|
//---未阅片完成,或者未生效的任务不允许申请重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_BackendData"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
|
if (task.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("重阅已申请,或者重阅已同意状态下不允许申请重阅");
|
//---重阅已申请,或者重阅已同意状态下不允许申请重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_UnreadTask"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1281,12 +1295,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (task.IsAnalysisCreate)
|
if (task.IsAnalysisCreate)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("PM 不允许对一致性分析任务进行申请重阅");
|
//---PM 不允许对一致性分析任务进行申请重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_Reapply"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReadingCategory != ReadingCategory.Visit)
|
if (task.ReadingCategory != ReadingCategory.Visit)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("PM 仅仅允许对访视类型的任务申请重阅");
|
//---PM 仅仅允许对访视类型的任务申请重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_ConsistencyAnalysis"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1297,7 +1313,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
&& t.OriginalReReadingTask.TrialReadingCriterionId == task.TrialReadingCriterionId
|
&& t.OriginalReReadingTask.TrialReadingCriterionId == task.TrialReadingCriterionId
|
||||||
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default))
|
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前为有序阅片,该受试者已有访视已申请重阅还未处理(项目组申请),暂不能继续申请重阅");
|
//---当前为有序阅片,该受试者已有访视已申请重阅还未处理(项目组申请),暂不能继续申请重阅
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_VisitTypeRestriction"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1318,7 +1335,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
&& t.OriginalReReadingTask.TrialReadingCriterionId == task.TrialReadingCriterionId
|
&& t.OriginalReReadingTask.TrialReadingCriterionId == task.TrialReadingCriterionId
|
||||||
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default))
|
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前为有序阅片,该受试者已有访视已申请重阅还未处理,暂不能继续申请重阅");
|
//---当前为有序阅片,该受试者已有访视已申请重阅还未处理,暂不能继续申请重阅
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_SequentialReading"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1334,7 +1352,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
//PM 有序影响列表
|
//PM 有序影响列表
|
||||||
if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId && t.VisitTaskNum > originalTask.VisitTaskNum).AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
|
if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId && t.VisitTaskNum > originalTask.VisitTaskNum).AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前为有序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅");
|
//---当前为有序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_ImageProblem"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1367,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Global)))
|
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Global)))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("有序阅片,只允许申请该受试者阅片人最后一次完成全局任务重阅");
|
//---有序阅片,只允许申请该受试者阅片人最后一次完成全局任务重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology)))
|
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology)))
|
||||||
|
@ -1419,7 +1439,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面");
|
//---当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_InvalidReapplyStatus"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1491,7 +1512,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (origenalTask.TaskState != TaskState.Effect)
|
if (origenalTask.TaskState != TaskState.Effect)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作");
|
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1552,7 +1574,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("仅允许同意访视类型的任务重阅");
|
//---仅允许同意访视类型的任务重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_ReReadTaskNotApplied"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//有序阅片
|
//有序阅片
|
||||||
|
@ -1768,7 +1791,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new BusinessValidationFailedException("不支持重阅的任务类型");
|
//---不支持重阅的任务类型
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_UnsupportedTaskType"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1996,7 +2020,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("不符合 PM申请 SPM / CPM审批 | IR申请 PM 审批 ");
|
//---不符合 PM申请 SPM / CPM审批 | IR申请 PM 审批
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_ReReadTaskAlreadyAffected"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2012,7 +2037,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面");
|
//---当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_InvalidReapplyStatus"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2057,7 +2083,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
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("仅仅允许针对生效、未完成的访视任务进行退回操作,请刷新页面数据");
|
//---仅仅允许针对生效、未完成的访视任务进行退回操作,请刷新页面数据
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_NonEffectiveTaskCannotBeReturned"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2069,7 +2096,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if (task.IsAnalysisCreate)
|
if (task.IsAnalysisCreate)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("一致性分析的任务,不允许设置退回");
|
//---一致性分析的任务,不允许设置退回
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_ConsistencyTaskCannotBeReturned"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
|
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
|
||||||
|
@ -2345,7 +2373,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("仅PM 可以进行回退操作");
|
//---仅PM 可以进行回退操作
|
||||||
|
return ResponseOutput.NotOk(_localizer["VisitTask_PMOnlyAllowedForReturn"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2582,7 +2611,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new BusinessValidationFailedException("不支持重阅的任务类型");
|
//---不支持重阅的任务类型
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_UnsupportedTaskType"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//无序
|
//无序
|
||||||
|
@ -2614,7 +2644,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new BusinessValidationFailedException("不支持重阅的任务类型");
|
//---不支持重阅的任务类型
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_UnsupportedTaskType"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.RequestReReadingType == RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default &&
|
if (await _visitTaskReReadingRepository.AnyAsync(t => t.RequestReReadingType == RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default &&
|
||||||
|
@ -2638,7 +2669,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前用户查看列表未定义");
|
//---当前用户查看列表未定义
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_UndefinedList"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2681,7 +2713,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("仅仅访视类型的任务支持PM退回");
|
//---仅仅访视类型的任务支持PM退回
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_VisitTypeTaskAllowedForPMOnly"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
// 生成时间 2022-03-31 13:18:56
|
// 生成时间 2022-03-31 13:18:56
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
@ -49,7 +49,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var verifyExp1 = new EntityVerifyExp<CommonDocument>()
|
var verifyExp1 = new EntityVerifyExp<CommonDocument>()
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.Code == addOrEditCommonDocument.Code,
|
VerifyExp = t => t.Code == addOrEditCommonDocument.Code,
|
||||||
VerifyMsg = "文档的Code不能够重复。"
|
//---文档的Code不能够重复。
|
||||||
|
VerifyMsg = _localizer["Document_CodeDuplication"]
|
||||||
};
|
};
|
||||||
|
|
||||||
//var verifyExp3 = new EntityVerifyExp<CommonDocument>()
|
//var verifyExp3 = new EntityVerifyExp<CommonDocument>()
|
||||||
|
@ -63,7 +64,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.CriterionTypeEnum == addOrEditCommonDocument.CriterionTypeEnum && t.BusinessScenarioEnum == addOrEditCommonDocument.BusinessScenarioEnum &&
|
VerifyExp = t => t.CriterionTypeEnum == addOrEditCommonDocument.CriterionTypeEnum && t.BusinessScenarioEnum == addOrEditCommonDocument.BusinessScenarioEnum &&
|
||||||
t.IsDeleted == addOrEditCommonDocument.IsDeleted,
|
t.IsDeleted == addOrEditCommonDocument.IsDeleted,
|
||||||
VerifyMsg = "一个场景一个标准只允许有一个模板文档",
|
//---一个场景一个标准只允许有一个模板文档
|
||||||
|
VerifyMsg = _localizer["Document_SingleTemplate"],
|
||||||
IsVerify = addOrEditCommonDocument.CriterionTypeEnum != null && addOrEditCommonDocument.IsDeleted == false
|
IsVerify = addOrEditCommonDocument.CriterionTypeEnum != null && addOrEditCommonDocument.IsDeleted == false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,7 +96,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
return ResponseOutput.NotOk("读取模板内容失败, 请将文件另存为docx格式尝试!");
|
//---读取模板内容失败, 请将文件另存为docx格式尝试!
|
||||||
|
return ResponseOutput.NotOk(_localizer["Document_ TemplateRead"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,8 @@ namespace IRaCIS.Application.Services
|
||||||
var verifyExp1 = new EntityVerifyExp<Dictionary>()
|
var verifyExp1 = new EntityVerifyExp<Dictionary>()
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.Code == addOrEditBasic.Code && t.ParentId == addOrEditBasic.ParentId,
|
VerifyExp = t => t.Code == addOrEditBasic.Code && t.ParentId == addOrEditBasic.ParentId,
|
||||||
VerifyMsg = $"已有{addOrEditBasic.Code}名称的字典",
|
//---------- $"已有{addOrEditBasic.Code}名称的字典"
|
||||||
|
VerifyMsg = _localizer["Dictionary_DictionaryName", addOrEditBasic.Code],
|
||||||
IsVerify = addOrEditBasic.ParentId == null
|
IsVerify = addOrEditBasic.ParentId == null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -174,12 +175,14 @@ namespace IRaCIS.Application.Services
|
||||||
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
||||||
{
|
{
|
||||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
||||||
//return ResponseOutput.NotOk("当前字典在标准中被引用,不允许删除!");
|
//---当前字典在标准中被引用,不允许删除!
|
||||||
|
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("有子项数据,不允许直接删除!");
|
//---有子项数据,不允许直接删除!
|
||||||
|
return ResponseOutput.NotOk(_localizer["Dictionary_SubitemDeletion"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await _doctorDictionaryRepository.AnyAsync(t => t.DictionaryId == id)) ||
|
if ((await _doctorDictionaryRepository.AnyAsync(t => t.DictionaryId == id)) ||
|
||||||
|
@ -187,19 +190,22 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前条目已经在阅片人的简历中被引用。");
|
//---当前条目已经在阅片人的简历中被引用。
|
||||||
|
return ResponseOutput.NotOk(_localizer["Dictionary_ResumeReference"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _trialDictionaryRepository.AnyAsync(t => t.DictionaryId == id) ||
|
if (await _trialDictionaryRepository.AnyAsync(t => t.DictionaryId == id) ||
|
||||||
await _trialRepository.AnyAsync(t => t.ReviewModeId == id))
|
await _trialRepository.AnyAsync(t => t.ReviewModeId == id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前条目已经在项目信息中被引用。");
|
//---当前条目已经在项目信息中被引用。
|
||||||
|
return ResponseOutput.NotOk(_localizer["Dictionary_ProjectReference"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
||||||
{
|
{
|
||||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
||||||
//return ResponseOutput.NotOk("当前条目已经在阅片标准中被引用。");
|
//---当前条目已经在阅片标准中被引用。
|
||||||
|
//return ResponseOutput.NotOk(_localizer["Dictionary_StandardReference"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
|
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
|
||||||
|
@ -269,7 +275,8 @@ namespace IRaCIS.Application.Services
|
||||||
Description = x.Description
|
Description = x.Description
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
dictionaryList.ForEach(x => {
|
dictionaryList.ForEach(x =>
|
||||||
|
{
|
||||||
x.Count = parentCodes.Count(y => y == x.Code);
|
x.Count = parentCodes.Count(y => y == x.Code);
|
||||||
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
|
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
|
||||||
});
|
});
|
||||||
|
@ -299,7 +306,8 @@ namespace IRaCIS.Application.Services
|
||||||
Description = x.Description
|
Description = x.Description
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
dictionaryList.ForEach(x => {
|
dictionaryList.ForEach(x =>
|
||||||
|
{
|
||||||
x.Count = parentCodes.Count(y => y == x.Code);
|
x.Count = parentCodes.Count(y => y == x.Code);
|
||||||
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
|
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
|
||||||
});
|
});
|
||||||
|
|
BIN
后端提示语.xlsx
BIN
后端提示语.xlsx
Binary file not shown.
Loading…
Reference in New Issue