diff --git a/IRaCIS.Core.Application/Resources/en-US.json b/IRaCIS.Core.Application/Resources/en-US.json index 510373bba..606feb385 100644 --- a/IRaCIS.Core.Application/Resources/en-US.json +++ b/IRaCIS.Core.Application/Resources/en-US.json @@ -79,28 +79,36 @@ "VisitTask_DoctorConfiguration": "", "VisitTask_BackendData": "Tasks that have not been completed or have not taken effect are not allowed to request re-reading.", "VisitTask_UnreadTask": "Tasks that re-read has been applied or approved are not allowed to apply for re-read.", + "VisitTask_NoPMRecheck": "", "VisitTask_Reapply": "PM does not allow apply for re-read of consistency analysis tasks.", "VisitTask_ConsistencyAnalysis": "PM only allows apply for re-read that the view type is visit.", "VisitTask_VisitTypeRestriction": "It is currently an ordered read type, and the subject has visit that has applied for re-read, but has not been processed (project team apply for), so it cannot been applied for continuing re-read at this time.", "VisitTask_SequentialReading": "It is currently an ordered read type, and the subject has visit that has applied for re-read, but has not been processed, so it cannot been applied for re-read for now.", "VisitTask_ImageProblem": "It is currently an ordered read type that there is something wrong with the image. The trial team has applied for returning, so it cannot been applied for re-read for now.", "VisitTask_LastReading": "It is an ordered read type, and only the request for re-readinng by the subject reader after completing the global task for the last time is allowed.", + "VisitTask_LastOncologistRecheck": "", + "VisitTask_LastAdjudicatorRecheck": "", + "VisitTask_IRGlobalRecheck": "", "VisitTask_IRReapply": "It is an disordered read type, only tasks that IR applies for global and visit read type to re-read are allowed.", "VisitTask_InvalidReapplyStatus": "The current re-read task state is not in the requested state and cannot be processed. Please refresh the page.", "VisitTask_ReapplyStatusConflict": "The status of the current task requested to be re-read has been affected by another re-read task. The re-read yes/no operation is not allowed for the task in this state", "VisitTask_ReReadTaskNotApplied": "Only tasks the read type is visit are allowed to be approved of re-read.", "VisitTask_ReReadTaskAlreadyAffected": "Do not conform to the PM request and SPM / CPM approve | IR request and PM approve.", "VisitTask_TaskTypeNotApproved": "The current re-read task state is not in the requested state and cannot be processed. Please refresh the page.", + "VisitTask_NoImageReturn": "", "VisitTask_NonEffectiveTaskCannotBeReturned": "Only effective and unfinished visit tasks can be returned. Please refresh the page data.", + "VisitTask_NoFurtherReturn": "", "VisitTask_ConsistencyTaskCannotBeReturned": "The consistency analysis task is not allowed to be set return back.", "VisitTask_PMOnlyAllowedForReturn": "Only the PM can perform the rollback.", "VisitTask_UnsupportedTaskType": "Re-read task types are not supported.", "VisitTask_UndefinedList": "The current user view list is not defined.", + "VisitTask_NoConsistencyReturn": "", "VisitTask_VisitTypeTaskAllowedForPMOnly": "Only visit task type can be returned by PM.", + // ------------------------------------------------------------Common-------------------------------------------------------------------- //CommonDocumentService "Document_CodeDuplication": "The Code of the document cannot be repeated.", @@ -158,6 +166,19 @@ "TrialEmailN_SingleBlindedSequenced": "The single and ordered reading, this type of task should not enter the logic here, please contact the background developers to check!", "TrialEmailN_PDProgressEmailTask": "Send PD progress email found problem with the task data!", "TrialEmailN_DoubleBlindedError": "The adjudication rule processing logic for double and ordered reading is not defined, please contact the business and background developers to check!", + "TrialEmailN_InCons": "", + "TrialEmailN_NoBaseLine": "", + "TrialEmailN_IncompBase": "", + "TrialEmailN_EmailFail": "", + "TrialEmailN_NoReader": "", + "TrialEmailN_NoPDConfig": "", + "TrialEmailN_NoPDTasks": "", + "TrialEmailN_PDNotFinished": "", + "TrialEmailN_PDNoImaging": "", + "TrialEmailN_PDPhaseNotFinished": "", + "TrialEmailN_NoRuleDefined": "", + "TrialEmailN_NoDoubleOrder": "", + "TrialEmailN_NoSendLogicDefined": "", "TrialEmailN_BlindedSequencedReading": "The configuration of the ordered reading is wrong (should be single or double reading), please check!", "TrialEmailN_UnblindedSequencedReading": "The configuration of unordered reading is wrong (should be single reading without adjudication, or double reading with adjudication for visiting ), please check!", "TrialEmailN_InvalidTaskTypeForEmailSending": "Do not send emails for other types of tasks except visit, adjudication and global read. Please check the business logic.", @@ -168,6 +189,7 @@ "TrialEmailN_ConfigurationCorrect": "If this email is received, the email configuration is correct.", "TrialEmailN_InvalidSenderEmailConfig": "The sender configuration is incorrect. Please check whether the server address or authorization code is correct or not.", + // ------------------------------------------------------------Financial-------------------------------------------------------------------- //CalculateService "Cal_VolDataErr": "Volume reward data error.", diff --git a/IRaCIS.Core.Application/Resources/zh-CN.json b/IRaCIS.Core.Application/Resources/zh-CN.json index 023b8ba50..2391dde9e 100644 --- a/IRaCIS.Core.Application/Resources/zh-CN.json +++ b/IRaCIS.Core.Application/Resources/zh-CN.json @@ -76,25 +76,33 @@ "VisitTask_DoctorConfiguration": "后台数据有错误", "VisitTask_BackendData": "未阅片完成,或者未生效的任务不允许申请重阅", "VisitTask_UnreadTask": "重阅已申请,或者重阅已同意状态下不允许申请重阅", + "VisitTask_NoPMRecheck": "手动生成任务的不允许PM 申请影像重阅", "VisitTask_Reapply": "PM 不允许对一致性分析任务进行申请重阅", "VisitTask_ConsistencyAnalysis": "PM 仅仅允许对访视类型的任务申请重阅", "VisitTask_VisitTypeRestriction": "当前为有序阅片,该受试者已有访视已申请重阅还未处理(项目组申请),暂不能继续申请重阅", "VisitTask_SequentialReading": "当前为有序阅片,该受试者已有访视已申请重阅还未处理,暂不能继续申请重阅", "VisitTask_ImageProblem": "当前为有序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅", "VisitTask_LastReading": "有序阅片,只允许申请该受试者阅片人最后一次完成全局任务重阅", + "VisitTask_LastOncologistRecheck": "有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅", + "VisitTask_LastAdjudicatorRecheck": "有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅", + "VisitTask_IRGlobalRecheck": "无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅", "VisitTask_IRReapply": "无序阅片,仅仅允许IR申请全局和访视类型类别的任务进行重阅", "VisitTask_InvalidReapplyStatus": "当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面", "VisitTask_ReapplyStatusConflict": "当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作", "VisitTask_ReReadTaskNotApplied": "仅允许同意访视类型的任务重阅", "VisitTask_ReReadTaskAlreadyAffected": "不符合 PM申请 SPM / CPM审批 | IR申请 PM 审批 ", "VisitTask_TaskTypeNotApproved": "当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面", + "VisitTask_NoImageReturn": "手动生成任务的不允许在此入口影像退回", "VisitTask_NonEffectiveTaskCannotBeReturned": "仅仅允许针对生效、未完成的访视任务进行退回操作,请刷新页面数据", + "VisitTask_NoFurtherReturn": "当前访视已回退到影像上传,不允许继续回退!", "VisitTask_ConsistencyTaskCannotBeReturned": "一致性分析的任务,不允许设置退回", "VisitTask_PMOnlyAllowedForReturn": "仅PM 可以进行回退操作", "VisitTask_UnsupportedTaskType": "不支持重阅的任务类型", "VisitTask_UndefinedList": "当前用户查看列表未定义", + "VisitTask_NoConsistencyReturn": "不允许退回一致性分析任务", "VisitTask_VisitTypeTaskAllowedForPMOnly": "仅仅访视类型的任务支持PM退回", + // ------------------------------------------------------------Common-------------------------------------------------------------------- //CommonDocumentService "Document_CodeDuplication": "文档的Code不能够重复。", @@ -148,6 +156,19 @@ "TrialEmailN_SingleBlindedSequenced": "单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查!", "TrialEmailN_PDProgressEmailTask": "发送PD 进展邮件中发现任务数据有问题!", "TrialEmailN_DoubleBlindedError": "双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查!", + "TrialEmailN_InCons": "项目未配置入组确认!", + "TrialEmailN_NoBaseLine": "不存在配置了入组确认的并且生成任务的基线访视", + "TrialEmailN_IncompBase": "做入组确认的阅片人基线任务没有阅片完!", + "TrialEmailN_EmailFail": "邮件手动生成失败,请联系开发核实该场景失败原因", + "TrialEmailN_NoReader": "当前未有阅片人读完基线任务!", + "TrialEmailN_NoPDConfig": "项目未配置PD进展!", + "TrialEmailN_NoPDTasks": "不存在配置了PD进展的并且生成任务的访视", + "TrialEmailN_PDNotFinished": "当前受试者最新PD访视阅片任务完成状态不符合发送条件", + "TrialEmailN_PDNoImaging": "项目配置了阅片期仲裁,但是当前受试者最新PD访视没有影像学阅片期", + "TrialEmailN_PDPhaseNotFinished": "当前受试者最新PD访视阅片期任务完成状态不符合发送条件", + "TrialEmailN_NoRuleDefined": "未定义该仲裁规则发送业务逻辑!", + "TrialEmailN_NoDoubleOrder": "当前项目配置,不满足双重有序阅片,不满足发送条件!", + "TrialEmailN_NoSendLogicDefined": "当前项目配置,未定义发送业务逻辑!", "TrialEmailN_BlindedSequencedReading": "有序阅片配置有误(应为单重或者双重阅片),请核查!", "TrialEmailN_UnblindedSequencedReading": "无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!", "TrialEmailN_InvalidTaskTypeForEmailSending": "不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑", @@ -157,6 +178,7 @@ "TrialEmailN_EmailTestMessage": "项目邮件测试", "TrialEmailN_ConfigurationCorrect": " 收到此邮件,代表邮件配置正确", "TrialEmailN_InvalidSenderEmailConfig": "发件人配置错误,请核对服务器地址或者授权码是否填写有误", + // ------------------------------------------------------------Financial-------------------------------------------------------------------- //CalculateService "Cal_VolDataErr": "体积()数据错误", diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index a14382d85..600f0fc9f 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1290,7 +1290,8 @@ namespace IRaCIS.Core.Application.Service.Allocation { if (criterionConfig.IsAutoCreate == false) { - return ResponseOutput.NotOk("手动生成任务的不允许PM 申请影像重阅"); + //---手动生成任务的不允许PM 申请影像重阅 + return ResponseOutput.NotOk(_localizer["VisitTask_NoPMRecheck"]); } if (task.IsAnalysisCreate) @@ -1373,12 +1374,14 @@ namespace IRaCIS.Core.Application.Service.Allocation if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology))) { - throw new BusinessValidationFailedException("有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅"); + //---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅 + throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]); } if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge))) { - throw new BusinessValidationFailedException("有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅"); + //---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅 + throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]); } } @@ -1386,7 +1389,8 @@ namespace IRaCIS.Core.Application.Service.Allocation { if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Global) { - throw new BusinessValidationFailedException("无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅"); + //---无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅 + throw new BusinessValidationFailedException(_localizer["VisitTask_IRGlobalRecheck"]); } } @@ -2090,7 +2094,8 @@ namespace IRaCIS.Core.Application.Service.Allocation if (criterionConfig.IsAutoCreate == false) { - return ResponseOutput.NotOk("手动生成任务的不允许在此入口影像退回"); + //---手动生成任务的不允许在此入口影像退回 + return ResponseOutput.NotOk(_localizer["VisitTask_NoImageReturn"]); } if (task.TaskState != TaskState.Effect || task.ReadingCategory != ReadingCategory.Visit || task.ReadingTaskState == ReadingTaskState.HaveSigned) @@ -2102,7 +2107,8 @@ namespace IRaCIS.Core.Application.Service.Allocation if (await _subjectVisitRepository.AnyAsync(t => t.Id == task.SourceSubjectVisitId && t.CheckState != CheckStateEnum.CVPassed)) { - return ResponseOutput.NotOk("当前访视已回退到影像上传,不允许继续回退!"); + //---当前访视已回退到影像上传,不允许继续回退! + return ResponseOutput.NotOk(_localizer["VisitTask_NoFurtherReturn"]); } @@ -2726,7 +2732,8 @@ namespace IRaCIS.Core.Application.Service.Allocation if (filterObj.IsAnalysisCreate) { - throw new BusinessValidationFailedException("不允许退回一致性分析任务"); + //---不允许退回一致性分析任务 + throw new BusinessValidationFailedException(_localizer["VisitTask_NoConsistencyReturn"]); } if (filterObj.ReadingCategory == ReadingCategory.Visit && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index 2cd00e8eb..ece38e7e0 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -482,7 +482,8 @@ namespace IRaCIS.Application.Services if (await _doctorCriterionFileRepository.AnyAsync(x => inDto.IsEnable && x.DoctorId == inDto.DoctorId && x.FileType == inDto.FileType && x.TrialId==inDto.TrialId &&x.TrialReadingCriterionId==inDto.TrialReadingCriterionId && x.IsEnable && x.CriterionType == inDto.CriterionType && x.Id != inDto.Id)) { - throw new BusinessValidationFailedException("当前标准已添加过此类型文件"); + //-----------当前标准已添加过此类型文件 + throw new BusinessValidationFailedException(_localizer["Doctor_StandardDuplicateFileTypeError"]); } diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index 2f40f256a..d3215a32f 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -1,4 +1,4 @@ -//-------------------------------------------------------------------- +//-------------------------------------------------------------------- // 此代码由T4模板自动生成 byzhouhang 20210918 // 生成时间 2022-01-05 09:17:03 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 @@ -55,7 +55,8 @@ namespace IRaCIS.Core.Application.Services if (await _systemDocumentRepository.AnyAsync(t => t.FileTypeId == addOrEditSystemDocument.FileTypeId && t.Name == addOrEditSystemDocument.Name,true)) { - return ResponseOutput.NotOk("系统中已存在同类型的同名文件。"); + //---系统中已存在同类型的同名文件。 + return ResponseOutput.NotOk(_localizer["SystemD_DuplicateFile"]); } await _systemDocumentRepository.AddAsync(entity, true); @@ -70,7 +71,8 @@ namespace IRaCIS.Core.Application.Services if (await _systemDocumentRepository.AnyAsync(t => t.FileTypeId == addOrEditSystemDocument.FileTypeId && t.Name == addOrEditSystemDocument.Name && t.Id != addOrEditSystemDocument.Id, true)) { - return ResponseOutput.NotOk("系统中已存在同类型的同名文件。"); + //---系统中已存在同类型的同名文件。 + return ResponseOutput.NotOk(_localizer["SystemD_DuplicateFile"]); } @@ -114,7 +116,8 @@ namespace IRaCIS.Core.Application.Services if (await _repository.Where(t => t.Id == systemDocumentId).AnyAsync(u => u.SystemDocConfirmedUserList.Any())) { - return ResponseOutput.NotOk("已有用户阅读该文档,并签名,不允许删除。"); + //---已有用户阅读该文档,并签名,不允许删除。 + return ResponseOutput.NotOk(_localizer["SystemD_CannotDeleteSignedFile"]); } var success = await _systemDocumentRepository.DeleteFromQueryAsync(t => t.Id == systemDocumentId,true,true); diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 3f7efd91a..a9e2796ec 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -1,4 +1,4 @@ -//-------------------------------------------------------------------- +//-------------------------------------------------------------------- // 此代码由T4模板自动生成 byzhouhang 20210918 // 生成时间 2022-01-05 09:17:03 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 @@ -400,7 +400,8 @@ namespace IRaCIS.Core.Application.Services if (await _trialDocumentRepository.AnyAsync(t => t.FileTypeId == addOrEditTrialDocument.FileTypeId && t.Name == addOrEditTrialDocument.Name && t.TrialId == addOrEditTrialDocument.TrialId, true)) { - return ResponseOutput.NotOk("该项目中已经存在同类型的同名文件。"); + //---该项目中已经存在同类型的同名文件。 + return ResponseOutput.NotOk(_localizer["TrialD_DuplicateFileInProject"]); } //entity.Id = NewId.NextGuid(); @@ -411,7 +412,8 @@ namespace IRaCIS.Core.Application.Services { if (await _trialDocumentRepository.AnyAsync(t => t.FileTypeId == addOrEditTrialDocument.FileTypeId && t.Name == addOrEditTrialDocument.Name && t.Id != addOrEditTrialDocument.Id && t.TrialId == addOrEditTrialDocument.TrialId, true)) { - return ResponseOutput.NotOk("该项目中已经存在同类型的同名文件。"); + //---该项目中已经存在同类型的同名文件。 + return ResponseOutput.NotOk(_localizer["TrialD_DuplicateFileInProject"]); } var document = (await _trialDocumentRepository.Where(t => t.Id == addOrEditTrialDocument.Id, true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefaultAsync()).IfNullThrowException(); @@ -464,7 +466,8 @@ namespace IRaCIS.Core.Application.Services { if (await _trialDocumentRepository.AsQueryable(true).Where(t => t.Id == trialDocumentId).AnyAsync(t => t.TrialDocConfirmedUserList.Any())) { - return ResponseOutput.NotOk("已有用户阅读该文档,并签名,不允许删除。"); + //---已有用户阅读该文档,并签名,不允许删除。 + return ResponseOutput.NotOk(_localizer["TrialD_DocumentHasAlready"]); } var success = await _trialDocumentRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialDocumentId); @@ -555,12 +558,14 @@ namespace IRaCIS.Core.Application.Services if(sysDocConfirm.ConfirmTime != null) { - return ResponseOutput.NotOk("该文件已经签名"); + //---该文件已经签名 + return ResponseOutput.NotOk(_localizer["TrialD_FileAlreadySigned"]); } if (sysDocConfirm.IsDeleted) { - return ResponseOutput.NotOk("文件已废除,签署失败!"); + //---文件已废除,签署失败! + return ResponseOutput.NotOk(_localizer["TrialD_ObsoleteFile"]); } @@ -580,12 +585,14 @@ namespace IRaCIS.Core.Application.Services if (trialDocConfirm.ConfirmTime != null) { - return ResponseOutput.NotOk("该文件已经签名"); + //---该文件已经签名 + return ResponseOutput.NotOk(_localizer["TrialD_FileAlreadySigned"]); } if (trialDocConfirm.IsDeleted) { - return ResponseOutput.NotOk("文件已废除,签署失败!"); + //---文件已废除,签署失败! + return ResponseOutput.NotOk(_localizer["TrialD_ObsoleteFile"]); } trialDocConfirm.ConfirmTime = DateTime.Now; diff --git a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs index beb3863ed..1330b369b 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs @@ -1,4 +1,4 @@ -//-------------------------------------------------------------------- +//-------------------------------------------------------------------- // 此代码由T4模板自动生成 byzhouhang 20210918 // 生成时间 2022-10-20 11:52:17 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 @@ -328,7 +328,8 @@ namespace IRaCIS.Core.Application.Service } else { - throw new BusinessValidationFailedException("进行邮件发送前,该任务必须已签名完成并已经触发完成相应的任务生成"); + //---进行邮件发送前,该任务必须已签名完成并已经触发完成相应的任务生成 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_TaskNotSigned"]); } @@ -366,7 +367,8 @@ namespace IRaCIS.Core.Application.Service if (toUserList.Count() == 0) { - throw new BusinessValidationFailedException("没有收件人,无法发送邮件"); + //---没有收件人,无法发送邮件 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_NoRecipient"]); } @@ -387,7 +389,8 @@ namespace IRaCIS.Core.Application.Service } else { - throw new BusinessValidationFailedException("项目发件邮箱配置有误,请核实"); + //---项目发件邮箱配置有误,请核实 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidEmailConfig"]); } foreach (var item in toUserList) @@ -419,7 +422,8 @@ namespace IRaCIS.Core.Application.Service if (!File.Exists(path)) { - throw new BusinessValidationFailedException("找不到该项目标准场景下邮件模板"); + //---找不到该项目标准场景下邮件模板 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_EmailTemplateNotFound"]); } @@ -436,7 +440,7 @@ namespace IRaCIS.Core.Application.Service if (businessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed) { - sendEmailConfig.TopicDescription = $"【入组确认报告】关于{taskInfo.ResearchProgramNo}项目{taskInfo.SubjectCode}受试者"; + sendEmailConfig.TopicDescription = _localizer["TrialEmailN_EnrollmentConfirmation", taskInfo.ResearchProgramNo, taskInfo.SubjectCode]; using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile)) { @@ -444,13 +448,14 @@ namespace IRaCIS.Core.Application.Service sendEmailConfig.HtmlBodyStr = string.Format(templateInfo, - $" 附件为入组确认报告,请查收 " + //--- 附件为疾病进展确认报告,请查收 + _localizer["TrialEmailN_SubjectDiseaseProgression"] ); } } else if (businessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed) { - sendEmailConfig.TopicDescription = $"【疾病进展确认报告】关于{taskInfo.ResearchProgramNo}项目{taskInfo.SubjectCode}受试者"; + sendEmailConfig.TopicDescription = _localizer["TrialEmailN_PDReport", taskInfo.ResearchProgramNo, taskInfo.SubjectCode]; using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile)) { @@ -458,7 +463,8 @@ namespace IRaCIS.Core.Application.Service sendEmailConfig.HtmlBodyStr = string.Format(templateInfo, - $" 附件为疾病进展确认报告,请查收 " + //--- 附件为疾病进展确认报告,请查收 + _localizer["TrialEmailN_SubjectDiseaseProgression"] ); } } @@ -622,7 +628,8 @@ namespace IRaCIS.Core.Application.Service } else { - throw new BusinessValidationFailedException("发送PD 进展邮件中发现任务数据有问题!"); + //---发送PD 进展邮件中发现任务数据有问题! + throw new BusinessValidationFailedException(_localizer["TrialEmailN_PDProgressEmailTask"]); } @@ -631,7 +638,8 @@ namespace IRaCIS.Core.Application.Service else { - throw new BusinessValidationFailedException("双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查!"); + //---双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查! + throw new BusinessValidationFailedException(_localizer["TrialEmailN_DoubleBlindedError"]); } @@ -652,7 +660,8 @@ namespace IRaCIS.Core.Application.Service // if (taskInfo.ArbitrationRule != ArbitrationRule.None) // { - // throw new BusinessValidationFailedException("单重有序阅片配置有误(不应该有仲裁对象配置),请核查!"); + //---单重有序阅片配置有误(不应该有仲裁对象配置),请核查! + // throw new BusinessValidationFailedException(_localizer["TrialEmailN_SingleBlindedSet"]); // } @@ -677,7 +686,8 @@ namespace IRaCIS.Core.Application.Service // } // else // { - // throw new BusinessValidationFailedException("单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查!"); + //---单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查! + // throw new BusinessValidationFailedException(_localizer["TrialEmailN_SingleBlindedSequenced"]); // } // isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, new List() { visitTaskId }, minUserIdList); @@ -686,7 +696,8 @@ namespace IRaCIS.Core.Application.Service //} //else //{ - // throw new BusinessValidationFailedException("有序阅片配置有误(应为单重或者双重阅片),请核查!"); + //---有序阅片配置有误(应为单重或者双重阅片),请核查! + // throw new BusinessValidationFailedException(_localizer["TrialEmailN_BlindedSequencedReading"]); //} #endregion @@ -748,7 +759,8 @@ namespace IRaCIS.Core.Application.Service // } // else // { - // throw new BusinessValidationFailedException("无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!"); + //---无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查! + // throw new BusinessValidationFailedException(_localizer["TrialEmailN_UnblindedSequencedReading"]); // } //} @@ -892,13 +904,15 @@ namespace IRaCIS.Core.Application.Service if (trialConfig.IsEnrollementQualificationConfirm == false) { - return ResponseOutput.NotOk("项目未配置入组确认!"); + //---项目未配置入组确认! + return ResponseOutput.NotOk(_localizer["TrialEmailN_InCons"]); } var exisitBaseline = subjectVisitList.FirstOrDefault(t => t.IsEnrollmentConfirm); if (exisitBaseline == null) { - return ResponseOutput.NotOk("不存在配置了入组确认的并且生成任务的基线访视"); + //---不存在配置了入组确认的并且生成任务的基线访视 + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoBaseLine"]); } else { @@ -918,7 +932,8 @@ namespace IRaCIS.Core.Application.Service if (task == null) { - return ResponseOutput.NotOk("做入组确认的阅片人基线任务没有阅片完!"); + //---做入组确认的阅片人基线任务没有阅片完! + return ResponseOutput.NotOk(_localizer["TrialEmailN_IncompBase"]); } else { @@ -926,7 +941,8 @@ namespace IRaCIS.Core.Application.Service if (string.IsNullOrEmpty(filePath)) { - return ResponseOutput.NotOk("邮件手动生成失败,请联系开发核实该场景失败原因"); + //---邮件手动生成失败,请联系开发核实该场景失败原因 + return ResponseOutput.NotOk(_localizer["TrialEmailN_EmailFail"]); } else { @@ -939,7 +955,8 @@ namespace IRaCIS.Core.Application.Service } else { - return ResponseOutput.NotOk("当前未有阅片人读完基线任务!"); + //---当前未有阅片人读完基线任务! + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoReader"]); } @@ -954,7 +971,8 @@ namespace IRaCIS.Core.Application.Service if (trialConfig.IsPDProgressView == false) { - return ResponseOutput.NotOk("项目未配置PD进展!"); + //---项目未配置PD进展! + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoPDConfig"]); } //是否是截止访视 截止访视在全局发 否则就在当前访视发 @@ -963,7 +981,8 @@ namespace IRaCIS.Core.Application.Service if (pdSubjectVisitIdList.Count == 0) { - return ResponseOutput.NotOk("不存在配置了PD进展的并且生成任务的访视"); + //---不存在配置了PD进展的并且生成任务的访视 + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoPDTasks"]); } @@ -1007,7 +1026,8 @@ namespace IRaCIS.Core.Application.Service } else { - return ResponseOutput.NotOk("当前受试者最新PD访视阅片任务完成状态不符合发送条件"); + //---当前受试者最新PD访视阅片任务完成状态不符合发送条件 + return ResponseOutput.NotOk(_localizer["TrialEmailN_PDNotFinished"]); } } @@ -1019,7 +1039,8 @@ namespace IRaCIS.Core.Application.Service if (existReadModule == null) { - return ResponseOutput.NotOk("项目配置了阅片期仲裁,但是当前受试者最新PD访视没有影像学阅片期"); + //---项目配置了阅片期仲裁,但是当前受试者最新PD访视没有影像学阅片期 + return ResponseOutput.NotOk(_localizer["TrialEmailN_PDNoImaging"]); } else { @@ -1053,7 +1074,8 @@ namespace IRaCIS.Core.Application.Service else { - return ResponseOutput.NotOk("当前受试者最新PD访视阅片期任务完成状态不符合发送条件"); + //---当前受试者最新PD访视阅片期任务完成状态不符合发送条件 + return ResponseOutput.NotOk(_localizer["TrialEmailN_PDPhaseNotFinished"]); } } @@ -1061,7 +1083,8 @@ namespace IRaCIS.Core.Application.Service } else { - return ResponseOutput.NotOk("未定义该仲裁规则发送业务逻辑!"); + //---未定义该仲裁规则发送业务逻辑! + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoRuleDefined"]); } } @@ -1119,14 +1142,16 @@ namespace IRaCIS.Core.Application.Service else { - return ResponseOutput.NotOk("当前项目配置,不满足双重有序阅片,不满足发送条件!"); + //---当前项目配置,不满足双重有序阅片,不满足发送条件! + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoDoubleOrder"]); } } else { - return ResponseOutput.NotOk("当前项目配置,未定义发送业务逻辑!"); + //---当前项目配置,未定义发送业务逻辑! + return ResponseOutput.NotOk(_localizer["TrialEmailN_NoSendLogicDefined"]); } @@ -1207,7 +1232,8 @@ namespace IRaCIS.Core.Application.Service //} else { - throw new BusinessValidationFailedException("不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑"); + //---不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidTaskTypeForEmailSending"]); } if (answer == OverallAssessment.PD.GetEnumInt()) @@ -1246,7 +1272,8 @@ namespace IRaCIS.Core.Application.Service //} else { - throw new BusinessValidationFailedException("不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑"); + //---不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidTaskTypeForEmailSending"]); } if (answer == VisitTumorEvaluation.PD.GetEnumInt()) @@ -1283,7 +1310,8 @@ namespace IRaCIS.Core.Application.Service case CriterionType.IMWG2016: default: - throw new BusinessValidationFailedException("该标准任务还未定义PD获取逻辑,联系业务和后台开发协商后补充"); + //---该标准任务还未定义PD获取逻辑,联系业务和后台开发协商后补充 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_PDLogicNotDefined"]); } @@ -1402,13 +1430,15 @@ namespace IRaCIS.Core.Application.Service if (!config.FromEmail.Contains("@") || string.IsNullOrEmpty(config.FromEmail)) { - throw new BusinessValidationFailedException("项目发件邮箱配置有误,请核实"); + //---项目发件邮箱配置有误,请核实 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidEmailConfig"]); } if (toUserList.Count() == 0 || toUserList.Where(t => t.EMail.Contains("@")).Count() == 0) { - throw new BusinessValidationFailedException("项目没有有效的收件人,无法发送邮件"); + //---项目没有有效的收件人,无法发送邮件 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidRecipient"]); } var sendEmailConfig = new SMTPEmailConfig(); @@ -1431,7 +1461,8 @@ namespace IRaCIS.Core.Application.Service + "EmailConfigTest.html"; - sendEmailConfig.TopicDescription = "项目邮件测试"; + //---项目邮件测试 + sendEmailConfig.TopicDescription = _localizer["TrialEmailN_EmailTestMessage"]; using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile)) { @@ -1439,7 +1470,8 @@ namespace IRaCIS.Core.Application.Service sendEmailConfig.HtmlBodyStr = string.Format(templateInfo, - $" 收到此邮件,代表邮件配置正确" + //--- 收到此邮件,代表邮件配置正确 + _localizer["TrialEmailN_ConfigurationCorrect"] ); } @@ -1451,7 +1483,8 @@ namespace IRaCIS.Core.Application.Service catch (Exception ex) { - throw new BusinessValidationFailedException("发件人配置错误,请核对服务器地址或者授权码是否填写有误" + ex.Message); + //---发件人配置错误,请核对服务器地址或者授权码是否填写有误 + throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidSenderEmailConfig"] + ex.Message); } diff --git a/后端提示语.xlsx b/后端提示语.xlsx index e00eef66d..2be0b3ef2 100644 Binary files a/后端提示语.xlsx and b/后端提示语.xlsx differ