修改入组

This commit is contained in:
2022-12-02 09:08:26 +08:00
parent 15bbd79e7d
commit 11baf5e887
4 changed files with 12 additions and 12 deletions
@@ -84,6 +84,8 @@ namespace IRaCIS.Core.Application.Services
svCommand.VisitExecuted = svCommand.IsLostVisit ? VisitExecutedEnum.Executed : svCommand.VisitExecuted;
SubjectVisit? dbBeforeEntity = null;
//Add
if (svCommand.Id == null)
@@ -96,6 +98,12 @@ namespace IRaCIS.Core.Application.Services
{
throw new BusinessValidationFailedException("设置末次评估后,不允许添加计划外访视。");
}
if (await _repository.AnyAsync<VisitTask>(t=>t.SubjectId==svCommand.SubjectId && t.TaskState==TaskState.Effect && t.VisitTaskNum > svCommand.VisitNum && t.SignTime != null))
{
throw new BusinessValidationFailedException("该受试者后续访视已有任务完成阅片,不允许在此添加,如果确实需要,请回退");
}
}
dbBeforeEntity = await _subjectVisitRepository.InsertFromDTOAsync(svCommand, false, verifyExp1, verifyExp2, verifyExp3);