修改一版
This commit is contained in:
@@ -138,6 +138,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
//裁判的时候传递
|
||||
public List<Guid> JudgeVisitTaskIdList { get; set; } = new List<Guid>();
|
||||
|
||||
/// <summary>
|
||||
/// 阅片期
|
||||
/// </summary>
|
||||
public List<ReadingGenerataTaskDTO> ReadingGenerataTaskList= new List<ReadingGenerataTaskDTO>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -317,62 +317,61 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
if (trialConfig.ReadingType == ReadingMethod.Double)
|
||||
{
|
||||
//每个访视 根据项目配置生成任务 双审生成两个
|
||||
var task1 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
foreach (var item in generateTaskCommand.ReadingGenerataTaskList)
|
||||
{
|
||||
TrialId = trialId,
|
||||
//SubjectId = subjectVisit.SubjectId,
|
||||
//IsUrgent = subjectVisit.IsUrgent,
|
||||
//TaskBlindName = subjectVisit.BlindName,
|
||||
//TaskName = subjectVisit.VisitName,
|
||||
ArmEnum = Arm.DoubleReadingArm1,//特殊
|
||||
Code = currentMaxCodeInt + 1,
|
||||
//SourceSubjectVisitId = subjectVisit.Id,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.ReadingPeriod
|
||||
});
|
||||
|
||||
var task2 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
//SubjectId = subjectVisit.SubjectId,
|
||||
//IsUrgent = subjectVisit.IsUrgent,
|
||||
//TaskBlindName = subjectVisit.BlindName,
|
||||
//TaskName = subjectVisit.VisitName,
|
||||
ArmEnum = Arm.DoubleReadingArm2,//特殊
|
||||
Code = currentMaxCodeInt + 2,
|
||||
//SourceSubjectVisitId = subjectVisit.Id,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 2, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.ReadingPeriod
|
||||
});
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 2;
|
||||
|
||||
_provider.Set<int>($"{trialId }_{ StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt + 2, TimeSpan.FromMinutes(30));
|
||||
|
||||
|
||||
//每个访视 根据项目配置生成任务 双审生成两个
|
||||
var task1 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
SubjectId = item.SubjectId,
|
||||
IsUrgent = item.IsUrgent,
|
||||
TaskName = item.ReadingName,
|
||||
ArmEnum = Arm.DoubleReadingArm1,//特殊
|
||||
Code = currentMaxCodeInt + 1,
|
||||
SouceReadModuleId=item.ReadModuleId,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.ReadingPeriod
|
||||
});
|
||||
var task2 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
SubjectId = item.SubjectId,
|
||||
IsUrgent = item.IsUrgent,
|
||||
TaskName = item.ReadingName,
|
||||
ArmEnum = Arm.DoubleReadingArm2,//特殊
|
||||
Code = currentMaxCodeInt + 2,
|
||||
SouceReadModuleId = item.ReadModuleId,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 2, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.ReadingPeriod
|
||||
});
|
||||
currentMaxCodeInt = currentMaxCodeInt + 2;
|
||||
_provider.Set<int>($"{trialId }_{ StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt + 2, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var singleTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
foreach (var item in generateTaskCommand.ReadingGenerataTaskList)
|
||||
{
|
||||
TrialId = trialId,
|
||||
//SubjectId = subjectVisit.SubjectId,
|
||||
//IsUrgent = subjectVisit.IsUrgent,
|
||||
//TaskBlindName = subjectVisit.BlindName,
|
||||
//TaskName = subjectVisit.VisitName,
|
||||
ArmEnum = Arm.SingleReadingArm, //特殊
|
||||
Code = currentMaxCodeInt + 1,
|
||||
//SourceSubjectVisitId = subjectVisit.Id,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.ReadingPeriod
|
||||
});
|
||||
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,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.ReadingPeriod
|
||||
});
|
||||
|
||||
singleTask.AllocateTime = DateTime.Now;
|
||||
singleTask.AllocateTime = DateTime.Now;
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_provider.Set<int>($"{trialId }_{ StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt + 1, TimeSpan.FromMinutes(30));
|
||||
_provider.Set<int>($"{trialId }_{ StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt + 1, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user