国际化修改

Uat_Study
he 2023-04-25 14:37:10 +08:00
parent 79133ccde8
commit ac2fbc07dd
8 changed files with 101 additions and 28 deletions

View File

@ -51,6 +51,30 @@
//Repository
"Repository_UpdateError": "Updated data does not exist in the database. ",
"Repository_DeleteError": "Deleted data does not exist in the database.",
//OrganInfoService
"OrganInfo_DuplicateData": "There are duplicate data, operation failed.",
//ReadingCriterionService
"ReadingCriterion_Referenced": "The current standard has been referenced and cannot be deleted.",
"ReadingCriterion_InUse": "This standard has been used in the project and cannot be deleted.",
"ReadingCriterion_ArbitratorWithoutJudgment": "There is no referee problem but there is an arbitration object, operation failed.",
//ReadingQuestionService
"ReadingQuestion_IdDup": "Duplicate problem ID.",
"ReadingQuestion_ChildrenExist": "This problem has sub-problems, please delete the sub-problems first.",
"ReadingQuestion_GroupReferenced": "This grouping has been referenced, please delete the referenced problems first.",
"ReadingQuestion_JudgmentSet": "The current problem already has a referee standard set, modification failed.",
"ReadingQuestion_ExcludeWithDependency": "The displayed dependent parent problem and the required dependent problem are the same, but the answers are mutually exclusive, operation failed.",
"ReadingQuestion_CircularDependency": "Calculation dependency has looped!",
//ReadingPeriodSetService
"ReadingPeriodSet_AlreadyAdded": "{0} has already added the review period, cannot set it effective.",
"ReadingPeriodSet_TaskCompletedCannotRevoke": "The current standard review has generated tasks and the review is completed, revoke failed.",
"ReadingPeriodSet_LastVisit": "Last visit.",
//ReadModuleService
"ReadModule_AlreadyAdded": "The current visit has already added a review period.",
"ReadModule_AddGlobalFirst": "Please add global review first.",
"ReadModule_VisitNotFound": "No visits found that meet the criteria.",
"ReadModule_SignedDataCannotDelete": "Clinical data has been signed and cannot be deleted.",
"ReadModule_TumorExists": "The current visit has a tumor review, please delete the tumor review first.",
"ReadModule_TaskGenerated": "The current review has generated tasks, operation failed.",
// ------------------------------------------------------------Allocation--------------------------------------------------------------------

View File

@ -50,6 +50,30 @@
//Repository
"Repository_UpdateError": "修改的数据在数据库不存在。",
"Repository_DeleteError": "删除的数据在数据库不存在。",
//OrganInfoService
"OrganInfo_DuplicateData": "存在相同的数据,操作失败",
//ReadingCriterionService
"ReadingCriterion_Referenced": "当前标准被引用过了,不可以删除",
"ReadingCriterion_InUse": "此标准在项目里面已被使用,操作失败",
"ReadingCriterion_ArbitratorWithoutJudgment": "无裁判问题却有仲裁对象,操作失败",
//ReadingQuestionService
"ReadingQuestion_IdDup": "问题编号重复",
"ReadingQuestion_ChildrenExist": "此问题存在子问题,请先删除子问题",
"ReadingQuestion_GroupReferenced": "此分组已被引用,请先删除被引用的问题",
"ReadingQuestion_JudgmentSet": "当前问题已经设置了裁判标准了,修改失败",
"ReadingQuestion_ExcludeWithDependency": "显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败",
"ReadingQuestion_CircularDependency": "计算依赖循环了!",
//ReadingPeriodSetService
"ReadingPeriodSet_AlreadyAdded": "{0}已经添加过阅片期,无法设置生效",
"ReadingPeriodSet_TaskCompletedCannotRevoke": "当前标准阅片已生成任务并且阅片完成,撤销失败。",
"ReadingPeriodSet_LastVisit": "末次访视",
//ReadModuleService
"ReadModule_AlreadyAdded": "当前访视已经添加过阅片期",
"ReadModule_AddGlobalFirst": "请先添加全局阅片",
"ReadModule_VisitNotFound": "未找到符合要求的访视",
"ReadModule_SignedDataCannotDelete": "临床资料已签名,不允许删除",
"ReadModule_TumorExists": "当前访视存在肿瘤学阅片,请先删除肿瘤学阅片",
"ReadModule_TaskGenerated": "当前阅片已生成任务,操作失败。",
// ------------------------------------------------------------Allocation--------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2022-08-12 14:07:20
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
@ -372,7 +372,8 @@ namespace IRaCIS.Core.Application.Service
if (await _criterionNidusRepository.AnyAsync(x => x.OrganType == inDto.OrganType && x.LesionType == inDto.LesionType && x.CriterionId == inDto.CriterionId && x.Id != inDto.Id))
{
throw new BusinessValidationFailedException("存在相同的数据,操作失败");
//---存在相同的数据,操作失败
throw new BusinessValidationFailedException(_localizer["OrganInfo_DuplicateData"]);
}
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(inDto, true);

