修改
This commit is contained in:
@@ -705,7 +705,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
case GenerateTaskCategory.Judge:
|
||||
var firstTask = await _visitTaskRepository.Where(x => generateTaskCommand.JudgeVisitTaskIdList.Contains(x.Id)).FirstOrDefaultAsync();
|
||||
|
||||
var subjectUser = await _subjectUserRepository.Where(x => x.SubjectId == firstTask.SubjectId && x.ArmEnum == Arm.JudgeArm).FirstOrDefaultAsync();
|
||||
var subjectUser = await _subjectUserRepository.Where(x => x.SubjectId == firstTask.SubjectId && x.ArmEnum == Arm.JudgeArm && x.IsConfirmed).FirstOrDefaultAsync();
|
||||
|
||||
VisitTask visitTask = new VisitTask()
|
||||
{
|
||||
@@ -726,6 +726,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
DoctorUserId = subjectUser == null ? null : subjectUser.DoctorUserId,
|
||||
TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
||||
AllocateTime = subjectUser == null ? null : DateTime.Now,
|
||||
SuggesteFinishedTime = subjectUser == null ? null : DateTime.Now.AddDays(7),
|
||||
|
||||
|
||||
};
|
||||
@@ -768,6 +769,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
DoctorUserId = originalTaskInfo.DoctorUserId,
|
||||
AllocateTime = DateTime.Now,
|
||||
TaskAllocationState = TaskAllocationState.Allocated,
|
||||
SuggesteFinishedTime = DateTime.Now.AddDays(7),
|
||||
|
||||
Code = currentMaxCodeInt + 1,
|
||||
TaskBlindName = item.ReadingName,
|
||||
@@ -781,8 +783,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
break;
|
||||
case GenerateTaskCategory.Oncology:
|
||||
|
||||
|
||||
|
||||
foreach (var item in generateTaskCommand.ReadingGenerataTaskList)
|
||||
{
|
||||
var oncologySubjectUser = await _subjectUserRepository.Where(x => x.SubjectId == item.SubjectId && x.ArmEnum == Arm.TumorArm && x.IsConfirmed).FirstOrDefaultAsync();
|
||||
var singleTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
@@ -794,6 +800,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
Code = currentMaxCodeInt + 1,
|
||||
SouceReadModuleId = item.ReadModuleId,
|
||||
TaskBlindName = item.ReadingName,
|
||||
|
||||
DoctorUserId = oncologySubjectUser == null ? null : oncologySubjectUser.DoctorUserId,
|
||||
AllocateTime = oncologySubjectUser == null ? null : DateTime.Now,
|
||||
TaskAllocationState = oncologySubjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
||||
SuggesteFinishedTime = oncologySubjectUser == null ? null : DateTime.Now.AddDays(7),
|
||||
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
ReadingCategory = item.ReadingCategory
|
||||
|
||||
|
||||
Reference in New Issue
Block a user