Uat_Study
parent
39fdf4a2a7
commit
1f7d033372
|
@ -127,7 +127,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public GenerateTaskCategory ReadingCategory { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 原任务的Id
|
||||
/// </summary>
|
||||
public Guid OriginalVisitId { get; set; }
|
||||
|
||||
//针对访视产生任务的 有用
|
||||
public bool IsAssignSubjectToDoctor { get; set; }
|
||||
|
|
|
@ -732,6 +732,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//case ReadingCategory.ReadingPeriod:
|
||||
case GenerateTaskCategory.Global:
|
||||
|
||||
var originalTaskInfo = await _visitTaskRepository.Where(x => x.Id == generateTaskCommand.OriginalVisitId).FirstNotNullAsync();
|
||||
if (trialConfig.ReadingType == ReadingMethod.Double)
|
||||
{
|
||||
foreach (var item in generateTaskCommand.ReadingGenerataTaskList)
|
||||
|
@ -744,28 +745,18 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsUrgent = item.IsUrgent,
|
||||
VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Global],
|
||||
TaskName = item.ReadingName,
|
||||
ArmEnum = Arm.DoubleReadingArm1,//特殊
|
||||
DoctorUserId= originalTaskInfo.DoctorUserId,
|
||||
ArmEnum = originalTaskInfo.ArmEnum,//特殊
|
||||
AllocateTime = DateTime.Now,
|
||||
TaskAllocationState = TaskAllocationState.Allocated,
|
||||
Code = currentMaxCodeInt + 1,
|
||||
TaskBlindName = item.ReadingName,
|
||||
SouceReadModuleId = item.ReadModuleId,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
ReadingCategory = item.ReadingCategory
|
||||
});
|
||||
var task2 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
SubjectId = item.SubjectId,
|
||||
IsUrgent = item.IsUrgent,
|
||||
VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Global],
|
||||
TaskName = item.ReadingName,
|
||||
ArmEnum = Arm.DoubleReadingArm2,//特殊
|
||||
Code = currentMaxCodeInt + 2,
|
||||
TaskBlindName = item.ReadingName,
|
||||
SouceReadModuleId = item.ReadModuleId,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 2, nameof(VisitTask)),
|
||||
ReadingCategory = item.ReadingCategory
|
||||
});
|
||||
currentMaxCodeInt = currentMaxCodeInt + 2;
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
}
|
||||
|
@ -780,7 +771,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsUrgent = item.IsUrgent,
|
||||
TaskName = item.ReadingName,
|
||||
VisitTaskNum = item.VisitNum + ReadingCommon.TaskNumDic[ReadingCategory.Global],
|
||||
ArmEnum = Arm.SingleReadingArm, //特殊
|
||||
DoctorUserId = originalTaskInfo.DoctorUserId,
|
||||
AllocateTime=DateTime.Now,
|
||||
TaskAllocationState= TaskAllocationState.Allocated,
|
||||
ArmEnum = originalTaskInfo.ArmEnum,//特殊
|
||||
Code = currentMaxCodeInt + 1,
|
||||
SouceReadModuleId = item.ReadModuleId,
|
||||
TaskBlindName = item.ReadingName,
|
||||
|
|
|
@ -871,7 +871,7 @@ namespace IRaCIS.Application.Services
|
|||
//needReadList = needReadList.Where(x => _visitTaskRepository.Where(y => y.SouceReadModuleId == x.ReadModuleId).Count() == 0).ToList();
|
||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
|
||||
OriginalVisitId= visitTaskId,
|
||||
ReadingCategory = GenerateTaskCategory.Global,
|
||||
TrialId = taskInfo.TrialId,
|
||||
ReadingGenerataTaskList = needReadList
|
||||
|
|
|
@ -61,7 +61,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[Required]
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
//分配状态
|
||||
/// <summary>
|
||||
/// 分配状态
|
||||
/// </summary>
|
||||
public TaskAllocationState TaskAllocationState { get; set; }
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue