修改一版

This commit is contained in:
he
2022-06-27 10:12:47 +08:00
parent fd76f3a5ef
commit 14194bbb00
5 changed files with 19 additions and 15 deletions
@@ -384,7 +384,7 @@ namespace IRaCIS.Core.Application.Service
});
break;
case ReadingCategory.ReadingPeriod:
//case ReadingCategory.ReadingPeriod:
case ReadingCategory.Global:
if (trialConfig.ReadingType == ReadingMethod.Double)
@@ -218,7 +218,6 @@ namespace IRaCIS.Application.Services
if (userTypes.Contains(_userInfo.UserTypeEnumInt))
{
inDto.UploadRole = UploadRole.PM;
}
@@ -516,13 +516,13 @@ namespace IRaCIS.Application.Services
{
// ****** 先生成阅片期 阅片期任务阅片完成之后生成肿瘤学的 如果没有阅片期 直接生成肿瘤学 *********////
#region
Dictionary<ModuleTypeEnum, ReadingCategory> typeChange = new Dictionary<ModuleTypeEnum, ReadingCategory>();
typeChange.Add(ModuleTypeEnum.InPlanSubjectVisit, ReadingCategory.Visit);
typeChange.Add(ModuleTypeEnum.OutPlanSubjectVisit, ReadingCategory.Visit);
Dictionary<ModuleTypeEnum, ReadingCategory> typeChangeDic = new Dictionary<ModuleTypeEnum, ReadingCategory>();
typeChangeDic.Add(ModuleTypeEnum.InPlanSubjectVisit, ReadingCategory.Visit);
typeChangeDic.Add(ModuleTypeEnum.OutPlanSubjectVisit, ReadingCategory.Visit);
//typeChange.Add(ModuleTypeEnum.Read, ReadingCategory.ReadingPeriod);
typeChange.Add(ModuleTypeEnum.Global, ReadingCategory.Global);
typeChange.Add(ModuleTypeEnum.Referee, ReadingCategory.Judge);
typeChange.Add(ModuleTypeEnum.Oncology, ReadingCategory.Oncology);
typeChangeDic.Add(ModuleTypeEnum.Global, ReadingCategory.Global);
typeChangeDic.Add(ModuleTypeEnum.Referee, ReadingCategory.Judge);
typeChangeDic.Add(ModuleTypeEnum.Oncology, ReadingCategory.Oncology);
#endregion
var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstOrDefaultAsync();
List<ReadingGenerataTaskDTO> needReadList = new List<ReadingGenerataTaskDTO>();
@@ -539,9 +539,9 @@ namespace IRaCIS.Application.Services
SubjectId = x.SubjectId,
ReadingName = x.ModuleName,
ReadModuleId = x.Id,
ReadingCategory = typeChange[x.ModuleType],
ReadingCategory = typeChangeDic[x.ModuleType],
}).ToListAsync();
if (needReadList.Any(x => x.ReadingCategory == ReadingCategory.ReadingPeriod))
if (needReadList.Any(x => x.ReadingCategory == ReadingCategory.Global))
{
needReadList = needReadList.Where(x => x.ReadingCategory != ReadingCategory.Oncology).ToList();
}
@@ -549,13 +549,13 @@ namespace IRaCIS.Application.Services
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
{
ReadingCategory = ReadingCategory.ReadingPeriod,
ReadingCategory = ReadingCategory.Global,
TrialId = taskInfo.TrialId,
ReadingGenerataTaskList = needReadList
}) ;
break;
// 肿瘤学
case ReadingCategory.ReadingPeriod:
case ReadingCategory.Global:
var subjectId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
needReadList=await _readModuleRepository.Where(x => x.SubjectVisitId == subjectId&&x.ModuleType==ModuleTypeEnum.Oncology)
.Select(x => new ReadingGenerataTaskDTO
@@ -564,7 +564,7 @@ namespace IRaCIS.Application.Services
SubjectId = x.SubjectId,
ReadingName = x.ModuleName,
ReadModuleId = x.Id,
ReadingCategory = typeChange[x.ModuleType],
ReadingCategory = typeChangeDic[x.ModuleType],
}).ToListAsync();
needReadList = needReadList.Where(x => _visitTaskRepository.Where(y => y.SouceReadModuleId == x.ReadModuleId).Count() == 0).ToList();
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()