bug修复

Uat_Study
hang 2022-07-28 11:10:53 +08:00
parent 136b59b074
commit 00c309d995
1 changed files with 11 additions and 2 deletions

View File

@ -107,9 +107,18 @@ namespace IRaCIS.Application.Services
var enroll = await _enrollRepository.FirstAsync(t => t.Id == inDto.EnrollId);
if(_repository.Where<VisitTask>(t=>t.TrialId==enroll.TrialId && t.DoctorUserId==enroll.DoctorUserId ).Any(t=>t.ReadingTaskState != ReadingTaskState.WaitReading))
if (_repository.Where<VisitTask>(t=>t.TrialId==enroll.TrialId && t.DoctorUserId==enroll.DoctorUserId && t.TaskAllocationState==TaskAllocationState.Allocated).Any())
{
return ResponseOutput.NotOk("已经开始读片,不允许修改阅片类型");
var readingCategoryList = await _enrollReadingCategoryRepository.Where(t => t.EnrollId == inDto.EnrollId).Select(t => t.ReadingCategory).ToListAsync();
if(readingCategoryList.Except(inDto.ReadingCategorys).Count() > 0)
{
return ResponseOutput.NotOk("已分配任务,不允许减少阅片类型");
}
}
await _enrollReadingCategoryRepository.BatchDeleteNoTrackingAsync(x => x.EnrollId == inDto.EnrollId);