修改一版

Uat_Study
he 2022-08-04 16:17:10 +08:00
parent 43c770921c
commit c1e4ec0b5e
1 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,12 @@ namespace IRaCIS.Core.Application.Contracts
public async Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
{
if (await _qcQuestionRepository.AnyAsync(x => x.Id != addOrEditQCQuestionConfigure.Id && x.ShowOrder == addOrEditQCQuestionConfigure.ShowOrder))
{
throw new BusinessValidationFailedException("序号重复,操作失败");
}
var entity = await _qcQuestionRepository.InsertOrUpdateAsync(addOrEditQCQuestionConfigure, true);
return ResponseOutput.Ok(entity.Id.ToString());
}