From 73edbe8fd37a56a0ede5e2d05bb726d025b6d753 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 25 Jun 2024 09:17:28 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=A0=E6=8E=89=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/IRaCIS.Core.API.csproj | 1 - IRaCIS.Core.API/_ServiceExtensions/Serilog/SerilogSetup.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index 4f364beff..f6e1614ef 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -79,7 +79,6 @@ - diff --git a/IRaCIS.Core.API/_ServiceExtensions/Serilog/SerilogSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/Serilog/SerilogSetup.cs index 7da66607b..a010e8595 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/Serilog/SerilogSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/Serilog/SerilogSetup.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Builder; using Serilog; using Serilog.Events; -using Serilog.Sinks.Email; +//using Serilog.Sinks.Email; using System; using System.Net; From d3ab051a394b335f5e11ba06a1c484d62be66c13 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 25 Jun 2024 10:26:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?spm=20cpm=20=20=E8=BF=94=E5=9B=9E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index 3b4b365b9..6849dd81e 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -271,7 +271,7 @@ namespace IRaCIS.Application.Services } - return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync()); + return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync(), new {IsHaveSpmOrCPM=hasSPMOrCPM}); } //$"Cannot find trial {trialId}" return ResponseOutput.NotOk(_localizer["Enroll_NotFound", trialId]); From 9048963ea5ae76ef2806ed7253a009253321eb4c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 25 Jun 2024 10:28:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index 6849dd81e..1f1b427c9 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -271,7 +271,7 @@ namespace IRaCIS.Application.Services } - return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync(), new {IsHaveSpmOrCPM=hasSPMOrCPM}); + return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync(), new {IsHaveSPMOrCPM=hasSPMOrCPM}); } //$"Cannot find trial {trialId}" return ResponseOutput.NotOk(_localizer["Enroll_NotFound", trialId]); From 452535b56190578a968eaf371e8a561900561076 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 25 Jun 2024 10:52:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 2f4cdec0c..27779454a 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -726,15 +726,15 @@ namespace IRaCIS.Core.Application.Contracts t.Email, }).ToListAsync(); - var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList(); + //var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList(); - if (!currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)) + if (!siteUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserTypeEnum == UserTypeEnum.CRA)) { throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_MissingAccount"]); } - if (currentUserList.Where(t => t.IsGenerateAccount && t.UserTypeId != null).GroupBy(t => new { t.UserTypeId, t.Email }) + if (siteUserList.Where(t => t.IsGenerateAccount && t.UserTypeId != null).GroupBy(t => new { t.UserTypeId, t.Email }) .Any(g => g.Count() > 1)) { throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_DuplicateEmail"]);