View File

@ -313,7 +313,8 @@ namespace IRaCIS.Core.Application.Service.RC
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
{
throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
//---当前标准被引用过了,不可以删除
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_Referenced"]);
}
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
@ -336,7 +337,8 @@ namespace IRaCIS.Core.Application.Service.RC
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
{
return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
//---此标准在项目里面已被使用,操作失败
return ResponseOutput.NotOk(_localizer["ReadingCriterion_InUse"]);
}
}
@ -476,7 +478,8 @@ namespace IRaCIS.Core.Application.Service.RC
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
{
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
//---无裁判问题却有仲裁对象,操作失败
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_ArbitratorWithoutJudgment"]);
}
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
{

View File

@ -285,7 +285,8 @@ namespace IRaCIS.Application.Services
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionCriterionSystemId == indto.ReadingQuestionCriterionSystemId))
{
throw new BusinessValidationFailedException("问题编号重复");
//---问题编号重复
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
}
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
return ResponseOutput.Ok(entity.Id.ToString());
@ -302,12 +303,14 @@ namespace IRaCIS.Application.Services
{
if (await _readingQuestionSystemRepository.AnyAsync(x => x.ParentId == id))
{
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
//---此问题存在子问题,请先删除子问题
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
}
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
{
return ResponseOutput.NotOk("此分组已被引用,请先删除被引用的问题");
//---此分组已被引用,请先删除被引用的问题
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
}
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
@ -387,7 +390,8 @@ namespace IRaCIS.Application.Services
{
if (await _readingTableQuestionSystemRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
{
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
//---此问题存在子问题,请先删除子问题
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
}
await _readingTableQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == Id);
@ -411,19 +415,22 @@ namespace IRaCIS.Application.Services
{
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None))
{
throw new BusinessValidationFailedException("当前问题已经设置了裁判标准了,修改失败");
//---当前问题已经设置了裁判标准了,修改失败
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);
}
}
if (indto.ParentId == indto.RelevanceId && indto.ParentId != null && indto.ParentTriggerValue != indto.RelevanceValue)
{
throw new BusinessValidationFailedException("显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败");
//---显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_ExcludeWithDependency"]);
}
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.TrialId == indto.TrialId && x.ReadingQuestionCriterionTrialId == indto.ReadingQuestionCriterionTrialId && x.ReadingCriterionPageId == indto.ReadingCriterionPageId))
{
throw new BusinessValidationFailedException("问题编号重复");
//---问题编号重复
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
}
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
@ -485,14 +492,16 @@ namespace IRaCIS.Application.Services
// 防止有脏数据 循环验证 最多10000次
if (count >= 10000)
{
throw new BusinessValidationFailedException("计算依赖循环了!");
//---计算依赖循环了!
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
}
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
{
throw new BusinessValidationFailedException("计算依赖循环了!");
//---计算依赖循环了!
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
}
else
@ -590,12 +599,14 @@ namespace IRaCIS.Application.Services
{
if (await _readingQuestionTrialRepository.AnyAsync(x => x.ParentId == id))
{
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
//---此问题存在子问题,请先删除子问题
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
}
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
{
return ResponseOutput.NotOk("此分组已被引用,请先删除引用的问题");
//---此分组已被引用,请先删除被引用的问题
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
}
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
@ -686,7 +697,8 @@ namespace IRaCIS.Application.Services
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId==indto.ReadingQuestionId))
{
throw new BusinessValidationFailedException("问题编号重复");
//---问题编号重复
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
}
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
@ -737,7 +749,8 @@ namespace IRaCIS.Application.Services
{
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
{
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
//---此问题存在子问题,请先删除子问题
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
}
await _readingTableQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == Id);
@ -1515,4 +1528,4 @@ namespace IRaCIS.Application.Services
}
}
}

