修改一版

Uat_Study
he 2022-07-18 09:11:09 +08:00
parent 50db94962e
commit fee18e4295
2 changed files with 17 additions and 0 deletions

View File

@ -654,6 +654,8 @@ namespace IRaCIS.Core.Application.Contracts
/// 修约小数点 /// 修约小数点
/// </summary> /// </summary>
public int? DigitPlaces { get; set; } public int? DigitPlaces { get; set; }
public bool IsSignSave { get; set; } = false;
} }
public class SetTrialReadingInfoInDto public class SetTrialReadingInfoInDto

View File

@ -161,6 +161,21 @@ namespace IRaCIS.Core.Application
/// <returns></returns> /// <returns></returns>
public async Task<IResponseOutput> SetTrialReadingCriterion(SetTrialReadingCriterionInDto inDto) public async Task<IResponseOutput> SetTrialReadingCriterion(SetTrialReadingCriterionInDto inDto)
{ {
if (inDto.IsSignSave)
{
var criterionFormType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialCriterionId).Select(x => x.FormType).FirstOrDefaultAsync();
var count = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
.WhereIf(criterionFormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
.WhereIf(criterionFormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).Count();
if (count == 0)
{
throw new BusinessValidationFailedException("当前标准下未配置问题");
}
}
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialCriterionId, x => new ReadingQuestionCriterionTrial() await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialCriterionId, x => new ReadingQuestionCriterionTrial()
{ {