From 0c858b51e90fc76f7e054f1b0b6a2f0e5d5b6dbd Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Jul 2022 17:07:04 +0800 Subject: [PATCH] x --- .../Allocation/TaskConsistentRuleService.cs | 14 +++++++------- .../Service/Allocation/VisitTaskService.cs | 19 +++++++++++++------ .../Allocation/AllocationRelation.cs | 2 +- .../Context/IRaCISDBContext.cs | 2 +- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 90d8e753e..ba8caef8b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -198,13 +198,13 @@ namespace IRaCIS.Core.Application.Service SubjectCode = c.Subject.Code, TrialSiteCode = c.Subject.TrialSite.TrialSiteCode, - RelationDoctorUserList = c.SameVisitTaskList/*Where(t=>t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)*/.Select(c => new UserSimpleInfo() - { - FullName = c.DoctorUser.FullName, - UserCode = c.DoctorUser.UserCode, - UserId = c.DoctorUser.Id, - UserName = c.DoctorUser.UserName - }).ToList(), + //RelationDoctorUserList = c.SameVisitTaskList/*Where(t=>t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)*/.Select(c => new UserSimpleInfo() + //{ + // FullName = c.DoctorUser.FullName, + // UserCode = c.DoctorUser.UserCode, + // UserId = c.DoctorUser.Id, + // UserName = c.DoctorUser.UserName + //}).ToList(), IsHaveGeneratedTask = c.Subject.SubjectVisitTaskList.Any(t => t.IsAnalysisCreate && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id), diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 3fec455af..f9bedc8bd 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1303,15 +1303,21 @@ namespace IRaCIS.Core.Application.Service switch (influenceTask.ReadingCategory) { case ReadingCategory.Visit: - - - break; - case ReadingCategory.Global: - case ReadingCategory.Judge: - break; case ReadingCategory.Oncology: + + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + influenceTask.TaskState = TaskState.HaveReturned; + } + else + { + influenceTask.TaskState = TaskState.Adbandon; + } + break; + + case ReadingCategory.Judge: default: throw new BusinessValidationFailedException("不支持回退任务类型"); @@ -1328,6 +1334,7 @@ namespace IRaCIS.Core.Application.Service influenceTask.AllocateTime = null; influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate; break; + case ReadingCategory.Global: case ReadingCategory.Judge: case ReadingCategory.Oncology: diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index 8a71f4197..60ddb1919 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -150,7 +150,7 @@ namespace IRaCIS.Core.Domain.Share //未生效 NotEffect = 1, - // 废弃(裁判任务,没做,或者做了没签名 ) + // 废弃 没做,或者做了没签名 Adbandon = 3, //重置 (裁判任务做了,签名了 算工作量) diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 0a1358562..1ce3bd332 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -97,7 +97,7 @@ namespace IRaCIS.Core.Infra.EFCore modelBuilder.Entity().HasMany(t => t.SubjectArmVisitTaskList).WithOne(t=>t.SujectArm).HasForeignKey(t => new { t.SubjectId,t.ArmEnum}).HasPrincipalKey(u => new { u.SubjectId,u.ArmEnum }); modelBuilder.Entity().HasMany(t => t.JudgeVisitList).WithOne(t=>t.JudgeVisitTask); - modelBuilder.Entity().HasMany(t => t.SameVisitTaskList).WithOne().HasForeignKey(t=>t.SourceSubjectVisitId).HasPrincipalKey(u=>u.SourceSubjectVisitId); + //modelBuilder.Entity().HasMany(t => t.SameVisitTaskList).WithOne().HasForeignKey(t=>t.SourceSubjectVisitId).HasPrincipalKey(u=>u.SourceSubjectVisitId); //modelBuilder.Entity().HasMany(t => t.AnalysisVisitTaskList).WithOne().HasForeignKey(t => t.TaskConsistentRuleId).HasPrincipalKey(u => u.SourceSubjectVisitId);