diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 1ec525f30..463478307 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -375,6 +375,17 @@ namespace IRaCIS.Core.Application.Image.QA return ResponseOutput.NotOk("核查通过的数据不允许申请回退"); } + var QCChallengeId = await _qcChallengeRepository.Where(x => x.SubjectVisitId == subjectVisitId).Select(x => x.Id).FirstOrDefaultAsync(); + + await _qCChallengeDialogrepository.AddAsync(new QCChallengeDialog() + { + SubjectVisitId = subjectVisitId, + UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt, + QCChallengeId = QCChallengeId, + TalkContent = "CRC 请求回退" + }); + + await _subjectVisitRepository.UpdatePartialFromQueryAsync(subjectVisitId, u => new SubjectVisit() { RequestBackState = RequestBackStateEnum.CRC_RequestBack }, true); return ResponseOutput.Ok();