Uat_Study
parent
cb5ac13d3a
commit
e846710381
|
@ -974,10 +974,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
public async Task<IResponseOutput> ObtainOrCancelQCTask(Guid trialId, Guid subjectVisitId, bool obtaionOrCancel)
|
||||
{
|
||||
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.CurrentActionUserId != null && t.IsTake && t.Id == subjectVisitId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前访视已被领取,不允许领取");
|
||||
}
|
||||
|
||||
|
||||
var dbSubjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
|
||||
|
||||
|
@ -989,6 +986,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
if (obtaionOrCancel)
|
||||
{
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.CurrentActionUserId != null && t.IsTake && t.Id == subjectVisitId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前访视已被领取,不允许领取");
|
||||
}
|
||||
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Trial.QCQuestionConfirmedUserId == null && t.Id == subjectVisitId))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue