Compare commits

..

No commits in common. "41828096578b4d25daa067cbd0b8e99e37d259d7" and "d921a48a091853e3465924ce3ae26e565d89a767" have entirely different histories.

1 changed files with 8 additions and 4 deletions

View File

@ -11,7 +11,6 @@ using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infrastructure.Extention;
using System.Threading.Tasks;
using IRaCIS.Core.Infra.EFCore;
using IRaCIS.Core.Infrastructure;
namespace IRaCIS.Core.Application.Service;
/// <summary>
@ -59,12 +58,17 @@ public class TrialFinalRecordService(IRepository<TrialFinalRecord> _trialFinalRe
if (inDto.SignFileRecord != null) inDto.SignFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
if (inDto.HistoryFileRecord != null) inDto.HistoryFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
if (await _trialFinalRecordRepository.AnyAsync(x => x.Id != inDto.Id && x.TrialFileTypeId == inDto.TrialFileTypeId && x.Name == inDto.Name && x.Version == inDto.Version))
var verifyExp = new EntityVerifyExp<TrialFinalRecord>()
{
throw new BusinessValidationFailedException(_localizer["TrialFinalRecord_NameRepeat"]);
}
VerifyExp = u => u.Name == inDto.Name,
// "当前类型启用的文件类型名称重复"
VerifyMsg = _localizer["TrialFileType_NameRepeat"],
};
if (inDto.Id != null)
{
var trialFinalRecord = await _trialFinalRecordRepository.Where(x => x.Id == inDto.Id.Value).FirstNotNullAsync();