View File

@ -272,7 +272,8 @@ namespace IRaCIS.Application.Services
if (await _readModuleRepository.AnyAsync(x => x.SubjectVisitId == visit.Id&&x.ModuleType== moduleType && x.TrialReadingCriterionId == dto.TrialReadingCriterionId))
{
throw new BusinessValidationFailedException($"当前访视已经添加过阅片期");
//---当前访视已经添加过阅片期
throw new BusinessValidationFailedException(_localizer["ReadModule_AlreadyAdded"]);
}
var readModuleData = new ReadModule()
{
@ -383,7 +384,8 @@ namespace IRaCIS.Application.Services
}
else
{
return ResponseOutput.NotOk("请先添加全局阅片");
//---请先添加全局阅片
return ResponseOutput.NotOk(_localizer["ReadModule_AddGlobalFirst"]);
}
break;
}
@ -392,7 +394,8 @@ namespace IRaCIS.Application.Services
}
else
{
return ResponseOutput.NotOk("未找到符合要求的访视");
//---未找到符合要求的访视
return ResponseOutput.NotOk(_localizer["ReadModule_VisitNotFound"]);
}
@ -416,18 +419,21 @@ namespace IRaCIS.Application.Services
if(await _repository.Where<ReadingClinicalData>(t => t.ReadingId == readModuleId).AnyAsync(t => t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned))
{
return ResponseOutput.NotOk("临床资料已签名,不允许删除");
//---临床资料已签名,不允许删除
return ResponseOutput.NotOk(_localizer["ReadModule_SignedDataCannotDelete"]);
}
//增加标准
if (readModule.ModuleType==ModuleTypeEnum.Global&&(await _readModuleRepository.AnyAsync(x=>x.ModuleType==ModuleTypeEnum.Oncology&&x.SubjectVisitId== readModule.SubjectVisitId && x.TrialReadingCriterionId==readModule.TrialReadingCriterionId)))
{
throw new BusinessValidationFailedException("当前访视存在肿瘤学阅片,请先删除肿瘤学阅片");
//---当前访视存在肿瘤学阅片,请先删除肿瘤学阅片
throw new BusinessValidationFailedException(_localizer["ReadModule_TumorExists"]);
}
if (await _visitTaskRepository.AnyAsync(x => readModuleId==x.SouceReadModuleId))
{
throw new BusinessValidationFailedException("当前阅片已生成任务,操作失败。");
//---当前阅片已生成任务,操作失败。
throw new BusinessValidationFailedException(_localizer["ReadModule_TaskGenerated"]);
}

View File

@ -166,7 +166,7 @@ namespace IRaCIS.Application.Services
var repeatVisitNames = _readModuleRepository.Where(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && x.ReadingSetType == readingPeriodSet.ReadingSetType && needAddVisitIds.Contains(x.SubjectVisitId)).Select(x => x.Subject.Code + "的" + x.SubjectVisit.VisitName).ToList();
if (repeatVisitNames.Count != 0)
{
return ResponseOutput.NotOk($"{string.Join(",", repeatVisitNames)}已经添加过阅片期,无法设置生效");
return ResponseOutput.NotOk(_localizer["ReadingPeriodSet_AlreadyAdded", string.Join(",", repeatVisitNames)]);
}
List<ReadModule> readModules = new List<ReadModule>();
foreach (var item in plans)
@ -307,7 +307,8 @@ namespace IRaCIS.Application.Services
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect))
{
throw new BusinessValidationFailedException("当前标准阅片已生成任务并且阅片完成,撤销失败。");
//---当前标准阅片已生成任务并且阅片完成,撤销失败。
throw new BusinessValidationFailedException(_localizer["ReadingPeriodSet_TaskCompletedCannotRevoke"]);
}
@ -422,7 +423,8 @@ namespace IRaCIS.Application.Services
pageList.CurrentPageData.ForEach(x =>
{
x.SubjectVisitName = x.IsGlobal ? "末次访视" : x.SubjectVisitName;
//---末次访视
x.SubjectVisitName = x.IsGlobal ? _localizer["ReadingPeriodSet_LastVisit"] : x.SubjectVisitName;
});
return pageList;
}

Binary file not shown.