diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 6748b0f47..f1fecf227 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1920,6 +1920,20 @@
+
+
+ SuvMax所在病灶
+
+
+
+
+
+
+ 最大sum
+
+
+
+
影像学整体肿瘤评估
@@ -4204,6 +4218,11 @@
病灶类型
+
+
+ 序号标记
+
+
答案
@@ -5054,6 +5073,21 @@
MeasureData
+
+
+ InstanceId
+
+
+
+
+ SeriesId
+
+
+
+
+ StudyId
+
+
问题分类
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 3f0d437b6..49a95a23e 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -1920,21 +1920,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public int? NumberOfFrames { get; set; }
- public string? FromMark { get; set; }
+ public string FromMark { get; set; } = string.Empty;
- public string? ReportMark { get; set; }
+ public string ReportMark { get; set; } = string.Empty;
///
/// 标记工具
///
- public string? MarkTool { get; set; }
+ public string MarkTool { get; set; } = string.Empty;
- public decimal RowIndex { get; set; }
+ public decimal RowIndex { get; set; }
///
/// 截图地址
///
- public string? PicturePath { get; set; }
+ public string PicturePath { get; set; } = string.Empty;
///
/// 任务Id
@@ -1946,9 +1946,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public Guid TrialId { get; set; }
- public string? MeasureData { get; set; }
+ public string MeasureData { get; set; } = string.Empty;
- public string? OtherMeasureData { get; set; } = string.Empty;
+ public string? OtherMeasureData { get; set; } = string.Empty;
public Guid? SeriesId { get; set; }
@@ -1966,7 +1966,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
}
- public bool? IsCanEditPosition { get; set; } = false;
+ public bool IsCanEditPosition { get; set; } = false;
public decimal FristAddTaskNum { get; set; } = 0;
@@ -1974,7 +1974,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public decimal? WL { get; set; }
- public string? BlindName { get; set; } = string.Empty;
+ public string BlindName { get; set; } = string.Empty;
public bool IsDicomReading { get; set; } = true;
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
index 2ca550a89..6989cbb3c 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
@@ -2061,7 +2061,7 @@ namespace IRaCIS.Application.Services
else
{
- await _readingTableAnswerRowInfoRepository.UpdateFromDTOAsync(inDto) ;
+ await _readingTableAnswerRowInfoRepository.NotUpdateEmptyAsync(inDto) ;
foreach (var item in inDto.AnswerList)
diff --git a/IRaCIS.Core.Infra.EFCore/Repository/ICommandRepository.cs b/IRaCIS.Core.Infra.EFCore/Repository/ICommandRepository.cs
index 7819e228d..20a7c1836 100644
--- a/IRaCIS.Core.Infra.EFCore/Repository/ICommandRepository.cs
+++ b/IRaCIS.Core.Infra.EFCore/Repository/ICommandRepository.cs
@@ -21,6 +21,18 @@ namespace IRaCIS.Core.Infra.EFCore
Task UpdateFromDTOAsync(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp[] verify);
+ ///
+ /// 空和Empty不更新
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task NotUpdateEmptyAsync(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp[] verify);
+
+
#region EF 跟踪方式删除 (先查询完整实体,再删除)
diff --git a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs
index 1309ce19f..b61540bf4 100644
--- a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs
+++ b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs
@@ -139,6 +139,48 @@ namespace IRaCIS.Core.Infra.EFCore
}
+ public async Task NotUpdateEmptyAsync(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp[] verify)
+ {
+
+ var entity = _mapper.Map(from);
+
+ //await EntityVerifyAsync(false, verify, entity.Id);
+
+ await _dbContext.EntityVerifyAsync(false, verify, entity.Id);
+
+ var dbEntity = await _dbSet.IgnoreQueryFilters().FirstOrDefaultAsync(t => t.Id == entity.Id).ConfigureAwait(false);
+
+ if (dbEntity == null)
+ {
+
+ throw new BusinessValidationFailedException(_localizer["Repository_UpdateError"]);
+ }
+
+ var dbBeforEntity = dbEntity.Clone();
+
+
+ _mapper.Map(from, dbEntity);
+
+
+ //为null 或者 string.empty 不更新
+ if (ignoreDtoNullProperty)
+ {
+ var dbEntityProp = typeof(TEntity).GetProperties();
+ foreach (var propertyInfo in from.GetType().GetProperties())
+ {
+ if ((propertyInfo.GetValue(from) == null|| propertyInfo.GetValue(from).ToString()==string.Empty) && dbEntityProp.Any(t => t.Name == propertyInfo.Name))
+ {
+ _dbContext.Entry(dbEntity).Property(propertyInfo.Name).IsModified = false;
+ }
+ }
+ }
+
+ await SaveChangesAsync(autoSave);
+
+
+ return dbBeforEntity;
+ }
+
/// EF跟踪方式 生成 部分字段更新, 跟踪的实体仅有修改的属性的值有具体意义,没有从数据库查询完整的实体