IRC_NewDev
parent
71d128a325
commit
2f1df92dc3
|
@ -1920,6 +1920,20 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSuvMaxFocus(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
SuvMax所在病灶
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSuvMax(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
最大sum
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetImgOncology(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
影像学整体肿瘤评估
|
||||
|
@ -4204,6 +4218,11 @@
|
|||
病灶类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.QuestionInfo.OrderMark">
|
||||
<summary>
|
||||
序号标记
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionInfo.Answer">
|
||||
<summary>
|
||||
答案
|
||||
|
@ -5054,6 +5073,21 @@
|
|||
MeasureData
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.QuestionMarkInfo.OtherInstanceId">
|
||||
<summary>
|
||||
InstanceId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.QuestionMarkInfo.OtherSeriesId">
|
||||
<summary>
|
||||
SeriesId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.QuestionMarkInfo.OtherStudyId">
|
||||
<summary>
|
||||
StudyId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingQuestionAndAnswerInDto.QuestionClassify">
|
||||
<summary>
|
||||
问题分类
|
||||
|
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// 标记工具
|
||||
/// </summary>
|
||||
public string? MarkTool { get; set; }
|
||||
public string MarkTool { get; set; } = string.Empty;
|
||||
|
||||
public decimal RowIndex { get; set; }
|
||||
public decimal RowIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 截图地址
|
||||
/// </summary>
|
||||
public string? PicturePath { get; set; }
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
|
@ -1946,9 +1946,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
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;
|
||||
|
||||
|
|
|
@ -2061,7 +2061,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
else
|
||||
{
|
||||
await _readingTableAnswerRowInfoRepository.UpdateFromDTOAsync(inDto) ;
|
||||
await _readingTableAnswerRowInfoRepository.NotUpdateEmptyAsync(inDto) ;
|
||||
|
||||
|
||||
foreach (var item in inDto.AnswerList)
|
||||
|
|
|
@ -21,6 +21,18 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
Task<TEntity> UpdateFromDTOAsync<TFrom>(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp<TEntity>[] verify);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 空和Empty不更新
|
||||
/// </summary>
|
||||
/// <typeparam name="TFrom"></typeparam>
|
||||
/// <param name="from"></param>
|
||||
/// <param name="autoSave"></param>
|
||||
/// <param name="ignoreDtoNullProperty"></param>
|
||||
/// <param name="verify"></param>
|
||||
/// <returns></returns>
|
||||
Task<TEntity> NotUpdateEmptyAsync<TFrom>(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp<TEntity>[] verify);
|
||||
|
||||
|
||||
|
||||
#region EF 跟踪方式删除 (先查询完整实体,再删除)
|
||||
|
||||
|
|
|
@ -139,6 +139,48 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
}
|
||||
|
||||
|
||||
public async Task<TEntity> NotUpdateEmptyAsync<TFrom>(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp<TEntity>[] verify)
|
||||
{
|
||||
|
||||
var entity = _mapper.Map<TEntity>(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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary> EF跟踪方式 生成 部分字段更新, 跟踪的实体仅有修改的属性的值有具体意义,没有从数据库查询完整的实体</summary>
|
||||
|
||||
|
|
Loading…
Reference in New Issue