From caea98160e4115b117e07137b63d0245dd764094 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Tue, 6 Sep 2022 09:46:57 +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/ReadingImageTaskService.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 7a8412d2b..90aea16f0 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -222,7 +222,7 @@ namespace IRaCIS.Application.Services
{
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
- var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SourceSubjectVisitId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
+ var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
// 判断当前任务是否是基线
if (taskinfo.SourceSubjectVisitId != baseLineVisitId)
@@ -433,6 +433,7 @@ namespace IRaCIS.Application.Services
///
public async Task> GetTableAnswerRowInfoList(GetTableAnswerRowInfoInDto inDto)
{
+ await this.AddBaseLineAnswerToOtherTask(inDto.VisitTaskId);
return await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
.WhereIf(inDto.QuestionId != null, x => x.QuestionId == inDto.QuestionId)
.ProjectTo(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder).ThenBy(x=>x.RowIndex)
@@ -449,7 +450,12 @@ namespace IRaCIS.Application.Services
{
var result = new GetReadingQuestionAndAnswerOutDto();
- result.IsBaseLineTask= await this.AddBaseLineAnswerToOtherTask(inDto.VisitTaskId);
+
+ var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
+
+ var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
+
+ result.IsBaseLineTask= taskinfo.SourceSubjectVisitId == baseLineVisitId;
var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.ReadingTaskState).FirstOrDefaultAsync();
var criterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstNotNullAsync();