From 3aaa9eca7132cd23a16f9d46a496513d55c829b0 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 22 Sep 2022 14:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/Dto/ReadingImageTaskViewModel.cs | 6 +++--- .../Service/Reading/ReadingImageTaskService.cs | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 2ac38621e..bce09314c 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -197,9 +197,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid QuestionId { get; set; } - public decimal MainRowIndex { get; set; } + public Guid MainRowId { get; set; } - public decimal MergeRowIndex { get; set; } + public Guid MergeRowId { get; set; } } @@ -210,7 +210,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid QuestionId { get; set; } - public decimal RowIndex { get; set; } + public Guid RowId { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 2575eed5d..09b2a2ace 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -117,8 +117,8 @@ namespace IRaCIS.Application.Services public async Task SplitLesion(SplitLesionInDto inDto) { await this.VerifyIsBaseLineTask(inDto.VisitTaskId); - var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId).FirstNotNullAsync(); - var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId).ToListAsync(); + var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x =>x.Id==inDto.RowId).FirstNotNullAsync(); + var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).ToListAsync(); var maxRowIndex = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefaultAsync(); var newRowIndex = maxRowIndex + (decimal)0.01; @@ -147,7 +147,7 @@ namespace IRaCIS.Application.Services { await this.VerifyIsBaseLineTask(inDto.VisitTaskId); - var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId &&(x.RowIndex == inDto.MainRowIndex || x.RowIndex == inDto.MergeRowIndex)).ToListAsync(); + var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId &&(x.Id == inDto.MainRowId || x.Id == inDto.MergeRowId)).ToListAsync(); if (rowsInfo.Count() != 2) { @@ -155,8 +155,8 @@ namespace IRaCIS.Application.Services } - var minaid = rowsInfo.Where(x => x.RowIndex == inDto.MainRowIndex).Select(x => x.Id).FirstOrDefault(); - var mergeid = rowsInfo.Where(x => x.RowIndex == inDto.MergeRowIndex).Select(x => x.Id).FirstOrDefault(); + var minaid = rowsInfo.Where(x => x.Id == inDto.MainRowId).Select(x => x.Id).FirstOrDefault(); + var mergeid = rowsInfo.Where(x => x.Id == inDto.MergeRowId).Select(x => x.Id).FirstOrDefault(); await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(mergeid, x => new ReadingTableAnswerRowInfo()