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
continuous-integration/drone/push Build is passing
Details
commit
a12db2637e
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue