From afadc5e2be90bebd1785a47f71cba3d1524b0034 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 4 Sep 2024 13:47:35 +0800 Subject: [PATCH] =?UTF-8?q?oss=20=20=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=BD=AC=E4=B8=BA=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=8C=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=BB=9F=E4=B8=80=E8=BD=AC?= =?UTF-8?q?=E4=B8=BA=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=97=B6=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ExtraController.cs | 4 +++- IRaCIS.Core.Application/Helper/OSSService.cs | 2 +- .../IRaCIS.Core.Application.csproj | 4 ++-- .../TrialSiteUser/PersonalWorkstation.cs | 23 +++++++++++-------- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index baa34b64f..bb8be2517 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -331,7 +331,9 @@ namespace IRaCIS.Api.Controllers { AccessKeyId = credentials.AccessKeyId, AccessKeySecret = credentials.AccessKeySecret, - Expiration = credentials.Expiration, + + //转为服务器时区,最后统一转为客户端时区 + Expiration = TimeZoneInfo.ConvertTimeFromUtc(DateTime.Parse(credentials.Expiration), TimeZoneInfo.Local), SecurityToken = credentials.SecurityToken, diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 061150189..7a472d690 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Helper public string SecurityToken { get; set; } - public string Expiration { get; set; } + public DateTime Expiration { get; set; } } diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj index c1eb5c0a7..d4e5708b8 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj @@ -71,8 +71,8 @@ - - + + diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index b23a1c3eb..91a92a85b 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -44,6 +44,7 @@ namespace IRaCIS.Core.Application _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM) { return await _trialRepository + .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0) @@ -105,6 +106,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository + .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new CheckToBeDoneDto() { @@ -192,6 +194,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { var query = _trialRepository + .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new ReviewerSelectToBeDoneDto() { @@ -227,6 +230,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository + .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new GetPMClinicalDataToBeDoneListOutDto() { @@ -247,6 +251,7 @@ namespace IRaCIS.Core.Application var all = await _trialRepository + .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new GetPMClinicalDataToBeDoneListOutDto() { @@ -275,7 +280,7 @@ namespace IRaCIS.Core.Application , [FromServices] IRepository _enrollRepository, [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new ReviewerSelectToBeDoneDto() { @@ -362,7 +367,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) //.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm)) .Select(t => new ImageClinicalDataToBeDoneDto() @@ -404,7 +409,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) //.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm)) .Select(t => new ImageClinicalDataToBeDoneDto() @@ -465,7 +470,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new ImageQuestionToBeDoneDto() { @@ -513,7 +518,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new ImageCheckQuestionToBeDoneDto() { @@ -559,7 +564,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new ImageReUploadToBeDoneDto() { @@ -606,7 +611,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView)) .Select(t => new ImageSubmittedToBeDoneDto() { @@ -662,7 +667,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit) .Select(t => new ImageQualityToBeDoneDto() @@ -719,7 +724,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { - var query = _trialRepository + var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Select(t => new ImageQuestionToBeDoneDto() {