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; }