Merge branch 'Test.IRC' of http://192.168.3.69:3000/XCKJ/irc-netcore-api into Test.IRC

IRC_NewDev
he 2023-10-09 10:47:54 +08:00
commit 7591f19707
5 changed files with 43 additions and 13 deletions

View File

@ -6799,6 +6799,16 @@
分组 分组
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.ClassifyAlgorithms">
<summary>
分类算法
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.ClassifyQuestionId">
<summary>
分类问题Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.GlobalReadingShowType"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.GlobalReadingShowType">
<summary> <summary>
全局阅片显示类型 全局阅片显示类型
@ -7544,6 +7554,16 @@
Id Id
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.ClassifyAlgorithms">
<summary>
分类算法
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.ClassifyQuestionId">
<summary>
分类问题Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.IsCopyLesions"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.IsCopyLesions">
<summary> <summary>
是否复制病灶 是否复制病灶

View File

@ -214,6 +214,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
foreach (var instanceItem in seriesItem.InstanceList) foreach (var instanceItem in seriesItem.InstanceList)
{ {
var isntance = _mapper.Map<DicomInstance>(instanceItem); var isntance = _mapper.Map<DicomInstance>(instanceItem);
Guid instanceId = IdentifierHelper.CreateGuid(study.StudyInstanceUid, series.SeriesInstanceUid, isntance.SopInstanceUid, study.TrialId.ToString());
isntance.Id = instanceId;
isntance.StudyId = study.Id; isntance.StudyId = study.Id;
isntance.SeriesId = series.Id; isntance.SeriesId = series.Id;
@ -237,7 +241,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
var study = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == studyId); var study = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
//_mapper.Map(incommand.Study, study);
//特殊处理逻辑 //特殊处理逻辑
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct()); study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
@ -762,7 +765,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}")) if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}"))
{ {
result.AllowUpload = false; result.AllowUpload = false;
result.AllowReUpload = false; result.AllowReUpload = false;
@ -831,6 +834,13 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30)); _provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
} }
} }
else
{
lock (lockObj)
{
_provider.Remove($"StudyUid_{trialId}_{studyInstanceUid}");
}
}
return result; return result;
} }

View File

@ -27,7 +27,7 @@ namespace IRaCIS.Application.Services
{ {
var siteQueryable = _siteRepository var siteQueryable = _siteRepository
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName) || t.SiteNameCN.Contains(searchModel.SiteName))
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName))
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City))
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country))

View File

@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Services
var siteQueryable = _siteRepository.AsQueryable(true) var siteQueryable = _siteRepository.AsQueryable(true)
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName) || t.SiteNameCN.Contains(searchModel.SiteName))
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName))
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City))
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country))

View File

@ -542,54 +542,54 @@ namespace IRaCIS.Core.Infra.EFCore
} }
catch (UniqueConstraintException ex) catch (UniqueConstraintException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null? ex.Message :ex.InnerException?.Message);
throw new DBSaveFailedException("该唯一键已经存在于数据库中。"); throw new DBSaveFailedException("该唯一键已经存在于数据库中。");
} }
catch (TimeoutException ex) catch (TimeoutException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("数据库操作已经超时,请稍后重试。"); throw new DBSaveFailedException("数据库操作已经超时,请稍后重试。");
} }
catch (CannotInsertNullException ex) catch (CannotInsertNullException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("无法在非空列上插入空值。"); throw new DBSaveFailedException("无法在非空列上插入空值。");
} }
catch (MaxLengthExceededException ex) catch (MaxLengthExceededException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("字符串超过了数据库列的最大长度。"); throw new DBSaveFailedException("字符串超过了数据库列的最大长度。");
} }
catch (NumericOverflowException ex) catch (NumericOverflowException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("数值超过了数据类型的范围。"); throw new DBSaveFailedException("数值超过了数据类型的范围。");
} }
catch (SyntaxErrorException ex) catch (SyntaxErrorException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("SQL 查询中存在语法错误。"); throw new DBSaveFailedException("SQL 查询中存在语法错误。");
} }
catch (ReferenceConstraintException ex) catch (ReferenceConstraintException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("无法进行当前操作,当前数据不符合外键约束。"); throw new DBSaveFailedException("无法进行当前操作,当前数据不符合外键约束。");
} }
catch (DbUpdateConcurrencyException ex) catch (DbUpdateConcurrencyException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.InnerException is null ? ex.Message : ex.InnerException?.Message);
throw new DBSaveFailedException("SQL 事务失败,请检查环境。"); throw new DBSaveFailedException("SQL 事务失败,请检查环境。");
} }
} }
public async Task AddAudit() public async Task AddAudit()