Uat_Study
he 2023-04-27 16:36:15 +08:00
parent fa92144439
commit 32deb59df4
4 changed files with 51 additions and 17 deletions

View File

@ -45,6 +45,15 @@
"MedicalReview_NeedSave": "Unable to perform the current operation. Please save the medical review questions and conclusions first.", "MedicalReview_NeedSave": "Unable to perform the current operation. Please save the medical review questions and conclusions first.",
"MedicalReview_NotClosed": "Unable to perform the current operation. The current medical inquiry conversation has not been closed.", "MedicalReview_NotClosed": "Unable to perform the current operation. The current medical inquiry conversation has not been closed.",
"MedicalReview_Finish": "The current medical review is the last one.", "MedicalReview_Finish": "The current medical review is the last one.",
//ReadingMedicineQuestionService
"ReadingMed_QNumDup": "Current problem number has duplicates",
"ReadingMed_HasSubQ": "This problem has sub-problems, please delete them first",
"ReadingMed_NoMedQ": "Medical review question has not been added yet. Please add it first before confirming",
"ReadingMed_MedQNumDup": "The display number of the medical imaging review question cannot be duplicated",
"ReadingMed_ParentNumSmall": "The display number of the parent problem should be smaller than that of the child problem, please confirm",
"ReadingMed_GlobalQNotConfig": "The global reading is enabled in the current standard, but the global medical review question has not been configured",
"ReadingMed_ArbitrateQNotConfig": "Arbitration reading is enabled in the current standard, but the arbitration medical review question has not been configured",
"ReadingMed_TumorQNotConfig": "Oncology reading is enabled in the current standard, but the oncology medical review question has not been configured",
//UserService //UserService
"User_CheckNameOrPw": "Please check the username or password.", "User_CheckNameOrPw": "Please check the username or password.",
//Repository //Repository

View File

@ -45,6 +45,15 @@
"MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。", "MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。",
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。", "MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
"MedicalReview_Finish": "当前医学审核任务为最后一个任务。", "MedicalReview_Finish": "当前医学审核任务为最后一个任务。",
//ReadingMedicineQuestionService
"ReadingMed_QNumDup": "当前问题序号存在重复",
"ReadingMed_HasSubQ": "此问题存在子问题,请先删除子问题",
"ReadingMed_NoMedQ": "当前未添加医学审核问题。请先添加医学审核问题,再进行确认。",
"ReadingMed_MedQNumDup": "影像医学审核问题显示序号不能重复。",
"ReadingMed_ParentNumSmall": "父问题的显示序号要比子问题的显示序号小,请确认。",
"ReadingMed_GlobalQNotConfig": "当前标准启用了全局阅片,但未配置全局医学审核问题",
"ReadingMed_ArbitrateQNotConfig": "当前标准启用了仲裁阅片,但未配置仲裁医学审核问题",
"ReadingMed_TumorQNotConfig": "当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题",
//UserService //UserService
"User_CheckNameOrPw": "请检查用户名或者密码。", "User_CheckNameOrPw": "请检查用户名或者密码。",
//Repository //Repository

View File

