From be5aa6d9131ff8a6c8a36f27385d48f94666f467 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 24 Jun 2022 15:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/VisitTaskHelpeService.cs | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 9d5cb35e3..bb2e8328d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -390,7 +390,7 @@ namespace IRaCIS.Core.Application.Service case ReadingCategory.ReadingPeriod: case ReadingCategory.Global: - case ReadingCategory.Oncology: + if (trialConfig.ReadingType == ReadingMethod.Double) { foreach (var item in generateTaskCommand.ReadingGenerataTaskList) @@ -452,6 +452,30 @@ namespace IRaCIS.Core.Application.Service } } break; + case ReadingCategory.Oncology: + foreach (var item in generateTaskCommand.ReadingGenerataTaskList) + { + var singleTask = await _visitTaskRepository.AddAsync(new VisitTask() + { + TrialId = trialId, + SubjectId = item.SubjectId, + IsUrgent = item.IsUrgent, + TaskName = item.ReadingName, + ArmEnum = Arm.SingleReadingArm, //特殊 + Code = currentMaxCodeInt + 1, + SouceReadModuleId = item.ReadModuleId, + TaskBlindName = item.ReadingName, + TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), + ReadingCategory = item.ReadingCategory + }); + + singleTask.AllocateTime = DateTime.Now; + + currentMaxCodeInt = currentMaxCodeInt + 1; + + _provider.Set($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt + 1, TimeSpan.FromMinutes(30)); + } + break; }