From b219593f61bbd0ccbaae9d7919c8afb6295e1a56 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Jun 2024 16:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=85=A5=E7=BB=84=EF=BC=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89spm=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index a0e71f568..9c0124c9b 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -194,6 +194,7 @@ namespace IRaCIS.Application.Services var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId); + var hasSPMOrCPM = await _repository.AnyAsync(t => t.TrialId == trialId && t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM); if (trial != null) { @@ -217,15 +218,14 @@ namespace IRaCIS.Application.Services { if (doctorIdArray.Contains(intoGroupItem.DoctorId)) { - intoGroupItem.EnrollStatus = EnrollStatus.HasCommittedToCRO; - //_enrollRepository.Update(intoGroupItem); + intoGroupItem.EnrollStatus = hasSPMOrCPM ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup; await _enrollDetailRepository.AddAsync(new EnrollDetail() { TrialDetailId = trialDetail.Id, DoctorId = intoGroupItem.DoctorId, TrialId = trialId, - EnrollStatus = EnrollStatus.HasCommittedToCRO, + EnrollStatus = hasSPMOrCPM? EnrollStatus.HasCommittedToCRO :EnrollStatus.InviteIntoGroup, OptUserType = (int)SystemUserType.AdminUser, //后台用户 }); }