提示语国际化修改

This commit is contained in:
he
2024-09-03 15:51:59 +08:00
parent 320ede4d7b
commit 96462aa4ba
9 changed files with 82 additions and 46 deletions
@@ -117,6 +117,18 @@ namespace IRaCIS.Core.Application
throw new BusinessValidationFailedException(_localizer["TrialConfig_JudgeTaskFail"]);
}
var criterionFormType = trialCriterion.FormType;
var count = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
.WhereIf(criterionFormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
.WhereIf(criterionFormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).Count();
if (count == 0)
{
//---当前标准下未配置问题
throw new BusinessValidationFailedException(_localizer["TrialConfig_StdConfigMissing"]);
}
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
{
IsSigned = true,
@@ -505,40 +517,40 @@ namespace IRaCIS.Core.Application
/// <summary>
/// 设置项目阅片标准
/// </summary>
/// <returns></returns>
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> SetTrialReadingCriterion(SetTrialReadingCriterionInDto inDto)
{
if (inDto.IsSignSave)
{
var criterionFormType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.FormType).FirstOrDefaultAsync();
var count = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
.WhereIf(criterionFormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
.WhereIf(criterionFormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).Count();
///// <summary>
///// 设置项目阅片标准
///// </summary>
///// <returns></returns>
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
//public async Task<IResponseOutput> SetTrialReadingCriterion(SetTrialReadingCriterionInDto inDto)
//{
// if (inDto.IsSignSave)
// {
// var criterionFormType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.FormType).FirstOrDefaultAsync();
// var count = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
// .WhereIf(criterionFormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
// .WhereIf(criterionFormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).Count();
if (count == 0)
{
//---当前标准下未配置问题
throw new BusinessValidationFailedException(_localizer["TrialConfig_StdConfigMissing"]);
}
}
// if (count == 0)
// {
// //---当前标准下未配置问题
// throw new BusinessValidationFailedException(_localizer["TrialConfig_StdConfigMissing"]);
// }
// }
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
{
FormType = inDto.FormType,
});
// await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
// {
// FormType = inDto.FormType,
// });
var result = await _trialRepository.SaveChangesAsync();
// var result = await _trialRepository.SaveChangesAsync();
return ResponseOutput.Ok(result);
}
// return ResponseOutput.Ok(result);
//}
/// <summary>
/// 设置项目阅片信息