From 9a571620fe33a4eeb9da3e7555f23a38fdaa98c1 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 27 Jun 2022 09:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 5 +++ .../Reading/ReadingClinicalDataService.cs | 36 ++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index c00af0a22..dc40774ec 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1045,6 +1045,11 @@ 名称 + + + 上传方式 + + 模板文件名称 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs index 20dc06817..5072a27aa 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs @@ -207,7 +207,14 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task> GetTrialClinicalDataSelect(GetTrialClinicalDataSelectIndto inDto) { - if (_userInfo.UserTypeShortName == "PM" || _userInfo.UserTypeShortName == "IR") + var userTypes = new List() { + (int)UserTypeEnum.APM, + (int)UserTypeEnum.SPM, + (int)UserTypeEnum.CPM, + (int)UserTypeEnum.IndependentReviewer, + }; + + if (userTypes.Contains(_userInfo.UserTypeEnumInt)) { inDto.UploadRole = UploadRole.PM; @@ -226,8 +233,6 @@ namespace IRaCIS.Application.Services ClinicalDataLevel = x.ClinicalDataLevel, ClinicalDataSetName = x.ClinicalDataSetName, ClinicalUploadType = x.ClinicalUploadType, - ClinicalDataLevelName = x.ClinicalDataLevel.GetDisplayName(), - ClinicalUploadTypeName = x.ClinicalUploadType.GetDisplayName(), Id = x.Id }).ToListAsync() ; return clinicalList; @@ -260,13 +265,19 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto) { + var userPMTypes = new List() { + (int)UserTypeEnum.APM, + (int)UserTypeEnum.SPM, + (int)UserTypeEnum.CPM, + (int)UserTypeEnum.IndependentReviewer, + }; - if (_userInfo.UserTypeShortName == "PM" || _userInfo.UserTypeShortName == "IR") + if (userPMTypes.Contains(_userInfo.UserTypeEnumInt)) { inDto.UploadRole = UploadRole.PM; - } - else if (_userInfo.UserTypeShortName == "CRC" || _userInfo.UserTypeShortName == "IQC") + + else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC) { inDto.UploadRole = UploadRole.CRC; } @@ -293,19 +304,10 @@ namespace IRaCIS.Application.Services Path = y.Path }).ToList() }); - - - var result=await resultQuery.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField, - inDto.Asc); - - - - - - - return result; + inDto.Asc); + return result; }