From 4d34648b8f73edc330f60a117ccd205f477f5541 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 26 Jul 2022 14:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 14cc3b6da..354aa4cc2 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -93,7 +93,7 @@ namespace IRaCIS.Core.Application.Service.Allocation { await _subjectUserRepository.AddAsync(new SubjectUser() {TrialId=command.TrialId, ArmEnum = doctorArm.ArmEnum, DoctorUserId = doctorArm.DoctorUserId, SubjectId = subjectId, AssignTime = DateTime.Now }); - await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectId && t.DoctorUserId == doctorArm.DoctorUserId && t.ArmEnum == doctorArm.ArmEnum && t.TrialId==command.TrialId, u => new VisitTask() + await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectId && t.ArmEnum == doctorArm.ArmEnum && t.TrialId==command.TrialId && t.TaskAllocationState==TaskAllocationState.NotAllocate, u => new VisitTask() { AllocateTime = DateTime.Now, DoctorUserId = doctorArm.DoctorUserId, @@ -157,7 +157,7 @@ namespace IRaCIS.Core.Application.Service.Allocation await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id); - await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum, u => new VisitTask() + await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState!=ReadingTaskState.WaitReading, u => new VisitTask() { AllocateTime=null, DoctorUserId=null,