This commit is contained in:
he
2024-12-24 11:09:19 +08:00
parent 21fdd4b0e4
commit 7f874eaff0
8 changed files with 18314 additions and 9 deletions
@@ -501,6 +501,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string OtherMeasureData { get; set; } = string.Empty;
}
public class TableQuestionMark: SaveTableQuestionMarkInDto
{
public new Guid? TableQuestionId { get; set; }
public new decimal? RowIndex { get; set; }
}
public class GetPreviousOtherPicturePathInDto
{
public Guid? RowId { get; set; }
@@ -91,8 +91,7 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<SaveTableQuestionMarkInDto> SaveTableQuestionMark(SaveTableQuestionMarkInDto inDto)
{
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x =>x.VisitTaskId==inDto.VisitTaskId&&x.QuestionId==inDto.QuestionId&& x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId);
await _readingTableQuestionAnswerRepository.AddAsync(new ReadingTableQuestionAnswer()
{
@@ -1130,7 +1129,7 @@ namespace IRaCIS.Core.Application.Service
{
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId).ProjectTo<SaveTableQuestionMarkInDto>(_mapper.ConfigurationProvider).ToListAsync();
var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId).ProjectTo<TableQuestionMark>(_mapper.ConfigurationProvider).ToListAsync();
var qusetionList = await _readingQuestionTrialRepository
.Where(x => x.IsShowInDicom)
.WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify)
@@ -1350,7 +1349,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="isFirstChangeTask"></param>
/// <param name="lastTaskTableAnswer"></param>
/// <param name="TaskId"></param>
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer, bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer, List<SaveTableQuestionMarkInDto> TableQuestionMarkList, Guid? TaskId)
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer, bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer, List<TableQuestionMark> TableQuestionMarkList, Guid? TaskId)
{
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList();
item.TableQuestions = new TrialReadTableQuestion();
@@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<VisitTask, VisitTaskDto>();
CreateMap<SaveTableQuestionMarkInDto, ReadingTaskQuestionMark>();
CreateMap<ReadingTaskQuestionMark, SaveTableQuestionMarkInDto>();
CreateMap<ReadingTaskQuestionMark, TableQuestionMark>();
CreateMap<SubmitTableQuestionInDto, ReadingTableAnswerRowInfo>()
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));