From 302e503e02f3b67640b4b05a50c6a23c1ed47e1b Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 22 Feb 2024 15:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E5=AD=A6=E5=AE=A1=E6=A0=B8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTask/ReadingGlobalTaskService.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs index 499dae0f4..d44a0f8ea 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs @@ -11,6 +11,8 @@ using Newtonsoft.Json; using IRaCIS.Core.Application.Service; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Application.Filter; +using System.Linq.Dynamic.Core; +using NPOI.SS.Formula.Functions; namespace IRaCIS.Application.Services { @@ -164,9 +166,15 @@ namespace IRaCIS.Application.Services ReadingTaskState = taskInfo.ReadingTaskState, }; - result.OtherGlobalTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate + + + var otherGlobalTask = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate && x.IsSelfAnalysis == taskInfo.IsSelfAnalysis && x.TaskState == TaskState.Effect && x.DoctorUserId != taskInfo.DoctorUserId - ).Select(x => x.Id).FirstOrDefaultAsync(); + ).FirstOrDefaultAsync(); + if (otherGlobalTask != null) + { + result.OtherGlobalTaskId = otherGlobalTask.Id; + } result.TaskBlindName = taskInfo.TaskBlindName; if (taskInfo.IsAnalysisCreate)