修改一版
parent
43c770921c
commit
c1e4ec0b5e
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue