Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2025-03-11 15:37:18 +08:00
commit a12db2637e
2 changed files with 7 additions and 9 deletions

View File

@ -11,6 +11,7 @@ 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>
@ -59,16 +60,11 @@ 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))
var verifyExp = new EntityVerifyExp<TrialFinalRecord>()
{ {
VerifyExp = u => u.Name == inDto.Name, throw new BusinessValidationFailedException(_localizer["TrialFinalRecord_NameRepeat"]);
}
// "当前类型启用的文件类型名称重复"
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();

View File

@ -150,7 +150,9 @@ namespace IRaCIS.Core.Application.Services
{ {
var list = _siteRepository var list = _siteRepository
.WhereIf(!string.IsNullOrWhiteSpace(siteName), t => t.SiteName.Contains(siteName) || t.SiteNameCN.Contains(siteName) || t.AliasName.Contains(siteName)) .WhereIf(!string.IsNullOrWhiteSpace(siteName), t => t.SiteName.Contains(siteName) || t.SiteNameCN.Contains(siteName) || t.AliasName.Contains(siteName))
.Select(t => new TrialSiteSelect() { SiteId = t.Id, SiteName = _userInfo.IsEn_Us ? t.SiteName : t.SiteNameCN, AliasName = t.AliasName }).ToList(); .Select(t => new TrialSiteSelect() { SiteId = t.Id, SiteName = _userInfo.IsEn_Us ? t.SiteName : t.SiteNameCN, AliasName = t.AliasName })
.OrderBy(x=>x.SiteName)
.ToList();
return list; return list;
} }