From 42f3f6fb6794d8712ee2891fb46e1d804dec3f87 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Sep 2023 16:05:35 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9PI=20=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Test_Study.json | 3 ++- IRaCIS.Core.API/appsettings.json | 6 ------ .../Triggers/VisitTaskIAfterSignTrigger.cs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Test_Study.json b/IRaCIS.Core.API/appsettings.Test_Study.json index 095d3c718..cf0f19818 100644 --- a/IRaCIS.Core.API/appsettings.Test_Study.json +++ b/IRaCIS.Core.API/appsettings.Test_Study.json @@ -7,7 +7,8 @@ } }, "AliyunOSS": { - "endpoint": "http://oss-cn-shanghai.aliyuncs.com", + "endpoint": "https://oss-cn-shanghai.aliyuncs.com", + "region": "oss-cn-shanghai", "accessKeyId": "mpXG7Nu6zTpsDrI1", "accessKeySecret": "yNINcEb099SkNfF6vYKaoP8TZNI3xZ", "bucketName": "zyypacs" diff --git a/IRaCIS.Core.API/appsettings.json b/IRaCIS.Core.API/appsettings.json index a2828b8c7..b363c8ad5 100644 --- a/IRaCIS.Core.API/appsettings.json +++ b/IRaCIS.Core.API/appsettings.json @@ -5,12 +5,6 @@ "Audience": "ZhiZhun", "TokenExpireDays": "7" }, - "AliyunOSS": { - "endpoint": "http://oss-cn-shanghai.aliyuncs.com", - "accessKeyId": "mpXG7Nu6zTpsDrI1", - "accessKeySecret": "yNINcEb099SkNfF6vYKaoP8TZNI3xZ", - "bucketName": "zyypacs" - }, "IpRateLimiting": { "EnableEndpointRateLimiting": true, "StackBlockedRequests": false, diff --git a/IRaCIS.Core.Application/Triggers/VisitTaskIAfterSignTrigger.cs b/IRaCIS.Core.Application/Triggers/VisitTaskIAfterSignTrigger.cs index ab1171212..4cac144c0 100644 --- a/IRaCIS.Core.Application/Triggers/VisitTaskIAfterSignTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/VisitTaskIAfterSignTrigger.cs @@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Triggers { var visitTask = context.Entity; - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI) + if (context.ChangeType == ChangeType.Modified && visitTask.ReadingTaskState==ReadingTaskState.HaveSigned && visitTask.ReadingTaskState != context.UnmodifiedEntity.ReadingTaskState && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI) { visitTask.PIAuditState = PIAuditState.PIAgree; } From f8c9cb1564f08a3497615dcae3478db877ee8da5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Sep 2023 16:20:22 +0800 Subject: [PATCH 02/18] x --- IRaCIS.Core.Application/Service/Document/EmailSendService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index 1f4aa82e5..95015ca45 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -303,7 +303,7 @@ namespace IRaCIS.Core.Application.Service var isEn_us = _userInfo.IsEn_Us; var info = await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).Select(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.SourceSubjectVisit.VisitName, t.Subject.Code }).FirstOrDefaultAsync(); - var answerList= await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).SelectMany(t=>t.ReadingTaskQuestionAnswerList).Select(t=>new { QuestionName= isEn_us? t.ReadingQuestionTrial.QuestionEnName:t.ReadingQuestionTrial.QuestionName, t.ReadingQuestionTrial.DictionaryCode, t.Answer}).ToListAsync(); + var answerList= await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).SelectMany(t=>t.ReadingTaskQuestionAnswerList).Where(t=>t.ReadingQuestionTrial.IsJudgeQuestion==true).Select(t=>new { QuestionName= isEn_us? t.ReadingQuestionTrial.QuestionEnName:t.ReadingQuestionTrial.QuestionName, t.ReadingQuestionTrial.DictionaryCode, t.Answer}).ToListAsync(); var template = "
{0}: {1}
"; @@ -314,7 +314,7 @@ namespace IRaCIS.Core.Application.Service Func transFunc = (bool isNeedTranslate, string dicCode, string answer) => { - var result = translateDataList[dicCode].Where(t => t.Code.ToLower() == answer.ToLower()).Select(t => isEn_us ? t.Value : t.ValueCN).FirstOrDefault(); + var result = translateDataList[dicCode].Where(t => t.Code.ToLower() == answer.ToLower()).Select(t => isEn_us ? t.Value : t.ValueCN).FirstOrDefault()??string.Empty; return result; }; From 786367f9fe23a9850483bc6b1efb4dad29cd0c85 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Sep 2023 16:31:17 +0800 Subject: [PATCH 03/18] x --- IRaCIS.Core.Application/Service/Document/EmailSendService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index 95015ca45..9cfcffda7 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -402,7 +402,7 @@ namespace IRaCIS.Core.Application.Service sendEmailConfig.FromEmailAddress = new MimeKit.MailboxAddress(trialEmailConfig.FromName, trialEmailConfig.FromEmail); sendEmailConfig.AuthorizationCode = trialEmailConfig.AuthorizationCode; - sendEmailConfig.UserName = trialEmailConfig.FromName; + sendEmailConfig.UserName = trialEmailConfig.FromEmail; sendEmailConfig.Host = trialEmailConfig.SMTPServerAddress; sendEmailConfig.Port = trialEmailConfig.SMTPServerPort; From 97cf5ce93c065687ead06b872f1edbc0a78ca7e4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Sep 2023 16:35:26 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Document/EmailSendService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index 9cfcffda7..369c96879 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -387,7 +387,7 @@ namespace IRaCIS.Core.Application.Service } else { - htmlBodyStr = htmlBodyStr.Replace(EmailNamePlaceholder, string.Join(isEn_us ? ", " : "、", toUserList.Select(t => t.FullName).ToList())); + sendEmailConfig.HtmlBodyStr = htmlBodyStr.Replace(EmailNamePlaceholder, string.Join(isEn_us ? ", " : "、", toUserList.Select(t => t.FullName).ToList())); } if (toUserList.Count() == 0) From 45c0704b4014aeb5e6cfbae971d4059cd714ac3f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Sep 2023 17:23:03 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Test_Study.json | 3 ++- .../Service/Document/EmailSendService.cs | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Test_Study.json b/IRaCIS.Core.API/appsettings.Test_Study.json index cf0f19818..84a9f8598 100644 --- a/IRaCIS.Core.API/appsettings.Test_Study.json +++ b/IRaCIS.Core.API/appsettings.Test_Study.json @@ -11,7 +11,8 @@ "region": "oss-cn-shanghai", "accessKeyId": "mpXG7Nu6zTpsDrI1", "accessKeySecret": "yNINcEb099SkNfF6vYKaoP8TZNI3xZ", - "bucketName": "zyypacs" + "bucketName": "zyypacs", + "viewEndpoint": "https://zy-irc-cache.oss-cn-shanghai.aliyuncs.com" }, "ConnectionStrings": { "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Test.Study;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index 369c96879..58d05834f 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -314,9 +314,17 @@ namespace IRaCIS.Core.Application.Service Func transFunc = (bool isNeedTranslate, string dicCode, string answer) => { - var result = translateDataList[dicCode].Where(t => t.Code.ToLower() == answer.ToLower()).Select(t => isEn_us ? t.Value : t.ValueCN).FirstOrDefault()??string.Empty; + if (isNeedTranslate && translateDataList.ContainsKey(dicCode)) + { + var result = translateDataList[dicCode].Where(t => t.Code.ToLower() == answer.ToLower()).Select(t => isEn_us ? t.Value : t.ValueCN).FirstOrDefault() ?? string.Empty; + return result; + + } + else + { + return string.Empty; + } - return result; }; var piResult= string.Join(' ', answerList.Select(t => string.Format(template, t.QuestionName, transFunc(!string.IsNullOrEmpty(t.DictionaryCode),t.DictionaryCode,t.Answer ) ))) ; From a47f2fd4966b8a1d0113b323e802b7a9755ca74f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Sep 2023 17:25:42 +0800 Subject: [PATCH 06/18] x --- IRaCIS.Core.Application/Service/Document/EmailSendService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index 58d05834f..f79613546 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -316,13 +316,13 @@ namespace IRaCIS.Core.Application.Service { if (isNeedTranslate && translateDataList.ContainsKey(dicCode)) { - var result = translateDataList[dicCode].Where(t => t.Code.ToLower() == answer.ToLower()).Select(t => isEn_us ? t.Value : t.ValueCN).FirstOrDefault() ?? string.Empty; + var result = translateDataList[dicCode].Where(t => t.Code.ToLower() == answer.ToLower()).Select(t => isEn_us ? t.Value : t.ValueCN).FirstOrDefault() ?? answer; return result; } else { - return string.Empty; + return answer; } }; From 1ac336220ed3919ffef38d501324b03dc6412879 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 5 Sep 2023 10:45:01 +0800 Subject: [PATCH 07/18] =?UTF-8?q?oss=20=E6=9D=83=E9=99=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ExtraController.cs | 60 ++++++++++++++++--- IRaCIS.Core.API/IRaCIS.Core.API.csproj | 1 + IRaCIS.Core.API/appsettings.Test_Study.json | 6 +- 3 files changed, 56 insertions(+), 11 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index 2347dde27..83f862185 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -21,6 +21,10 @@ using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Infrastructure; using System.Linq; using Microsoft.Extensions.Logging; +using Aliyun.Acs.Core; +using Aliyun.Acs.Core.Profile; +using Aliyun.Acs.Sts.Model.V20150401; +using Microsoft.AspNetCore.Hosting; namespace IRaCIS.Api.Controllers { @@ -32,7 +36,7 @@ namespace IRaCIS.Api.Controllers { - + @@ -43,7 +47,7 @@ namespace IRaCIS.Api.Controllers /// 系统用户登录接口[New] [HttpPost, Route("user/login")] [AllowAnonymous] - public async Task> Login(UserLoginDTO loginUser, [FromServices] IEasyCachingProvider provider, [FromServices] IUserService _userService, + public async Task> Login(UserLoginDTO loginUser, [FromServices] IEasyCachingProvider provider, [FromServices] IUserService _userService, [FromServices] ITokenService _tokenService, [FromServices] IConfiguration configuration) { @@ -118,7 +122,7 @@ namespace IRaCIS.Api.Controllers // 创建一个 CookieOptions 对象,用于设置 Cookie 的属性 var option = new CookieOptions { - Expires = DateTime.Now.AddMonths(1), + Expires = DateTime.Now.AddMonths(1), HttpOnly = true, // 确保 cookie 只能通过 HTTP 访问 SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None, // 设置 SameSite 属性 Secure = true // 确保 cookie 只能通过 HTTPS 访问 @@ -136,6 +140,46 @@ namespace IRaCIS.Api.Controllers } + [HttpGet("user/GenerateSTS")] + public IResponseOutput GenerateSTS( [FromServices] IWebHostEnvironment webHostEnvironment) + { + + + var configuration = new ConfigurationBuilder() + .AddJsonFile($"appsettings.{webHostEnvironment.EnvironmentName}.json") + .Build(); + + //configuration["AliyunOSS:region"] + + IClientProfile profile = DefaultProfile.GetProfile("cn-shanghai", configuration["AliyunOSS:accessKeyId"], configuration["AliyunOSS:accessKeySecret"]); + DefaultAcsClient client = new DefaultAcsClient(profile); + + // 创建一个STS请求 + AssumeRoleRequest request = new AssumeRoleRequest + { + RoleArn = "acs:ram::1899121822495495:role/oss-upload", // 角色ARN,需要替换为你的角色ARN + RoleSessionName = "session-name", // 角色会话名称,可自定义 + DurationSeconds = 3600, // 令牌有效期(单位:秒),这里设置为1小时 + }; + + + AssumeRoleResponse response = client.GetAcsResponse(request); + + // 返回STS令牌信息给前端 + var stsToken = new + { + AccessKeyId = response.Credentials.AccessKeyId, + AccessKeySecret = response.Credentials.AccessKeySecret, + SecurityToken = response.Credentials.SecurityToken, + Expiration = response.Credentials.Expiration + }; + + return ResponseOutput.Ok(stsToken); + + } + + + [HttpGet, Route("imageShare/ShareImage")] [AllowAnonymous] @@ -162,12 +206,12 @@ namespace IRaCIS.Api.Controllers [HttpGet("User/UserRedirect")] [AllowAnonymous] - public async Task UserRedirect([FromServices] IRepository _userRepository, string url ,[FromServices]ILogger _logger) + public async Task UserRedirect([FromServices] IRepository _userRepository, string url, [FromServices] ILogger _logger) { var decodeUrl = System.Web.HttpUtility.UrlDecode(url); - var userId = decodeUrl.Substring(decodeUrl.IndexOf("UserId=") + "UserId=".Length , 36) ; + var userId = decodeUrl.Substring(decodeUrl.IndexOf("UserId=") + "UserId=".Length, 36); var token = decodeUrl.Substring(decodeUrl.IndexOf("access_token=") + "access_token=".Length); @@ -175,12 +219,12 @@ namespace IRaCIS.Api.Controllers var domainStrList = decodeUrl.Split("/").ToList().Take(3).ToList(); - var errorUrl = domainStrList[0]+"//"+ domainStrList[2]+ "/error"; + var errorUrl = domainStrList[0] + "//" + domainStrList[2] + "/error"; - if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd)) + if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd)) { - decodeUrl = errorUrl+ $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang=="zh"? "您的初始化链接已过期": "Error!The initialization link has expired. Return")} "; + decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang == "zh" ? "您的初始化链接已过期" : "Error!The initialization link has expired. Return")} "; } return Redirect(decodeUrl); diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index c26422bca..a823da33e 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -66,6 +66,7 @@ + diff --git a/IRaCIS.Core.API/appsettings.Test_Study.json b/IRaCIS.Core.API/appsettings.Test_Study.json index 84a9f8598..28a370d30 100644 --- a/IRaCIS.Core.API/appsettings.Test_Study.json +++ b/IRaCIS.Core.API/appsettings.Test_Study.json @@ -9,10 +9,10 @@ "AliyunOSS": { "endpoint": "https://oss-cn-shanghai.aliyuncs.com", "region": "oss-cn-shanghai", - "accessKeyId": "mpXG7Nu6zTpsDrI1", - "accessKeySecret": "yNINcEb099SkNfF6vYKaoP8TZNI3xZ", + "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", + "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", "bucketName": "zyypacs", - "viewEndpoint": "https://zy-irc-cache.oss-cn-shanghai.aliyuncs.com" + "viewEndpoint": "https://zyypacs.oss-cn-shanghai.aliyuncs.com" }, "ConnectionStrings": { "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Test.Study;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", From dce2509613cab48ff08bad84380b34dec77052a1 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 5 Sep 2023 11:11:57 +0800 Subject: [PATCH 08/18] oss --- .../Controllers/ExtraController.cs | 9 +++++-- IRaCIS.Core.API/appsettings.Test_Study.json | 3 ++- .../Service/Document/EmailSendService.cs | 26 ++++++++++++------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index 83f862185..952dc6547 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -149,7 +149,7 @@ namespace IRaCIS.Api.Controllers .AddJsonFile($"appsettings.{webHostEnvironment.EnvironmentName}.json") .Build(); - //configuration["AliyunOSS:region"] + IClientProfile profile = DefaultProfile.GetProfile("cn-shanghai", configuration["AliyunOSS:accessKeyId"], configuration["AliyunOSS:accessKeySecret"]); DefaultAcsClient client = new DefaultAcsClient(profile); @@ -171,7 +171,12 @@ namespace IRaCIS.Api.Controllers AccessKeyId = response.Credentials.AccessKeyId, AccessKeySecret = response.Credentials.AccessKeySecret, SecurityToken = response.Credentials.SecurityToken, - Expiration = response.Credentials.Expiration + Expiration = response.Credentials.Expiration, + + Region= configuration["AliyunOSS:region"], + BucketName = configuration["AliyunOSS:accessKeyId"], + ViewEndpoint = configuration["AliyunOSS:viewEndpoint"], + }; return ResponseOutput.Ok(stsToken); diff --git a/IRaCIS.Core.API/appsettings.Test_Study.json b/IRaCIS.Core.API/appsettings.Test_Study.json index 28a370d30..d0fe43db3 100644 --- a/IRaCIS.Core.API/appsettings.Test_Study.json +++ b/IRaCIS.Core.API/appsettings.Test_Study.json @@ -7,8 +7,9 @@ } }, "AliyunOSS": { - "endpoint": "https://oss-cn-shanghai.aliyuncs.com", + "regionId": "cn-shanghai", "region": "oss-cn-shanghai", + "endpoint": "https://oss-cn-shanghai.aliyuncs.com", "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", "bucketName": "zyypacs", diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index f79613546..3ba1934e5 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Service return (topicStr, htmlBodyStr, isEn_us, null); }; - await SendTrialEmailAsync(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc); + await SendTrialEmailAsync(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc,taskInfo.SiteId); } @@ -283,7 +283,7 @@ namespace IRaCIS.Core.Application.Service var isEn_us = _userInfo.IsEn_Us; - var info = await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).Select(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.SourceSubjectVisit.VisitName, t.Subject.Code }).FirstOrDefaultAsync(); + var info = await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).Select(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.SourceSubjectVisit.VisitName, t.Subject.SiteId, t.Subject.Code }).FirstOrDefaultAsync(); Func topicAndHtmlFunc = trialEmailConfig => @@ -294,7 +294,7 @@ namespace IRaCIS.Core.Application.Service return (topicStr, htmlBodyStr, isEn_us, null); }; - await SendTrialEmailAsync(info.TrialId, EmailBusinessScenario.ClinicalDataQuestion, topicAndHtmlFunc); + await SendTrialEmailAsync(info.TrialId, EmailBusinessScenario.ClinicalDataQuestion, topicAndHtmlFunc,info.SiteId); } @@ -302,7 +302,7 @@ namespace IRaCIS.Core.Application.Service { var isEn_us = _userInfo.IsEn_Us; - var info = await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).Select(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.SourceSubjectVisit.VisitName, t.Subject.Code }).FirstOrDefaultAsync(); + var info = await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).Select(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.SourceSubjectVisit.VisitName, t.Subject.SiteId, t.Subject.Code }).FirstOrDefaultAsync(); var answerList= await _repository.Where(t => t.Id == visitTaskId, ignoreQueryFilters: true).SelectMany(t=>t.ReadingTaskQuestionAnswerList).Where(t=>t.ReadingQuestionTrial.IsJudgeQuestion==true).Select(t=>new { QuestionName= isEn_us? t.ReadingQuestionTrial.QuestionEnName:t.ReadingQuestionTrial.QuestionName, t.ReadingQuestionTrial.DictionaryCode, t.Answer}).ToListAsync(); var template = "
{0}: {1}
"; @@ -337,12 +337,12 @@ namespace IRaCIS.Core.Application.Service return (topicStr, htmlBodyStr, isEn_us, null); }; - await SendTrialEmailAsync(info.TrialId, EmailBusinessScenario.PIAuditResutl, topicAndHtmlFunc); + await SendTrialEmailAsync(info.TrialId, EmailBusinessScenario.PIAuditResutl, topicAndHtmlFunc, info.SiteId); } - public async Task SendTrialEmailAsync(Guid trialId, EmailBusinessScenario businessScenario, Func topicAndHtmlFunc, Guid? trialReadingCriterionId = null, Guid? subjectId = null) + public async Task SendTrialEmailAsync(Guid trialId, EmailBusinessScenario businessScenario, Func topicAndHtmlFunc, Guid? siteId = null, Guid? trialReadingCriterionId = null) { //找到配置 var trialEmailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionId && t.BusinessScenarioEnum == businessScenario, ignoreQueryFilters: true) @@ -366,7 +366,7 @@ namespace IRaCIS.Core.Application.Service var blackUserIdList = trialEmailConfig.TrialEmailBlackUserList.Select(t => t.UserId).ToList(); - //收件人 如果是CRC CRA 要按照中心发送 + var toUserTypeEnumList = trialEmailConfig.TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.To).Select(c => c.UserType).ToList(); var copyUserTypeEnumList = trialEmailConfig.TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(c => c.UserType).ToList(); @@ -379,10 +379,18 @@ namespace IRaCIS.Core.Application.Service var toUserList = allUserList.Where(t => toUserTypeEnumList.Contains(t.UserTypeEnum)) .ToList(); - if (subjectId != null) + //收件人 有CRC CRA , CRC CRA的账户要按照中心发送 + if (siteId == null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) { - toUserList = _repository.Where(t => t.TrialId == trialId && toUserTypeEnumList.Contains(t.User.UserTypeEnum) && t.TrialSite.SubjectList.Any(c => c.Id == subjectId)).Select(t => new { t.UserId, t.User.EMail, t.User.FullName, t.User.UserTypeEnum }).ToList(); + throw new BusinessValidationFailedException("当前场景收件人包含CRC CRA,但是没有siteId,请联系后端开发"); } + if (siteId != null && toUserTypeEnumList.Any(t=>t==UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) + { + var curentSiteUserIdList= _repository.Where(t=>t.TrialId==trialId && t.SiteId==siteId).Select(t=>t.UserId).ToList(); + + toUserList=toUserList.Where(t=>(t.UserTypeEnum!=UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator)|| curentSiteUserIdList.Contains(t.UserId)).ToList(); + } + //去除黑名单 toUserList = toUserList.Where(t => !blackUserIdList.Contains(t.UserId)).ToList(); From c2bf16e1ff1823d0c9e379d1bd11cb82d58d6401 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 5 Sep 2023 11:49:35 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Inspection/InspectionService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 7aed50550..581e6f24d 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -190,7 +190,7 @@ namespace IRaCIS.Core.Application.Service.Inspection .WhereIf(dto.StartTime != null, x => x.CreateTime >= dto.StartTime) .WhereIf(dto.EndTime != null, x => x.CreateTime <= dto.EndTime) .WhereIf(dto.ModuleType != null, x => x.ModuleTypeId == dto.ModuleType) - .WhereIf(!dto.Description.IsNullOrEmpty(), x => x.Description == dto.Description) + .WhereIf(!dto.Description.IsNullOrEmpty(), x => x.Description.Contains(dto.Description)|| x.DescriptionCN.Contains(dto.Description)) .WhereIf(!dto.OpByUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(dto.OpByUserName)) //.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo)) .WhereIf(dto.IsSign != null, x => x.IsSign == dto.IsSign); From a92bbbb27583ca8dc5a7cd6662d5c7f7e9944794 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 5 Sep 2023 13:17:32 +0800 Subject: [PATCH 10/18] x --- IRaCIS.Core.Application/Service/Document/EmailSendService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index 3ba1934e5..20295ce6d 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -380,7 +380,7 @@ namespace IRaCIS.Core.Application.Service .ToList(); //收件人 有CRC CRA , CRC CRA的账户要按照中心发送 - if (siteId == null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) + if (siteId == null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA) && onlyToUserId == null) { throw new BusinessValidationFailedException("当前场景收件人包含CRC CRA,但是没有siteId,请联系后端开发"); } From 609a7fb4276617e6d63070034865b7a840f2dc46 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 5 Sep 2023 13:38:34 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Uat_Study.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Uat_Study.json b/IRaCIS.Core.API/appsettings.Uat_Study.json index c386ad7ff..04722655c 100644 --- a/IRaCIS.Core.API/appsettings.Uat_Study.json +++ b/IRaCIS.Core.API/appsettings.Uat_Study.json @@ -7,10 +7,13 @@ } }, "AliyunOSS": { - "endpoint": "http://oss-cn-shanghai.aliyuncs.com", - "accessKeyId": "mpXG7Nu6zTpsDrI1", - "accessKeySecret": "yNINcEb099SkNfF6vYKaoP8TZNI3xZ", - "bucketName": "zyypacs" + "regionId": "cn-shanghai", + "region": "oss-cn-shanghai", + "endpoint": "https://oss-cn-shanghai.aliyuncs.com", + "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", + "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", + "bucketName": "zyypacs", + "viewEndpoint": "https://zyypacs.oss-cn-shanghai.aliyuncs.com" }, "ConnectionStrings": { "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Uat.Study;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", @@ -29,7 +32,6 @@ "LoginFailLockMinutes": 30 - }, "SystemEmailSendConfig": { From 9234e7ebe985a221dac806aeeb55607d3379050e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 5 Sep 2023 15:51:03 +0800 Subject: [PATCH 12/18] x --- IRaCIS.Core.API/Controllers/ExtraController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index 952dc6547..e7566a39d 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -174,7 +174,7 @@ namespace IRaCIS.Api.Controllers Expiration = response.Credentials.Expiration, Region= configuration["AliyunOSS:region"], - BucketName = configuration["AliyunOSS:accessKeyId"], + BucketName = configuration["AliyunOSS:bucketName"], ViewEndpoint = configuration["AliyunOSS:viewEndpoint"], }; From f31a6408ac7d8078fde88a5f5db9891cf9449672 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Sep 2023 11:06:49 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E9=98=85?= =?UTF-8?q?=E7=89=87=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/ExtraController.cs | 6 ------ .../Service/Allocation/DTO/VisitTaskViewModel.cs | 6 ++++++ .../Service/Allocation/VisitTaskService.cs | 7 ++++--- IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs | 4 +++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index e7566a39d..d5d0d43b1 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -38,12 +38,6 @@ namespace IRaCIS.Api.Controllers - - - - - - /// 系统用户登录接口[New] [HttpPost, Route("user/login")] [AllowAnonymous] diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 74f089551..d94c9f5ad 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -273,6 +273,12 @@ namespace IRaCIS.Core.Application.ViewModel public ReReadingApplyState ReReadingApplyState { get; set; } public DateTime? SuggesteFinishedTime { get; set; } + + + public string UserName { get; set; } + public string FullName { get; set; } + + } public class IRUnReadSubjectView diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index b2c80894a..0c11cc06d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -783,11 +783,12 @@ namespace IRaCIS.Core.Application.Service.Allocation [HttpPost] public async Task> GetIRHaveReadTaskList(VisitTaskQuery queryVisitTask) { - + var curentUserSiteIdList=_trialRepository.Where(t=>t.Id==queryVisitTask.TrialId).SelectMany(t=>t.TrialSiteUserList).Where(t=>t.UserId==_userInfo.Id).Select(t=>t.SiteId).ToList(); var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId) - .Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据 - + .Where(t =>/* t.DoctorUserId == _userInfo.Id &&*/ t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据 + .WhereIf(_userInfo.UserTypeEnumInt==(int)UserTypeEnum.PI,t=>t.DoctorUser.UserTypeEnum==UserTypeEnum.PI) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR, t => t.DoctorUser.UserTypeEnum == UserTypeEnum.SR && curentUserSiteIdList.Contains(t.Subject.SiteId)) .WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId) .WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId) diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 7e60cc7ac..dc05bd84b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -110,7 +110,9 @@ namespace IRaCIS.Core.Application.Service CreateMap().IncludeBase() .ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) - .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code)); + .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)); From 5ae3220e67ee893949d58017a5f59c1a2ee805aa Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Sep 2023 14:39:31 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A8=BD=E6=9F=A5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Inspection/InspectionService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 581e6f24d..faa794da4 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -162,7 +162,8 @@ namespace IRaCIS.Core.Application.Service.Inspection }; query = query.WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId) - .Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) + //.Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) + .Where(x => x.TrialId == dto.TrialId ) #region 废弃 // .WhereIf(dto.BatchId != null && dto.ObjectRelationParentId == null && dto.GeneralId == null, x => x.BatchId == dto.BatchId) From b0dbe1442cc6fd74a3e9b06eb88e35e62a9bec10 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 7 Sep 2023 10:27:51 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Test_Study.json | 4 ++-- IRaCIS.Core.API/appsettings.Uat_Study.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Test_Study.json b/IRaCIS.Core.API/appsettings.Test_Study.json index d0fe43db3..eb1ea2b23 100644 --- a/IRaCIS.Core.API/appsettings.Test_Study.json +++ b/IRaCIS.Core.API/appsettings.Test_Study.json @@ -12,8 +12,8 @@ "endpoint": "https://oss-cn-shanghai.aliyuncs.com", "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", - "bucketName": "zyypacs", - "viewEndpoint": "https://zyypacs.oss-cn-shanghai.aliyuncs.com" + "bucketName": "zy-sir-test-store", + "viewEndpoint": "https://zy-sir-test-store.oss-cn-shanghai.aliyuncs.com" }, "ConnectionStrings": { "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Test.Study;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", diff --git a/IRaCIS.Core.API/appsettings.Uat_Study.json b/IRaCIS.Core.API/appsettings.Uat_Study.json index 04722655c..9b7808af7 100644 --- a/IRaCIS.Core.API/appsettings.Uat_Study.json +++ b/IRaCIS.Core.API/appsettings.Uat_Study.json @@ -12,8 +12,8 @@ "endpoint": "https://oss-cn-shanghai.aliyuncs.com", "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", - "bucketName": "zyypacs", - "viewEndpoint": "https://zyypacs.oss-cn-shanghai.aliyuncs.com" + "bucketName": "zy-sir-uat-store", + "viewEndpoint": "https://zy-sir-uat-store.oss-cn-shanghai.aliyuncs.com" }, "ConnectionStrings": { "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Uat.Study;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", From f464b25c2b4851ec9e7cf8779477b405f74e71f0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 7 Sep 2023 14:20:50 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/UserTypeService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs index fb534f4e9..dbdf4e5e1 100644 --- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs @@ -143,7 +143,7 @@ namespace IRaCIS.Core.Application.Contracts if (userTypeSelectEnum == UserTypeSelectEnum.TrialDoc) { - userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM }; + userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM ,UserTypeEnum.ClinicalResearchCoordinator}; } From ebf05df568fffe637a01c512a4bb6091b5989dd6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 7 Sep 2023 14:20:50 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/UserTypeService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs index fb534f4e9..e0e1b6143 100644 --- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs @@ -143,7 +143,7 @@ namespace IRaCIS.Core.Application.Contracts if (userTypeSelectEnum == UserTypeSelectEnum.TrialDoc) { - userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM }; + userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM ,UserTypeEnum.ClinicalResearchCoordinator,UserTypeEnum.CRA }; } From 99b7d3a4f82c85632eae34ae6bf9e81534aa7995 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 7 Sep 2023 14:32:21 +0800 Subject: [PATCH 18/18] x --- IRaCIS.Core.Application/Service/Management/UserTypeService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs index e0e1b6143..5fa282465 100644 --- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs @@ -143,7 +143,7 @@ namespace IRaCIS.Core.Application.Contracts if (userTypeSelectEnum == UserTypeSelectEnum.TrialDoc) { - userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM ,UserTypeEnum.ClinicalResearchCoordinator,UserTypeEnum.CRA }; + userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM }; } @@ -164,7 +164,7 @@ namespace IRaCIS.Core.Application.Contracts /// public async Task> GetTrialUserTypeList() { - var userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC,UserTypeEnum.IM,UserTypeEnum.MIM }; + var userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC,UserTypeEnum.IM,UserTypeEnum.MIM ,UserTypeEnum.ClinicalResearchCoordinator, UserTypeEnum.CRA }; var query = _userTypeRepository // .Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)