From 2741678aebdeb91a67f98687c59127045d1e522e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 23 Jun 2022 16:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/VisitTaskViewModel.cs | 4 +- .../Allocation/VisitTaskHelpeService.cs | 22 +++++--- .../Service/Allocation/VisitTaskService.cs | 53 ++++++++++--------- .../Service/Allocation/_MapConfig.cs | 4 +- .../SubjectVisitCheckPassedTrigger.cs | 12 ++--- .../Allocation/AllocationRelation.cs | 15 ++++-- IRaCIS.Core.Domain/Allocation/VisitTask.cs | 4 +- 7 files changed, 67 insertions(+), 47 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 1f9293bfe..126d16e52 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.ViewModel public ReadingCategory ReadingCategory { get; set; } - public TaskState TaskState { get; set; } + public TaskAllocationState TaskAllocationState { get; set; } public bool IsJudgeTaskReturn { get; set; } @@ -188,7 +188,7 @@ namespace IRaCIS.Core.Application.ViewModel public ReadingCategory? ReadingCategory { get; set; } - public TaskState? TaskState { get; set; } + public TaskAllocationState? TaskAllocationState { get; set; } public ReadingTaskState? ReadingTaskState { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 070ebbb4f..3c8d53d5a 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -83,7 +83,7 @@ namespace IRaCIS.Core.Application.Service case ReadingCategory.Visit: foreach (var subjectVisit in generateTaskCommand.VisitGenerataTaskList) { - var assignConfigList = await _subjectUserRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId).Select(u => new { u.DoctorUserId, u.ArmEnum }).ToListAsync(); + var assignConfigList = await _subjectUserRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.OrignalSubjectUserId== null && t.IsConfirmed).Select(u => new { u.DoctorUserId, u.ArmEnum }).ToListAsync(); if (trialConfig.ReadingType == ReadingMethod.Double) @@ -163,11 +163,11 @@ namespace IRaCIS.Core.Application.Service //配置了医生 if (assignConfigList.Count > 0) { - var defaultState = trialConfig.FollowVisitAutoAssignDefaultState == TaskAllocateDefaultState.InitAllocated ? TaskState.InitAllocated : TaskState.Allocated; + var defaultState = trialConfig.FollowVisitAutoAssignDefaultState == TaskAllocateDefaultState.InitAllocated ? TaskAllocationState.InitAllocated : TaskAllocationState.Allocated; - task1.TaskState = defaultState; - task2.TaskState = defaultState; + task1.TaskAllocationState = defaultState; + task2.TaskAllocationState = defaultState; //分配给对应Arm的人 task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId; @@ -251,9 +251,9 @@ namespace IRaCIS.Core.Application.Service //配置了医生 if (assignConfigList.Count > 0) { - var defaultState = trialConfig.FollowVisitAutoAssignDefaultState == TaskAllocateDefaultState.InitAllocated ? TaskState.InitAllocated : TaskState.Allocated; + var defaultState = trialConfig.FollowVisitAutoAssignDefaultState == TaskAllocateDefaultState.InitAllocated ? TaskAllocationState.InitAllocated : TaskAllocationState.Allocated; - singleTask.TaskState = defaultState; + singleTask.TaskAllocationState = defaultState; singleTask.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == 0).DoctorUserId; @@ -293,7 +293,15 @@ namespace IRaCIS.Core.Application.Service await _visitTaskRepository.AddAsync(new VisitTask() { - OriginalReReadingId=reReadingVisitTask.Id, + OriginalReReadingId = reReadingVisitTask.Id, + + TrialId = reReadingVisitTask.TrialId, + SubjectId = reReadingVisitTask.SubjectId, + ArmEnum= reReadingVisitTask.ArmEnum, + TaskName= reReadingVisitTask.TaskName, + TaskBlindName = reReadingVisitTask.TaskBlindName, + TaskAllocationState= reReadingVisitTask.TaskAllocationState, + ReadingCategory = reReadingVisitTask.ReadingCategory, Code = currentMaxCodeInt + 1, TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), AllocateTime=DateTime.Now, diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 560afd7b6..b910bd474 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -104,7 +104,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory) - .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) + .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode)) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) @@ -138,7 +138,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId) .WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId) - .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) + .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode)) @@ -175,7 +175,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState) - .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) + .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode)) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) @@ -210,7 +210,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState) - .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) + .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode)) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) @@ -323,7 +323,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId) .WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent) .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory) - .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) + .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode)) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) @@ -358,7 +358,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState) - .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) + .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode)) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) @@ -430,12 +430,12 @@ namespace IRaCIS.Core.Application.Service var armEnum = assginSubjectDoctorCommand.DoctorUserIdArmList.Where(t => t.DoctorUserId == doctorUserId).First().ArmEnum; - if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum != armEnum)) + if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum != armEnum && t.OrignalSubjectUserId==null)) { throw new BusinessValidationFailedException("有Subject 在其他Arm组已有该医生,不允许在新的组添加该医生"); } - if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum == armEnum)) + if (await _subjectUserRepository.AnyAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.DoctorUserId == doctorUserId && t.ArmEnum == armEnum && t.OrignalSubjectUserId == null)) { throw new BusinessValidationFailedException("有Subject 已有该Arm组的医生,不允许继续分配,请刷新页面,确认页面数据是否过期"); } @@ -466,7 +466,7 @@ namespace IRaCIS.Core.Application.Service { foreach (var subjectId in cancelSubjectAssignCommand.SubjectIdList) { - if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == subjectId && t.DoctorUserId != null && t.ArmEnum == Arm.JudgeArm)) + if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == subjectId && t.DoctorUserId != null && t.ArmEnum == Arm.JudgeArm )) { throw new BusinessValidationFailedException("有Subject任务已应用,不允许取消分配"); } @@ -540,7 +540,7 @@ namespace IRaCIS.Core.Application.Service if (assignConfirmCommand.SubjectDoctorUserList.Count == 0) { - subjectDoctorIdArmList = _subjectUserRepository.Where(t => t.SubjectId == subjectId).Select(t => new DoctorArm() { DoctorUserId = t.DoctorUserId, ArmEnum = t.ArmEnum }).ToList(); + subjectDoctorIdArmList = _subjectUserRepository.Where(t => t.SubjectId == subjectId && t.OrignalSubjectUserId == null).Select(t => new DoctorArm() { DoctorUserId = t.DoctorUserId, ArmEnum = t.ArmEnum }).ToList(); } @@ -560,7 +560,7 @@ namespace IRaCIS.Core.Application.Service { task.DoctorUserId = subjectDoctorArm.DoctorUserId; task.AllocateTime = DateTime.Now; - task.TaskState = TaskState.Allocated; + task.TaskAllocationState = TaskAllocationState.Allocated; task.SuggesteFinishedTime = task.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7); @@ -615,8 +615,10 @@ namespace IRaCIS.Core.Application.Service .Select(t => new { SubjectId = t.Id, - DoctorUserList = t.SubjectDoctorList.Where(t => isJudge ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Select(t => new { t.DoctorUserId, t.ArmEnum }), - IsApplyed = t.SubjectDoctorList.Where(t => isJudge ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).SelectMany(t => t.SubjectArmVisitTaskList).Any(c => c.DoctorUserId != null) + + //给Subject分配医生的时候, 未确认绑定关系的 + DoctorUserList = t.SubjectDoctorList.Where(t => isJudge ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t=> t.OrignalSubjectUserId==null).Select(t => new { t.DoctorUserId, t.ArmEnum }), + IsApplyed = t.SubjectDoctorList.Where(t => isJudge ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.OrignalSubjectUserId == null).SelectMany(t => t.SubjectArmVisitTaskList).Any(c => c.DoctorUserId != null) }).ToList(); //已产生任务的Subject数量(裁判情况下,就是产生裁判任务Subject 的数量) @@ -815,7 +817,7 @@ namespace IRaCIS.Core.Application.Service if (visitTask.SourceSubjectVisitId != null) { - if(await _visitTaskRepository.AnyAsync(t=>t.SourceSubjectVisitId== visitTask.SourceSubjectVisitId && t.DoctorUserId== assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id)) + if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id)) { return ResponseOutput.NotOk("其中一个任务已分配给该医生,不允许分配"); } @@ -836,7 +838,7 @@ namespace IRaCIS.Core.Application.Service visitTask.AllocateTime = DateTime.Now; visitTask.DoctorUserId = assignSubjectTaskToDoctorCommand.DoctorUserId; - visitTask.TaskState = TaskState.Allocated; + visitTask.TaskAllocationState = TaskAllocationState.Allocated; await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == visitTask.SourceSubjectVisitId, u => new SubjectVisit() { ReadingStatus = ReadingStatusEnum.ImageReading }); @@ -858,13 +860,13 @@ namespace IRaCIS.Core.Application.Service else if (assignSubjectTaskToDoctorCommand.TaskOptType == TaskOptType.Confirm) { - visitTask.TaskState = TaskState.Allocated; + visitTask.TaskAllocationState = TaskAllocationState.Allocated; } else if (assignSubjectTaskToDoctorCommand.TaskOptType == TaskOptType.CancelAssign) { visitTask.AllocateTime = null; visitTask.DoctorUserId = null; - visitTask.TaskState = TaskState.NotAllocate; + visitTask.TaskAllocationState = TaskAllocationState.NotAllocate; await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == visitTask.SourceSubjectVisitId, u => new SubjectVisit() { ReadingStatus = ReadingStatusEnum.TaskAllocate }); @@ -885,15 +887,18 @@ namespace IRaCIS.Core.Application.Service [UnitOfWork] public async Task ApplyReReading(ApplyReReadingCommand applyReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService) { - var taskList = await _visitTaskRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.Id), true).Include(t=>t.JudgeVisitTask).ToListAsync(); + var taskList = await _visitTaskRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.Id), true).Include(t => t.JudgeVisitTask).ToListAsync(); var reReadingTaskList = taskList.Clone(); foreach (var task in taskList) { - + if(await _visitTaskRepository.AnyAsync(t=>t.OriginalReReadingId==task.Id)) + { + throw new BusinessValidationFailedException("已产生重阅任务,不允许再次申请"); + } + - task.IsReReading = true; task.RequestReReadingReason = applyReReadingCommand.RequestReReadingReason; task.RequestReReadingType = applyReReadingCommand.RequestReReadingTypeEnum; task.RequestReReadingTime = DateTime.Now; @@ -902,16 +907,15 @@ namespace IRaCIS.Core.Application.Service //产生了裁判 if (task.JudgeVisitTaskId != null) { - if(task.ReadingTaskState==ReadingTaskState.WaitReading || task.ReadingTaskState == ReadingTaskState.Reading) + if (task.ReadingTaskState == ReadingTaskState.WaitReading || task.ReadingTaskState == ReadingTaskState.Reading) { - task.JudgeVisitTask.ReadingTaskState = ReadingTaskState.HaveCanceled; + task.JudgeVisitTask.TaskState = TaskState.HaveCanceled; } else { - task.JudgeVisitTask.ReadingTaskState = ReadingTaskState.HaveReturned; + task.JudgeVisitTask.TaskState = TaskState.HaveReturned; - //task.JudgeVisitTask.IsJudgeTaskReturn = true; } } @@ -953,6 +957,7 @@ namespace IRaCIS.Core.Application.Service await _visitTaskRepository.UpdatePartialFromQueryAsync(t => agreeReReadingCommand.TaskIdList.Contains(t.Id), u => new VisitTask() { + IsReReading = true, RequestReReadingResultEnum = agreeReReadingCommand.RequestReReadingResultEnum, RequestReReadingConfirmUserId = _userInfo.Id }, true); diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index c9a529683..539e836e7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -34,8 +34,8 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.SelfApplyedTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId))) .ForMember(o => o.ApplyedTotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId != null))) - .ForMember(o => o.SelfApplyedSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId != null)).Count())) - .ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId).Count())) + .ForMember(o => o.SelfApplyedSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId != null)).Count())) + .ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId ).Count())) .ForMember(o => o.ApplyedTotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count(c => c.SubjectVisitTaskList.Any(d => d.DoctorUserId != null)))) diff --git a/IRaCIS.Core.Application/Triggers/SubjectVisitCheckPassedTrigger.cs b/IRaCIS.Core.Application/Triggers/SubjectVisitCheckPassedTrigger.cs index 4e2a2af08..40062ae3c 100644 --- a/IRaCIS.Core.Application/Triggers/SubjectVisitCheckPassedTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/SubjectVisitCheckPassedTrigger.cs @@ -108,13 +108,13 @@ namespace IRaCIS.Core.Application.Triggers // if (trialConfig.TaskAllocateDefaultState == TaskAllocateDefaultState.Allocated) // { - // task1.TaskState = TaskState.Allocated; - // task2.TaskState = TaskState.Allocated; + // task1.TaskAllocationState = TaskAllocationState.Allocated; + // task2.TaskAllocationState = TaskAllocationState.Allocated; // } // else if (trialConfig.TaskAllocateDefaultState == TaskAllocateDefaultState.InitAllocated) // { - // task1.TaskState = TaskState.InitAllocated; - // task2.TaskState = TaskState.InitAllocated; + // task1.TaskAllocationState = TaskAllocationState.InitAllocated; + // task2.TaskAllocationState = TaskAllocationState.InitAllocated; // } // if (trialConfig.TaskAllocateObjEnum == TaskAllocateObj.Subject) @@ -199,11 +199,11 @@ namespace IRaCIS.Core.Application.Triggers // if (trialConfig.TaskAllocateDefaultState == TaskAllocateDefaultState.Allocated) // { - // singleTask.TaskState = TaskState.Allocated; + // singleTask.TaskAllocationState = TaskAllocationState.Allocated; // } // else if (trialConfig.TaskAllocateDefaultState == TaskAllocateDefaultState.InitAllocated) // { - // singleTask.TaskState = TaskState.InitAllocated; + // singleTask.TaskAllocationState = TaskAllocationState.InitAllocated; // } // if (trialConfig.TaskAllocateObjEnum == TaskAllocateObj.Subject) diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index 2ffc7da83..4f64c6c8e 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -26,7 +26,7 @@ namespace IRaCIS.Core.Domain.Share ReReading = 6, } - public enum TaskState + public enum TaskAllocationState { //未分配 NotAllocate = 0, @@ -93,6 +93,14 @@ namespace IRaCIS.Core.Domain.Share } + public enum TaskState + { + // 裁判任务,没做,或者做了没签名 已取消 + HaveCanceled = 3, + + HaveReturned = 4 + } + //阅片状态 public enum ReadingTaskState { @@ -102,10 +110,7 @@ namespace IRaCIS.Core.Domain.Share HaveSigned = 2, - // 裁判任务,没做,或者做了没签名 已取消 - HaveCanceled = 3, - - HaveReturned = 4 + } // diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 5b0dbf034..c3971c30c 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -121,9 +121,11 @@ namespace IRaCIS.Core.Domain.Models //分配状态 - public TaskState TaskState { get; set; } + public TaskAllocationState TaskAllocationState { get; set; } + public TaskState TaskState { get; set; } + /// /// DoctorUserId ///