修改site 代码
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
443b94b332
commit
824b165723
|
@ -29,6 +29,8 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string DirectorPhone { get; set; } = string.Empty;
|
public string DirectorPhone { get; set; } = string.Empty;
|
||||||
public string ContactName { get; set; } = string.Empty;
|
public string ContactName { get; set; } = string.Empty;
|
||||||
public string ContactPhone { get; set; } = string.Empty;
|
public string ContactPhone { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public Guid? TrialSiteId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SiteSelectionDTO
|
public class SiteSelectionDTO
|
||||||
|
@ -44,6 +46,17 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string Country { get; set; } = String.Empty;
|
public string Country { get; set; } = String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TrialSiteAddView
|
||||||
|
{
|
||||||
|
public Guid TrialSiteId { get; set; }
|
||||||
|
public string TrialCode { get; set; }
|
||||||
|
|
||||||
|
public string TrialSiteName { get; set; }
|
||||||
|
|
||||||
|
public string TrialSiteAliasName { get; set; } = String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
public class SiteSelectDTO : SiteDTO
|
public class SiteSelectDTO : SiteDTO
|
||||||
{
|
{
|
||||||
public string HospitalName { get; set; } = String.Empty;
|
public string HospitalName { get; set; } = String.Empty;
|
||||||
|
|
|
@ -5,6 +5,8 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using System.Security.Policy;
|
||||||
|
using Site = IRaCIS.Core.Domain.Models.Site;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -49,6 +51,17 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<List<TrialSiteAddView>> GetTrialSiteList()
|
||||||
|
{
|
||||||
|
return _repository.Where<TrialSite>(t => t.SiteId == null).Select(t => new TrialSiteAddView()
|
||||||
|
{
|
||||||
|
TrialCode = t.Trial.TrialCode,
|
||||||
|
TrialSiteAliasName = t.TrialSiteAliasName,
|
||||||
|
TrialSiteId = t.Id,
|
||||||
|
TrialSiteName = t.TrialSiteName
|
||||||
|
}).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary> 添加研究中心 </summary>
|
/// <summary> 添加研究中心 </summary>
|
||||||
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateSite(SiteCommand siteCommand)
|
public async Task<IResponseOutput> AddOrUpdateSite(SiteCommand siteCommand)
|
||||||
|
@ -56,7 +69,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var exp = new EntityVerifyExp<Site>()
|
var exp = new EntityVerifyExp<Site>()
|
||||||
{
|
{
|
||||||
VerifyExp = h => h.SiteName.Equals(siteCommand.SiteName) || h.SiteCode.Equals(siteCommand.SiteCode),
|
VerifyExp = h => h.SiteName.Equals(siteCommand.SiteName) || h.SiteNameCN.Equals(siteCommand.SiteNameCN),
|
||||||
//---已经存在同名的中心,请确认。
|
//---已经存在同名的中心,请确认。
|
||||||
VerifyMsg = _localizer["Site_DupName"]
|
VerifyMsg = _localizer["Site_DupName"]
|
||||||
};
|
};
|
||||||
|
@ -87,10 +100,17 @@ namespace IRaCIS.Application.Services
|
||||||
await _hospitalRepository.BatchUpdateNoTrackingAsync(t => t.Id == siteCommand.HospitalId, u => new Hospital() { SiteId = site.Id });
|
await _hospitalRepository.BatchUpdateNoTrackingAsync(t => t.Id == siteCommand.HospitalId, u => new Hospital() { SiteId = site.Id });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (siteCommand.TrialSiteId != null)
|
||||||
|
{
|
||||||
|
await _repository.BatchUpdateAsync<TrialSite>(t => t.Id == siteCommand.TrialSiteId, u => new TrialSite() { SiteId = site.Id });
|
||||||
|
}
|
||||||
|
|
||||||
return ResponseOutput.Ok(site.Id.ToString());
|
return ResponseOutput.Ok(site.Id.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 删除研究中心 </summary>
|
/// <summary> 删除研究中心 </summary>
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
||||||
|
|
||||||
public string UserKeyInfo { get; set; } = String.Empty;
|
public string UserKeyInfo { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SiteCRCExportQueryDTO
|
public class SiteCRCExportQueryDTO
|
||||||
|
|
Loading…
Reference in New Issue