修改
This commit is contained in:
@@ -311,7 +311,127 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class CopyTableAnswerRowInfo : ReadingTableAnswerRowInfo
|
||||
public class ReadingTableAnswerRowInfoBase
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第一层的Question
|
||||
/// </summary>
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// VisitTaskId
|
||||
/// </summary>
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TrialId
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// InstanceId
|
||||
/// </summary>
|
||||
public Guid? InstanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SeriesId
|
||||
/// </summary>
|
||||
public Guid? SeriesId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// StudyId
|
||||
/// </summary>
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
public bool IsCanEditPosition { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是Dicom阅片
|
||||
/// </summary>
|
||||
public bool IsDicomReading { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// RowIndex
|
||||
/// </summary>
|
||||
public decimal RowIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MeasureData
|
||||
/// </summary>
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是当前任务添加
|
||||
/// </summary>
|
||||
public bool IsCurrentTaskAdd { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SplitRowId
|
||||
/// </summary>
|
||||
public Guid? SplitRowId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MergeRowId
|
||||
/// </summary>
|
||||
public Guid? MergeRowId { get; set; }
|
||||
|
||||
public string BlindName { get; set; } = string.Empty;
|
||||
|
||||
public string OrderMark { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 截图地址
|
||||
/// </summary>
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 第一次添加的任务ID
|
||||
/// </summary>
|
||||
public decimal FristAddTaskNum { get; set; } = 0;
|
||||
|
||||
|
||||
public SplitOrMergeType? SplitOrMergeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
|
||||
public int? NumberOfFrames { get; set; }
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
//string UpdateUserName { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
||||
public Guid? DeleteUserId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string RowMark { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class CopyTableAnswerRowInfo : ReadingTableAnswerRowInfoBase
|
||||
{
|
||||
public Guid OriginalId { get; set; }
|
||||
}
|
||||
|
||||
@@ -68,9 +68,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<TumorAssessment, TumorAssessmentView>();
|
||||
|
||||
|
||||
CreateMap<CopyTableAnswerRowInfo, ReadingTableAnswerRowInfo>();
|
||||
|
||||
CreateMap<ReadingTableAnswerRowInfo, CopyTableAnswerRowInfo>()
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore());
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
||||
//.ForMember(dest => dest.Instance, opt => opt.Ignore())
|
||||
//.ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore());
|
||||
|
||||
#region 阅片问题
|
||||
|
||||
|
||||
@@ -328,8 +328,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault();
|
||||
x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault();
|
||||
x.MergeRow = null;
|
||||
x.SplitRow = null;
|
||||
|
||||
});
|
||||
|
||||
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
|
||||
@@ -396,23 +395,16 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
throw new BusinessValidationFailedException($"PCWG3标准配置异常!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(visitTaskId, x => new VisitTask()
|
||||
{
|
||||
ReadingTaskState = ReadingTaskState.Reading,
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
||||
|
||||
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableRowAnswers);
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
@@ -611,7 +611,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
RowId = x.RowId,
|
||||
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
|
||||
TableQuestionId = x.TableQuestionId,
|
||||
|
||||
RowIndex = x.RowIndex,
|
||||
TrialId = x.TrialId
|
||||
}).ToListAsync();
|
||||
@@ -662,12 +661,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
});
|
||||
|
||||
tableRowAnswers.ForEach(x =>
|
||||
{
|
||||
x.MergeRow = null;
|
||||
x.SplitRow = null;
|
||||
});
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableRowAnswers);
|
||||
var addList= _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user