diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs index c96d5845d..4ff042d81 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs @@ -122,6 +122,10 @@ namespace IRaCIS.Core.Application.ViewModel public Arm ArmEnum { get; set; } + public Guid? SourceSubjectVisitId { get; set; } + public Guid? SouceReadModuleId { get; set; } + + } public class VisitTaskSimpleDTO :VisitTaskGroupSimpleDTO diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index f16161c9c..daa51c803 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application.Service foreach (var visitGroup in followVisitGroup) { - var arm1 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm1); + var arm1 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState==TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm1); if (arm1 != null) { arm1.TaskAllocationState = TaskAllocationState.Allocated; @@ -256,7 +256,7 @@ namespace IRaCIS.Core.Application.Service _provider.Set($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30)); } - var arm2 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm2); + var arm2 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm2); if (arm2 != null) { arm2.TaskAllocationState = TaskAllocationState.Allocated; @@ -591,6 +591,8 @@ namespace IRaCIS.Core.Application.Service TaskAllocationState = TaskAllocationState.Allocated, AllocateTime = DateTime.Now, + SouceReadModuleId = task.SouceReadModuleId, + SourceSubjectVisitId = task.SourceSubjectVisitId, BlindTrialSiteCode = task.BlindTrialSiteCode, BlindSubjectCode = task.BlindSubjectCode, ConsistentAnalysisOriginalTaskId = task.Id, @@ -627,6 +629,8 @@ namespace IRaCIS.Core.Application.Service Code = currentMaxCodeInt + 1, TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), + SouceReadModuleId = task.SouceReadModuleId, + SourceSubjectVisitId = task.SourceSubjectVisitId, DoctorUserId = task.DoctorUserId, TaskAllocationState = TaskAllocationState.Allocated, AllocateTime = DateTime.Now, diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 25372eacf..9708317eb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1098,6 +1098,8 @@ namespace IRaCIS.Core.Application.Service origenalTask.ReReadingApplyState = (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject); origenalTask.TaskState = (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState); + + //更新申请信息 var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id); visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id;