添加SiteId
parent
df0f50187e
commit
7dec6bbc1a
|
@ -23,6 +23,8 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string CountryCN { get; set; } = String.Empty;
|
public string CountryCN { get; set; } = String.Empty;
|
||||||
public string ProvinceCN { get; set; } = String.Empty;
|
public string ProvinceCN { get; set; } = String.Empty;
|
||||||
public string CityCN { get; set; } = String.Empty;
|
public string CityCN { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public Guid? SiteId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HospitalQueryDTO : PageInput
|
public class HospitalQueryDTO : PageInput
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -33,6 +34,11 @@ namespace IRaCIS.Application.Services
|
||||||
VerifyMsg = "已经存在同名的医院,请确认。"
|
VerifyMsg = "已经存在同名的医院,请确认。"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (await _hospitalRepository.AnyAsync(x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("当前Site已经添加到其他Hospital了");
|
||||||
|
}
|
||||||
|
|
||||||
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
|
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
|
||||||
|
|
||||||
return ResponseOutput.Ok(hospital.Id.ToString());
|
return ResponseOutput.Ok(hospital.Id.ToString());
|
||||||
|
|
|
@ -26,6 +26,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public DateTime UpdateTime { get; set; } = DateTime.Now;
|
public DateTime UpdateTime { get; set; } = DateTime.Now;
|
||||||
public Guid UpdateUserId { get; set; } = Guid.Empty;
|
public Guid UpdateUserId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 中心Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? SiteId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<Doctor> DoctorList { get; set; }
|
public List<Doctor> DoctorList { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -195,3 +195,13 @@ inner join ReadingMedicineQuestionAnswer on ReadingMedicineQuestionAnswer.TaskMe
|
||||||
update frontAuditConfig set DictionaryCode ='' where Code='AuditState' and DictionaryCode='AuditState'
|
update frontAuditConfig set DictionaryCode ='' where Code='AuditState' and DictionaryCode='AuditState'
|
||||||
|
|
||||||
----正式环境 修改TrialCode 错误的
|
----正式环境 修改TrialCode 错误的
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------2023-1-09
|
||||||
|
|
||||||
|
-- 修改Hospital 的SiteId
|
||||||
|
update Hospital set Hospital.SiteId=Site.Id from Site
|
||||||
|
inner join Hospital on Hospital.HospitalName=Site.SiteName
|
Loading…
Reference in New Issue