获取下拉的Id

Uat_Study
he 2022-06-10 13:14:56 +08:00
parent c1ee98f994
commit 8f67b47b8c
2 changed files with 14 additions and 0 deletions

View File

@ -175,6 +175,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public string ClinicalDataSetName { get; set; }
/// <summary>
/// 下拉ID
/// </summary>
public Guid ClinicalDataTrialSetId { get; set; }
/// <summary>
/// 临床级别
/// </summary>

View File

@ -46,6 +46,15 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> AddOrUpdateReadingClinicalData(AddOrUpdateReadingClinicalDataDto indto)
{
var existsQuery = _readingClinicalDataRepository
.WhereIf(indto.Id != null,x=>x.Id!=indto.Id)
.Where(x => x.ClinicalDataTrialSetId == indto.ClinicalDataTrialSetId&&x.ReadingId==indto.ReadingId);
if (await existsQuery.AnyAsync())
{
ResponseOutput.NotOk("存在同类型的临床数据");
}
var clinicalDataTrialSet = (await _clinicalDataTrialSetRepository.Where(x => x.Id == indto.ClinicalDataTrialSetId).FirstOrDefaultAsync()).IfNullThrowException();
if (indto.Id == null)
{