diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs index 263903f63..b0a84a688 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs @@ -170,6 +170,8 @@ namespace IRaCIS.Core.Application.ViewModel public Guid SubjectId { get; set; } + public decimal VisitNum { get; set; } + public bool IsUrgent { get; set; } public string ReadingName { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 32324d4f0..34c98d907 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -13,6 +13,7 @@ using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure; using AutoMapper; using MassTransit; +using IRaCIS.Core.Infra.EFCore.Common; namespace IRaCIS.Core.Application.Service { @@ -366,6 +367,7 @@ namespace IRaCIS.Core.Application.Service ReadingTaskState = ReadingTaskState.WaitReading, TaskName = firstTask.TaskName, ReadingCategory = ReadingCategory.Judge, + VisitTaskNum= firstTask.VisitTaskNum+ ReadingCommon.TaskNumDic[ReadingCategory.Judge], TrialId = firstTask.TrialId, Code = currentMaxCodeInt + 1, SourceSubjectVisitId = firstTask.SourceSubjectVisitId, @@ -409,6 +411,7 @@ namespace IRaCIS.Core.Application.Service TrialId = trialId, SubjectId = item.SubjectId, IsUrgent = item.IsUrgent, + VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Global], TaskName = item.ReadingName, ArmEnum = Arm.DoubleReadingArm1,//特殊 Code = currentMaxCodeInt + 1, @@ -422,6 +425,7 @@ namespace IRaCIS.Core.Application.Service TrialId = trialId, SubjectId = item.SubjectId, IsUrgent = item.IsUrgent, + VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Global], TaskName = item.ReadingName, ArmEnum = Arm.DoubleReadingArm2,//特殊 Code = currentMaxCodeInt + 2, @@ -444,6 +448,7 @@ namespace IRaCIS.Core.Application.Service SubjectId = item.SubjectId, IsUrgent = item.IsUrgent, TaskName = item.ReadingName, + VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Global], ArmEnum = Arm.SingleReadingArm, //特殊 Code = currentMaxCodeInt + 1, SouceReadModuleId = item.ReadModuleId, @@ -469,6 +474,7 @@ namespace IRaCIS.Core.Application.Service SubjectId = item.SubjectId, IsUrgent = item.IsUrgent, TaskName = item.ReadingName, + VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Oncology], ArmEnum = Arm.TumorArm, //特殊 Code = currentMaxCodeInt + 1, SouceReadModuleId = item.ReadModuleId, diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 9d5b599c0..2edf69cde 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -539,6 +539,7 @@ namespace IRaCIS.Application.Services { IsUrgent = x.IsUrgent ?? false, SubjectId = x.SubjectId, + VisitNum=x.VisitNum, ReadingName = x.ModuleName, ReadModuleId = x.Id, ReadingCategory = typeChangeDic[x.ModuleType], @@ -565,6 +566,7 @@ namespace IRaCIS.Application.Services IsUrgent = x.IsUrgent ?? false, SubjectId = x.SubjectId, ReadingName = x.ModuleName, + VisitNum = x.VisitNum, ReadModuleId = x.Id, ReadingCategory = typeChangeDic[x.ModuleType], }).ToListAsync(); diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 550ab398e..a1e6711f7 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -192,7 +192,7 @@ namespace IRaCIS.Core.Domain.Models /// public string JudgeResultRemark { get; set; } = string.Empty; - //随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.02 全局任务在截止访视号上+0.03 肿瘤待定 + //随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.001 全局任务在截止访视号上+0.01 肿瘤待定 public decimal VisitTaskNum { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs index 9bf93553d..c07a23129 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs @@ -16,11 +16,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common public static class ReadingCommon { + public static Dictionary TaskNumDic = new Dictionary() + { + {ReadingCategory.Visit,0 }, + {ReadingCategory.Global,0.01 }, + {ReadingCategory.Judge,0.001 }, + {ReadingCategory.ReReading,0 }, + {ReadingCategory.Oncology,0 }, - //public static FileStreamResult GetFileStreamResult(IWebHostEnvironment webHostEnvironment, string path,string FileName) - //{ - - //} + }; public static bool IsNullOrEmpty(this string value) {