@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infra.EFCore.Common; using IRaCIS.Core.Infra.EFCore.Common;
using MassTransit; using MassTransit;
@ -107,7 +107,8 @@ namespace IRaCIS.Core.Application.Service
if (await existsQuery.AnyAsync()) if (await existsQuery.AnyAsync())
{ {
return ResponseOutput.NotOk("当前问题序号存在重复"); //---当前问题序号存在重复
return ResponseOutput.NotOk(_localizer["ReadingMed_QNumDup"]);
} }
//inDto.CriterionEnumStr = $"|{String.Join('|', inDto.CriterionEnumList)}|"; //inDto.CriterionEnumStr = $"|{String.Join('|', inDto.CriterionEnumList)}|";
@ -127,7 +128,8 @@ namespace IRaCIS.Core.Application.Service
{ {
if (await _readingMedicineSystemQuestionRepository.AnyAsync(x => x.ParentId == id)) if (await _readingMedicineSystemQuestionRepository.AnyAsync(x => x.ParentId == id))
{ {
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题"); //---此问题存在子问题,请先删除子问题
return ResponseOutput.NotOk(_localizer["ReadingMed_HasSubQ"]);
} }
var success = await _readingMedicineSystemQuestionRepository.DeleteFromQueryAsync(t => t.Id == id); var success = await _readingMedicineSystemQuestionRepository.DeleteFromQueryAsync(t => t.Id == id);
var result = await _readingMedicineSystemQuestionRepository.SaveChangesAsync(); var result = await _readingMedicineSystemQuestionRepository.SaveChangesAsync();
@ -234,7 +236,8 @@ namespace IRaCIS.Core.Application.Service
if (await existsQuery.AnyAsync()) if (await existsQuery.AnyAsync())
{ {
return ResponseOutput.NotOk("当前问题序号存在重复"); //---当前问题序号存在重复
return ResponseOutput.NotOk(_localizer["ReadingMed_QNumDup"]);
} }
var entity = await _readingMedicineTrialQuestionRepository.InsertOrUpdateAsync(inDto); var entity = await _readingMedicineTrialQuestionRepository.InsertOrUpdateAsync(inDto);
await _readingMedicineTrialQuestionRepository.SaveChangesAsync(); await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
@ -253,7 +256,8 @@ namespace IRaCIS.Core.Application.Service
{ {
if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id)) if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id))
{ {
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题"); //---此问题存在子问题,请先删除子问题
return ResponseOutput.NotOk(_localizer["ReadingMed_HasSubQ"]);
} }
var success = await _readingMedicineTrialQuestionRepository.DeleteFromQueryAsync(t => t.Id == inDto.Id); var success = await _readingMedicineTrialQuestionRepository.DeleteFromQueryAsync(t => t.Id == inDto.Id);
var result = await _readingMedicineTrialQuestionRepository.SaveChangesAsync(); var result = await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
@ -289,18 +293,21 @@ namespace IRaCIS.Core.Application.Service
}).ToListAsync(); }).ToListAsync();
if (readingMedicineQuestionList.Count == 0) if (readingMedicineQuestionList.Count == 0)
{ {
throw new BusinessValidationFailedException("当前未添加医学审核问题。请先添加医学审核问题,再进行确认。"); //---当前未添加医学审核问题。请先添加医学审核问题,再进行确认。
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoMedQ"]);
} }
if (readingMedicineQuestionList.Count() != readingMedicineQuestionList.Select(t => t.ShowOrder).Distinct().Count()) if (readingMedicineQuestionList.Count() != readingMedicineQuestionList.Select(t => t.ShowOrder).Distinct().Count())
{ {
throw new BusinessValidationFailedException("影像医学审核问题显示序号不能重复。"); //---影像医学审核问题显示序号不能重复。
throw new BusinessValidationFailedException(_localizer["ReadingMed_MedQNumDup"]);
} }
if (readingMedicineQuestionList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder)) if (readingMedicineQuestionList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder))
{ {
throw new BusinessValidationFailedException("父问题的显示序号要比子问题的显示序号小,请确认。"); //---父问题的显示序号要比子问题的显示序号小,请确认。
throw new BusinessValidationFailedException(_localizer["ReadingMed_ParentNumSmall"]);
} }
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new
@ -316,17 +323,20 @@ namespace IRaCIS.Core.Application.Service
if (criterionInfo.IsGlobalReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Global)) if (criterionInfo.IsGlobalReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Global))
{ {
throw new BusinessValidationFailedException("当前标准启用了全局阅片,但未配置全局医学审核问题"); //---当前标准启用了全局阅片,但未配置全局医学审核问题
throw new BusinessValidationFailedException(_localizer["ReadingMed_GlobalQNotConfig"]);
} }
if (criterionInfo.IsArbitrationReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Judge)) if (criterionInfo.IsArbitrationReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Judge))
{ {
throw new BusinessValidationFailedException("当前标准启用了仲裁阅片,但未配置仲裁医学审核问题"); //---当前标准启用了仲裁阅片,但未配置仲裁医学审核问题
throw new BusinessValidationFailedException(_localizer["ReadingMed_ArbitrateQNotConfig"]);
} }
if (criterionInfo.IsOncologyReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Oncology)) if (criterionInfo.IsOncologyReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Oncology))
{ {
throw new BusinessValidationFailedException("当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题"); //---当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题
throw new BusinessValidationFailedException(_localizer["ReadingMed_TumorQNotConfig"]);
} }
return ResponseOutput.Ok(); return ResponseOutput.Ok();
@ -356,18 +366,21 @@ namespace IRaCIS.Core.Application.Service
}).ToListAsync(); }).ToListAsync();
if (readingMedicineQuestionList.Count == 0) if (readingMedicineQuestionList.Count == 0)
{ {
throw new BusinessValidationFailedException("当前未添加医学审核问题。请先添加医学审核问题,再进行确认。"); //---当前未添加医学审核问题。请先添加医学审核问题,再进行确认。
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoMedQ"]);
} }
if (readingMedicineQuestionList.Count() != readingMedicineQuestionList.Select(t => t.ShowOrder).Distinct().Count()) if (readingMedicineQuestionList.Count() != readingMedicineQuestionList.Select(t => t.ShowOrder).Distinct().Count())
{ {
throw new BusinessValidationFailedException("影像医学审核问题显示序号不能重复。"); //---影像医学审核问题显示序号不能重复。
throw new BusinessValidationFailedException(_localizer["ReadingMed_MedQNumDup"]);
} }
if (readingMedicineQuestionList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder)) if (readingMedicineQuestionList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder))
{ {
throw new BusinessValidationFailedException("父问题的显示序号要比子问题的显示序号小,请确认。"); //---父问题的显示序号要比子问题的显示序号小,请确认。
throw new BusinessValidationFailedException(_localizer["ReadingMed_ParentNumSmall"]);
} }
@ -375,17 +388,20 @@ namespace IRaCIS.Core.Application.Service
if (criterionInfo.IsGlobalReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Global)) if (criterionInfo.IsGlobalReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Global))
{ {
throw new BusinessValidationFailedException("当前项目启用了全局阅片,但未配置全局医学审核问题"); //---当前标准启用了全局阅片,但未配置全局医学审核问题
throw new BusinessValidationFailedException(_localizer["ReadingMed_GlobalQNotConfig"]);
} }
if (criterionInfo.IsArbitrationReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Judge)) if (criterionInfo.IsArbitrationReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Judge))
{ {
throw new BusinessValidationFailedException("当前项目启用了仲裁阅片,但未配置仲裁医学审核问题"); //---当前标准启用了仲裁阅片,但未配置仲裁医学审核问题
throw new BusinessValidationFailedException(_localizer["ReadingMed_ArbitrateQNotConfig"]);
} }
if (criterionInfo.IsOncologyReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Oncology)) if (criterionInfo.IsOncologyReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Oncology))
{ {
throw new BusinessValidationFailedException("当前项目启用了肿瘤学阅片,但未配置肿瘤学医学审核问题"); //---当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题
throw new BusinessValidationFailedException(_localizer["ReadingMed_TumorQNotConfig"]);
} }

Binary file not shown.