diff --git a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs index 059370531..503c95e8d 100644 --- a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs +++ b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs @@ -179,6 +179,14 @@ namespace IRaCIS.Core.Application.Contracts [Authorize(Policy = IRaCISPolicy.IQC)] public async Task AddOrUpdateTrialQCQuestionConfigure(TrialQCQuestionAddOrEdit addOrEditTrialQCQuestionConfigure) { + + + if (await _trialQcQuestionRepository.AnyAsync(x => x.Id != addOrEditQCQuestionConfigure.Id && x.ShowOrder == addOrEditQCQuestionConfigure.ShowOrder)) + { + throw new BusinessValidationFailedException("序号重复,操作失败"); + + } + await VerifyIsQCConfirmedAsync(addOrEditTrialQCQuestionConfigure.TrialId); var entity = await _trialQcQuestionRepository.InsertOrUpdateAsync(addOrEditTrialQCQuestionConfigure, true); diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 7329fd8dd..578021f9e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -1426,10 +1426,36 @@ namespace IRaCIS.Application.Services /// 添加肿瘤学阅片任务 /// /// - public async Task AddOncologyTask(Guid readModuleId) - { - - } + //public async Task AddOncologyTask(Guid readModuleId) + //{ + // var readModuleInfo=await _readModuleRepository.Where(x=>x.Id==readModuleId&& x.ModuleType == ModuleTypeEnum.Oncology).Select(x => new ReadingGenerataTaskDTO + // { + // IsUrgent = x.IsUrgent ?? false, + // SubjectId = x.SubjectId, + // ReadingName = x.ModuleName, + // VisitNum = x.VisitNum, + // ReadModuleId = x.Id, + // ReadingCategory = ReadingCategory.Oncology, + // }).ToListAsync(); + + // // 如果当前是肿瘤学 + // if (readModuleInfo.Count != 0) + // { + // if (taskInfo.JudgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global + // && x.ReadingTaskState == ReadingTaskState.HaveSigned + // ).CountAsync() == (int)readingType)) + // { + // // 有裁判要等裁判完成之后才进行添加 + // await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand() + // { + + // ReadingCategory = GenerateTaskCategory.Oncology, + // TrialId = taskInfo.TrialId, + // ReadingGenerataTaskList = needReadList + // }); + // } + // } + //} ///