Compare commits
No commits in common. "41828096578b4d25daa067cbd0b8e99e37d259d7" and "d921a48a091853e3465924ce3ae26e565d89a767" have entirely different histories.
4182809657
...
d921a48a09
|
|
@ -11,7 +11,6 @@ using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
using IRaCIS.Core.Infrastructure;
|
|
||||||
namespace IRaCIS.Core.Application.Service;
|
namespace IRaCIS.Core.Application.Service;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -60,11 +59,16 @@ public class TrialFinalRecordService(IRepository<TrialFinalRecord> _trialFinalRe
|
||||||
if (inDto.HistoryFileRecord != null) inDto.HistoryFileRecord.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))
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException(_localizer["TrialFinalRecord_NameRepeat"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
var verifyExp = new EntityVerifyExp<TrialFinalRecord>()
|
||||||
|
{
|
||||||
|
VerifyExp = u => u.Name == inDto.Name,
|
||||||
|
|
||||||
|
// "当前类型启用的文件类型名称重复"
|
||||||
|
VerifyMsg = _localizer["TrialFileType_NameRepeat"],
|
||||||
|
|
||||||
|
};
|
||||||
if (inDto.Id != null)
|
if (inDto.Id != null)
|
||||||
{
|
{
|
||||||
var trialFinalRecord = await _trialFinalRecordRepository.Where(x => x.Id == inDto.Id.Value).FirstNotNullAsync();
|
var trialFinalRecord = await _trialFinalRecordRepository.Where(x => x.Id == inDto.Id.Value).FirstNotNullAsync();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue