From 94bfec172bbd30a952508e52934b755668b2542c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 26 Jul 2022 16:50:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 4 ++-- .../Service/TrialSiteUser/DTO/TrialConfigDTO.cs | 14 ++++++++------ .../Service/TrialSiteUser/TrialConfigService.cs | 5 ----- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 8a36940ca..d7600bab6 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.ArmEnum == doctorArm.ArmEnum && t.TrialId==command.TrialId && t.TaskAllocationState==TaskAllocationState.NotAllocate, u => new VisitTask() + await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectId && t.ArmEnum == doctorArm.ArmEnum && t.TrialId==command.TrialId && t.TaskAllocationState==TaskAllocationState.NotAllocate && t.TaskState==TaskState.Effect, 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 && t.ReadingTaskState==ReadingTaskState.WaitReading, u => new VisitTask() + await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState==ReadingTaskState.WaitReading && t.TaskState==TaskState.Effect, u => new VisitTask() { AllocateTime=null, DoctorUserId=null, diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs index fb26b4c83..d3c0bc457 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs @@ -163,17 +163,19 @@ namespace IRaCIS.Core.Application.Contracts public Guid TrialId { get; set; } public TaskAllocateObj TaskAllocateObjEnum { get; set; } - public bool IsFollowVisitAutoAssign { get; set; } + public bool IsFollowVisitAutoAssign { get; set; } = true; - public bool IsFollowGlobalVisitAutoAssign { get; set; } + public bool IsFollowGlobalVisitAutoAssign { get; set; } = true; - public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } + public bool IsFollowJudgeTaskAutoAssign { get; set; } = true; - public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } - public bool IsFollowJudgeTaskAutoAssign { get; set; } + public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; - public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } + public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; + + + public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 9af436c21..7784c1012 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -615,11 +615,6 @@ namespace IRaCIS.Core.Application _mapper.Map(trialConfig, trialInfo); - //if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor==false).Sum(t => t.PlanReadingRatio) != 100) - //{ - // return ResponseOutput.NotOk("已启用医生比率不为百分之100"); - //} - return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync()); }