From c4f0b0d60dd7d7fa1b27c2cb3b956761c27ff103 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 24 Nov 2023 11:19:41 +0800 Subject: [PATCH 01/12] =?UTF-8?q?OSS=20=E7=A8=BD=E6=9F=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20,=E6=96=B0=E5=A2=9E=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/UploadDownLoadController.cs | 2 +- IRaCIS.Core.API/Startup.cs | 6 ++++++ IRaCIS.Core.Application/Helper/OSSService.cs | 17 ++++++++++++++++- .../IRaCIS.Core.Application.xml | 19 +++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index 35ffd637d..7fe4bd220 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -563,7 +563,7 @@ namespace IRaCIS.Core.API.Controllers templateFileStream.Seek(0, SeekOrigin.Begin); - var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/SiteSurvey", realFileName); + var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/Check", realFileName); await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId }); diff --git a/IRaCIS.Core.API/Startup.cs b/IRaCIS.Core.API/Startup.cs index 3e071a8bc..56c190f39 100644 --- a/IRaCIS.Core.API/Startup.cs +++ b/IRaCIS.Core.API/Startup.cs @@ -71,6 +71,8 @@ namespace IRaCIS.Core.API // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { + //健康检查 + services.AddHealthChecks(); //本地化 services.AddJsonLocalization(options => options.ResourcesPath = "Resources"); @@ -167,6 +169,8 @@ namespace IRaCIS.Core.API // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public async void Configure(IApplicationBuilder app, IWebHostEnvironment env) { + + //本地化 app.UseLocalization(); @@ -234,6 +238,8 @@ namespace IRaCIS.Core.API endpoints.MapControllers(); endpoints.MapHub("/UploadHub"); + + endpoints.MapHealthChecks("/health"); }); var hangfireJobService = app.ApplicationServices.GetRequiredService(); diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index dab2bb588..c83ec5fc4 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -113,6 +113,14 @@ namespace IRaCIS.Core.Application.Helper } + /// + /// oosFolderPath 涓嶈 "/ "寮澶 搴旇锛 TempFolder/ChildFolder + /// + /// + /// + /// + /// + /// public string UploadToOSS(Stream fileStream, string oosFolderPath,string fileRealName) { @@ -133,7 +141,7 @@ namespace IRaCIS.Core.Application.Helper } - return ossRelativePath; + return "/" + ossRelativePath; } catch (Exception ex) { @@ -142,6 +150,13 @@ namespace IRaCIS.Core.Application.Helper } } + /// + /// oosFolderPath 涓嶈 "/ "寮澶 搴旇锛 TempFolder/ChildFolder + /// + /// + /// + /// + /// public string UploadToOSS(string localFilePath, string oosFolderPath) { var localFileName = Path.GetFileName(localFilePath); diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 5db76d015..ead68d4e4 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -85,6 +85,25 @@ + + + oosFolderPath 涓嶈 "/ "寮澶 搴旇锛 TempFolder/ChildFolder + + + + + + + + + + oosFolderPath 涓嶈 "/ "寮澶 搴旇锛 TempFolder/ChildFolder + + + + + + 鍒嗛厤瑙勫垯 From 63b02936b1773a72bc461f51d4fbceff3445efe5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 27 Nov 2023 13:27:44 +0800 Subject: [PATCH 02/12] =?UTF-8?q?1127=20=E7=A8=BD=E6=9F=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index fa20e384d..3d843b49d 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -1666,6 +1666,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common } await InsertInspection(entity, type, x => new InspectionConvertDTO() { + IsDistinctionInterface= type == AuditOpt.Update ? true : false, TrialId = x.TrialId, ObjectRelationParentId = x.TrialId @@ -1716,6 +1717,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common await InsertInspection(item.Entity as TrialSiteUser, type, x => new InspectionConvertDTO { + IsDistinctionInterface= type == AuditOpt.Update ? true : false, TrialId = x.TrialId, ObjectRelationParentId = entity.TrialSite.Id, ObjectRelationParentId2 = x.UserId, From 3a3212f96c53d2d7f155cf15e5a9a88f7d0ad461 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 27 Nov 2023 16:16:39 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Properties/launchSettings.json | 6 +++--- .../{appsettings.Staging.json => appsettings.Uat_IRC.json} | 4 ++-- .../Service/Document/TrialDocumentService.cs | 2 +- IRaCIS.Core.Domain/SQLFile/20230613.sql | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) rename IRaCIS.Core.API/{appsettings.Staging.json => appsettings.Uat_IRC.json} (78%) diff --git a/IRaCIS.Core.API/Properties/launchSettings.json b/IRaCIS.Core.API/Properties/launchSettings.json index 9016eb3ac..c4b3f9f6a 100644 --- a/IRaCIS.Core.API/Properties/launchSettings.json +++ b/IRaCIS.Core.API/Properties/launchSettings.json @@ -30,11 +30,11 @@ "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "publishAllPorts": true }, - "IRaCIS.Staging": { + "IRaCIS.Uat_IRC": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Staging" + "ASPNETCORE_ENVIRONMENT": "Uat_IRC" }, "applicationUrl": "http://localhost:6100" }, @@ -46,6 +46,6 @@ }, "applicationUrl": "http://localhost:6300" } - + } } \ No newline at end of file diff --git a/IRaCIS.Core.API/appsettings.Staging.json b/IRaCIS.Core.API/appsettings.Uat_IRC.json similarity index 78% rename from IRaCIS.Core.API/appsettings.Staging.json rename to IRaCIS.Core.API/appsettings.Uat_IRC.json index 0564ea927..570b586c7 100644 --- a/IRaCIS.Core.API/appsettings.Staging.json +++ b/IRaCIS.Core.API/appsettings.Uat_IRC.json @@ -7,8 +7,8 @@ } }, "ConnectionStrings": { - "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Uat_IRC;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", - "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Uat.Study.Hangfire;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" + "RemoteNew": "Server=47.117.164.182,1434;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true", + "Hangfire": "Server=47.117.164.182,1434;Database=Uat_IRC.Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true" }, "AliyunOSS": { diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 6aa7b4ee9..fcdfa5c1f 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -165,7 +165,7 @@ namespace IRaCIS.Core.Application.Services var trialId = querySystemDocument.TrialId; - var trialInfo = await (_repository.Where(t => t.Id == querySystemDocument.TrialId).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstOrDefaultAsync()); + var trialInfo = await (_repository.Where(t => t.Id == querySystemDocument.TrialId,ignoreQueryFilters:true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstOrDefaultAsync()); //绯荤粺鏂囨。鏌ヨ var systemDocumentQueryable = from needConfirmedUserType in _repository.Where(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) diff --git a/IRaCIS.Core.Domain/SQLFile/20230613.sql b/IRaCIS.Core.Domain/SQLFile/20230613.sql index c071ae52a..a5c0d9fd6 100644 --- a/IRaCIS.Core.Domain/SQLFile/20230613.sql +++ b/IRaCIS.Core.Domain/SQLFile/20230613.sql @@ -95,8 +95,6 @@ WHERE --缁存姢 鍒犻櫎涓村簥鏁版嵁閰嶇疆锛屽鑷村垹闄ら槄鐗囨湡闂 delete ReadingClinicalData ---88020000-3E02-0016-9DA6-08DB6705F7C1 ---select * from ReadingClinicalData INNER JOIN ReadModule on ReadingClinicalData.ReadingId = ReadModule.Id From d16009272d8b01015db8c7b24667343d1d6bc13c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 10:51:25 +0800 Subject: [PATCH 04/12] x --- irc_api.drone.yml | 87 +++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index fd098d6f8..eacb4be73 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -3,45 +3,74 @@ type: docker name: irc-netcore-api steps: - - name: docker-build - image: docker - pull: if-not-exists - volumes: - - name: dockersock - path: /var/run/docker.sock - - name: cached_nuget_packages - path: /drone/nuget_packages - commands: - - date +%H:%M:%S - - pwd - - docker build -t Test.Study . - - date +%H:%M:%S +- name: clone-repo + image: alpine/git + volumes: + - name: irc-test-work + path: /work + commands: + - if [ ! -e /repo/.git ]; then + git clone -b main http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /wrok/netcore-repo; + else + cd /wrok/netcore-repo; + git pull; + fi + + - | + if [ ! -e Dockerfile ]; then + echo 'FROM mcr.microsoft.com/dotnet/aspnet:6.0 + EXPOSE 80 + WORKDIR /app + COPY publish . + ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]' > /work/Dockerfile + fi + +- name: restore-publish + image: mcr.microsoft.com/dotnet/sdk:6.0 + depends_on: + - clone-repo + volumes: + - name: nuget-packages + path: /root/.nuget/packages + - name: irc-test-work + path: /work + commands: + - cd /work/netcore-repo/IRaCIS.Core.API + - dotnet restore ./IRaCIS.Core.API.csproj + - rm -rf /work/publish + - cd /work/netcore-repo/IRaCIS.Core.API + - dotnet publish ./IRaCIS.Core.API.csproj -c Release --no-restore -o /work/publish + + +- name: docker-build + image: docker + pull: if-not-exists + depends_on: + - restore-publish + commands: + - cd /work + - docker build -t test-irc:v${DRONE_BUILD_NUMBER} . + volumes: + - name: irc-test-work + path: /work + - name: dockersock + path: /var/run/docker.sock - - name: docker-deploy - image: docker - pull: if-not-exists - depends_on: - - docker-build - volumes: - - name: dockersock - path: /var/run/docker.sock - commands: - - date +%H:%M:%S - - docker rm -f test-study-container - - docker run -itd -e TZ=Asia/Shanghai -e ASPNETCORE_ENVIRONMENT=Test_Study --restart=always --name test-study-container -p 8030:80 Test.Study - - date +%H:%M:%S volumes: - - name: cached_nuget_packages + - name: nuget-packages host: - path: /mnt/f/docker_publish/nuget_packages + path: /opt/cicd/nuget/packages + - name: irc-test-work + host: + path: /opt/cicd/irc-test - name: dockersock host: path: /var/run/docker.sock trigger: branch: - - master + - Test.IRC --- From 094b43e7481b91593caf893fee1c611fba72d083 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 10:53:36 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index eacb4be73..3fb4ccc7c 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -10,7 +10,7 @@ steps: path: /work commands: - if [ ! -e /repo/.git ]; then - git clone -b main http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /wrok/netcore-repo; + git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /wrok/netcore-repo; else cd /wrok/netcore-repo; git pull; From 7164c183eadc90869049d33de4e9a6614fa49877 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 10:59:33 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9yml=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 3fb4ccc7c..2eba6acd5 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -9,8 +9,10 @@ steps: - name: irc-test-work path: /work commands: - - if [ ! -e /repo/.git ]; then + - if [ ! -e /wrok/netcore-repo/.git ]; then git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /wrok/netcore-repo; + cd /wrok/netcore-repo; + git pull; else cd /wrok/netcore-repo; git pull; From 570fd0a27faf97ede4e522de0a019f11401cec59 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 11:10:14 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E7=A6=81=E7=94=A8clone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 2eba6acd5..7531818ee 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -2,6 +2,9 @@ kind: pipeline type: docker name: irc-netcore-api +clone: + disable: true #绂佺敤榛樿鍏嬮殕 + steps: - name: clone-repo image: alpine/git From fbe02cd287fbbea7c623a933514e2cb12d5d892c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 11:11:44 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 7531818ee..31fa790f3 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -4,10 +4,11 @@ name: irc-netcore-api clone: disable: true #绂佺敤榛樿鍏嬮殕 - + steps: - name: clone-repo image: alpine/git + pull: if-not-exists volumes: - name: irc-test-work path: /work @@ -32,6 +33,7 @@ steps: - name: restore-publish image: mcr.microsoft.com/dotnet/sdk:6.0 + pull: if-not-exists depends_on: - clone-repo volumes: From 9d7c8f9786f850b442c740e7e7e72a4ed57679e8 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 11:46:33 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 31fa790f3..9859d1ffb 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -15,8 +15,6 @@ steps: commands: - if [ ! -e /wrok/netcore-repo/.git ]; then git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /wrok/netcore-repo; - cd /wrok/netcore-repo; - git pull; else cd /wrok/netcore-repo; git pull; From 7827fa284651d92a6ee5ced3eb949689905ef8e4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 11:50:07 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 9859d1ffb..3ecdcf776 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -13,10 +13,10 @@ steps: - name: irc-test-work path: /work commands: - - if [ ! -e /wrok/netcore-repo/.git ]; then - git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /wrok/netcore-repo; + - if [ ! -e /work/netcore-repo/.git ]; then + git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /work/netcore-repo; else - cd /wrok/netcore-repo; + cd /work/netcore-repo; git pull; fi From 332e39b0fd850760e738edf9143f229b1d5aa551 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 12:57:08 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 3ecdcf776..081e3e8d9 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -26,6 +26,15 @@ steps: EXPOSE 80 WORKDIR /app COPY publish . + RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list && \ + echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list + RUN apt-get update && apt-get install -y curl ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]' > /work/Dockerfile fi From bee4a4b22b7851775ebb48fa65898f8403fae619 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Nov 2023 13:22:32 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=9C=80=E8=A6=81=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialSiteService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index 1f10264d6..51073a746 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -323,7 +323,7 @@ namespace IRaCIS.Core.Application.Services { //CRC鍙湅鍒颁粬璐熻矗鐨 - var list = await _trialSiteRepository.Where(t => t.TrialId == trialId) + var list = await _trialSiteRepository.Where(t => t.TrialId == trialId).IgnoreQueryFilters() .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id)) .ProjectTo(_mapper.ConfigurationProvider).OrderBy(t => t.TrialSiteCode).ToListAsync();