国际化修改
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
+27
-14
@@ -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
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user