From 71e28f1a37f5d9464e23f6b79c16a08d4fec0e81 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 3 Nov 2023 15:44:39 +0800 Subject: [PATCH 1/8] 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 5685f2b87..4b09d49b6 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -134,7 +134,7 @@ namespace IRaCIS.Api.Controllers return returnModel; } - + [AllowAnonymous] [HttpGet("user/GenerateSTS")] public IResponseOutput GenerateSTS( [FromServices] IWebHostEnvironment webHostEnvironment) { From 201c24238c796f064cf04117dd459118f6bb540f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 6 Nov 2023 11:14:41 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=9D=83=E9=99=90=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/ExtraController.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index 4b09d49b6..8731aae04 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -134,7 +134,6 @@ namespace IRaCIS.Api.Controllers return returnModel; } - [AllowAnonymous] [HttpGet("user/GenerateSTS")] public IResponseOutput GenerateSTS( [FromServices] IWebHostEnvironment webHostEnvironment) { From 731f049fc07a5e10312867561da1ba395bc34d62 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 6 Nov 2023 13:10:13 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96,=E5=AF=BC=E8=A1=A8=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=A7=92=E8=89=B2=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/resultTemplate | Bin 0 -> 7769 bytes .../Helper/ExcelExportHelper.cs | 7 ++++++- .../Service/TrialSiteUser/TrialService.cs | 6 ++++-- IRaCIS.Core.Domain.Share/User/UserType.cs | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 IRaCIS.Core.API/resultTemplate diff --git a/IRaCIS.Core.API/resultTemplate b/IRaCIS.Core.API/resultTemplate new file mode 100644 index 0000000000000000000000000000000000000000..556bbb59a02bfab12cd3d1f7e63e2bcfa0992357 GIT binary patch literal 7769 zcmZ`;1z1#D*B*uehaNhlyF-vh=}t-MZiX6K(xF2d2`TB6?hffxN+~HxK|rK`y!ZRB z_wwCuW}bbXv!7XOpR;u?-z*V^M&uK(6E2c066nNBKpM_s?1q4sR2#|eaO>sA zoi={<>eT)FOV6%EG9;wo66CrCrXZ2%>lho1;8yL0Sd}*c~kx3u*jWNp#wSbOJ2#!d3A4hY0s#u;7{Tv|l z#|bV|k1R7LS!c<=NiC{G#e)m8*9aPI-b&}o%xKjlhv2ZAGJgyw+oYgS*v!%2@-?0L zx)Z6eUxD{;IcaT-`5;ttONdPN{Y&L4SIB)0?H zO#AaXPP7%Bv^i4QQxtXSI%BO~%fka>TbJ*@x^M5;BcM1OnsKorQzKTstn%X}z(_i; zYkU)BsD;gGR{XxIDC|pgViAiIY9yq~H6MMD>5D_!V9|;GsHh<(vi7qFDl1HdGZKo@ zXR0Ly1$!ogl|J@CBvS6PXnHd`MMQR`_|69Gt>+Sh9Vkd1?j&XQy=Vksicl$7zCX%t zKSQQuHF9;a{7Dh%a2|?xnz-a3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}Ige8^CKrhylg?rk-RbD`Asv@Nk-bQK6XE z`Z7BFK>?*!AF+YDy$4_fvK1J-b7L2bP`b91RWXYVT)%t|S-@(F((j?n7laA21K&vne079Dl^_FG%!d5?=_*igaeLH@C0R1xd=NGw zHf|gpH32n?q`f4m`Sx2*v-krOHr zyzLxWEGcisDTz4ph!fSkQ0l*JIc|G>6+$(U#ggzQn(B!q4>{q?3#Af4-~PSjt}rf< z?v+a;A~^N-e=f^Y#}gqb*<>8l$kg=I3X-gnT48fx{9$F-&e%tgqrvh;4lnCVg^3%& ze}5a$esJB4Z!3JOfVhZlp;^vwLqfR_d4Gle&4R(_9QB4sAK1>Uev6_N z*YFSO4GX-Rk)(3j;hh5?xA%uMYp##+LuAv9B1?K%=bWDoc&OPM74iC_HAI`oXTuto%nSGaP_{Jb2pv7J|Z8JQBQI2aVQ)scJa*(QbOMf>6miyHAk^JA(E}*|r|39vOpZq>J{hNI0E_eNP_;0BCK7;$9>u&}! z5B?p3z0cu3_Vt?s@D9lR1>*jNgxx2--=zO0O}s 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount) .WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount) .WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin + && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id , isEn_Us= _userInfo.IsEn_Us }); return await query.ToPagedListAsync(searchParam.PageIndex, searchParam.PageSize, string.IsNullOrWhiteSpace(searchParam.SortField) ? "CreateTime" : searchParam.SortField, searchParam.Asc); @@ -107,7 +108,8 @@ namespace IRaCIS.Application.Services public async Task> GetTrialSelect() { return await _trialRepository.AsQueryable().IgnoreQueryFilters() - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt !=(int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP + , t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); } diff --git a/IRaCIS.Core.Domain.Share/User/UserType.cs b/IRaCIS.Core.Domain.Share/User/UserType.cs index a5f449f12..5d2221939 100644 --- a/IRaCIS.Core.Domain.Share/User/UserType.cs +++ b/IRaCIS.Core.Domain.Share/User/UserType.cs @@ -42,7 +42,7 @@ QA = 12, - + OP=13, SPM=20, APM=21, From 60c31b470c7650a49e1065d007b0cfba5ac2b831 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 6 Nov 2023 13:32:06 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=AF=BC=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/ExcelExportHelper.cs | 2 +- IRaCIS.Core.Application/Service/Common/ExcelExportService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs index c47458e3e..fd280abf1 100644 --- a/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs @@ -321,7 +321,7 @@ public static class ExcelExportHelper } var memoryStream2 = new MemoryStream(); - workbook.Write(memoryStream2); + workbook.Write(memoryStream2,true); memoryStream2.Seek(0, SeekOrigin.Begin); diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index abdba14f3..fe9b30582 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -490,7 +490,7 @@ namespace IRaCIS.Core.Application.Service.Common } var memoryStream2 = new MemoryStream(); - wb.Write(memoryStream2); + wb.Write(memoryStream2,true); memoryStream2.Seek(0, SeekOrigin.Begin); return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") From 75f227e547e6c768621b701d98da5e8376fcbf6a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 6 Nov 2023 13:39:30 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/ExtraController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index 8731aae04..1234a2e45 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -134,6 +134,7 @@ namespace IRaCIS.Api.Controllers return returnModel; } + [Authorize] [HttpGet("user/GenerateSTS")] public IResponseOutput GenerateSTS( [FromServices] IWebHostEnvironment webHostEnvironment) { From a7429c1739aa9ad5f433b15fb01f5e74cdb61a81 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 6 Nov 2023 13:58:34 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=80=9A=E7=94=A8=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/UploadDownLoadController.cs | 122 ++---------------- .../Service/Common/CommonDocumentService.cs | 8 ++ 2 files changed, 17 insertions(+), 113 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index d8028d2b1..0a7430625 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -1083,122 +1083,18 @@ namespace IRaCIS.Core.API.Controllers } - #region 废弃 + /// 通用文件下载 + [AllowAnonymous] + [HttpGet("CommonDocument/DownloadCommonDoc")] + public async Task DownloadCommonFile(string code, [FromServices] IRepository _commonDocumentRepository) + { + var (filePath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code); - ///// 缩略图 - //[AllowAnonymous] - //[HttpGet("Common/LocalFilePreview")] - //public async Task LocalFilePreview(string relativePath) - //{ - - // var _fileStorePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, relativePath); - - // var storePreviewPath = _fileStorePath + ".preview.jpeg"; - - // if (!System.IO.File.Exists(storePreviewPath)) - // { - // ImageHelper.ResizeSave(_fileStorePath, storePreviewPath); - // } - - // return new FileContentResult(await System.IO.File.ReadAllBytesAsync(storePreviewPath), "image/jpeg"); - - //} - - - ///// 通用文件下载 - //[AllowAnonymous] - //[HttpGet("CommonDocument/DownloadCommonDoc")] - //public async Task DownloadCommonFile(string code, [FromServices] IRepository _commonDocumentRepository) - //{ - // var (filePath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code); - - // new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType); - - // return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName); - - //} - - ///// - ///// 下载项目临床数据文件 - ///// - ///// - ///// - ///// - //[AllowAnonymous] - //[HttpGet("CommonDocument/DownloadTrialClinicalFile")] - //public async Task DownloadTrialClinicalFile(Guid clinicalDataTrialSetId, [FromServices] IRepository _clinicalDataTrialSetRepository) - //{ - // var (filePath, fileName) = await FileStoreHelper.GetTrialClinicalPathAsync(_hostEnvironment, _clinicalDataTrialSetRepository, clinicalDataTrialSetId); - - // new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType); - - // return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName); - - //} - - - ///// - ///// 下载系统临床数据文件 - ///// - ///// - ///// - ///// - //[AllowAnonymous] - //[HttpGet("CommonDocument/DownloadSystemClinicalFile")] - //public async Task DownloadSystemClinicalFile(Guid clinicalDataSystemSetId, [FromServices] IRepository _clinicalDataSystemSetRepository) - //{ - // var (filePath, fileName) = await FileStoreHelper.GetSystemClinicalPathAsync(_hostEnvironment, _clinicalDataSystemSetRepository, clinicalDataSystemSetId); - - // new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType); - - // return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName); - - //} - - ///// - /////上传项目签名文档 - ///// - ///// - ///// - //[HttpPost("TrialDocument/UploadTrialDoc/{trialId:guid}")] - //[DisableRequestSizeLimit] - //[DisableFormValueModelBinding] - //public async Task UploadTrialDoc(Guid trialId) - //{ - - // return await SingleFileUploadAsync((fileName) => FileStoreHelper.GetTrialSignDocPath(_hostEnvironment, trialId, fileName)); - - //} - - ///// - ///// 上传系统签名文档 - ///// - ///// - //[HttpPost("TrialDocument/UploadSystemDoc")] - //[DisableRequestSizeLimit] - //[DisableFormValueModelBinding] - //public async Task UploadSysTemDoc() - //{ - - // return await SingleFileUploadAsync((fileName) => FileStoreHelper.GetSystemSignDocPath(_hostEnvironment, fileName)); - - //} - ///// - ///// 上传系统通知文档 - ///// - ///// - //[HttpPost("SystemNotice/UploadSystemNoticeDoc")] - //[DisableRequestSizeLimit] - //[DisableFormValueModelBinding] - //public async Task UploadSystemNoticeDoc() - //{ - - // return await SingleFileUploadAsync((fileName) => FileStoreHelper.GetSystemNoticePath(_hostEnvironment, fileName)); - - //} - #endregion + new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType); + return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName); + } /// /// 上传通用文档 比如一致性核查的 比如导出的excel 模板 diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs index d9e1cfe9f..7b1ab197b 100644 --- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs @@ -110,5 +110,13 @@ namespace IRaCIS.Core.Application.Service } + + [HttpDelete("{commonDocumentId:guid}")] + public async Task DeleteCommonDocument(Guid commonDocumentId) + { + var success = await _commonDocumentRepository.DeleteFromQueryAsync(t => t.Id == commonDocumentId, true); + return ResponseOutput.Ok(); + } + } } From 584516f936b584d48459447952c0bd4bc381ec7e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 7 Nov 2023 11:46:47 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/PersonalWorkstation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index f9caadb9e..c0cef017d 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -1031,7 +1031,7 @@ namespace IRaCIS.Core.Application .WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code)) .WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName)) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) .Select(t => new TrialToBeDoneDto() { TrialId = t.Id, From 105da818a8ab9da5f2fcf37f7db8d993c076b1eb Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 7 Nov 2023 11:59:19 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs index 7b1ab197b..bc7db9531 100644 --- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs @@ -114,7 +114,7 @@ namespace IRaCIS.Core.Application.Service [HttpDelete("{commonDocumentId:guid}")] public async Task DeleteCommonDocument(Guid commonDocumentId) { - var success = await _commonDocumentRepository.DeleteFromQueryAsync(t => t.Id == commonDocumentId, true); + var success = await _commonDocumentRepository.DeleteFromQueryAsync(t => t.Id == commonDocumentId, true,true); return ResponseOutput.Ok(); }