修改一版
parent
50db94962e
commit
fee18e4295
|
@ -654,6 +654,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// 修约小数点
|
||||
/// </summary>
|
||||
public int? DigitPlaces { get; set; }
|
||||
|
||||
public bool IsSignSave { get; set; } = false;
|
||||
}
|
||||
|
||||
public class SetTrialReadingInfoInDto
|
||||
|
|
|
@ -161,6 +161,21 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
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()
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue