增加验证
This commit is contained in:
@@ -104,6 +104,14 @@ namespace IRaCIS.Application.Services
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> SetEnrollReadingCategory(SetEnrollReadingCategoryInDto inDto)
|
||||
{
|
||||
|
||||
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))
|
||||
{
|
||||
return ResponseOutput.NotOk("已经开始读片,不允许修改阅片类型");
|
||||
}
|
||||
|
||||
await _enrollReadingCategoryRepository.BatchDeleteNoTrackingAsync(x => x.EnrollId == inDto.EnrollId);
|
||||
|
||||
List<EnrollReadingCategory> enrollReadings = inDto.ReadingCategorys.Select(x => new EnrollReadingCategory()
|
||||
|
||||
Reference in New Issue
Block a user