oss 过期时间转为服务器时间,服务器统一转为客户端时区

IRC_NewDev
hang 2024-09-04 13:47:35 +08:00
parent 7a0e1eda0c
commit afadc5e2be
4 changed files with 20 additions and 13 deletions

View File

@ -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,

View File

@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Helper
public string SecurityToken { get; set; }
public string Expiration { get; set; }
public DateTime Expiration { get; set; }
}

View File

@ -71,8 +71,8 @@
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.3" />
<PackageReference Include="fo-dicom.Codecs" Version="5.14.5" />
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
<PackageReference Include="MailKit" Version="4.2.0" />
<PackageReference Include="MimeKit" Version="4.2.0" />
<PackageReference Include="MailKit" Version="4.7.1.1" />
<PackageReference Include="MimeKit" Version="4.7.1" />
<PackageReference Include="MiniExcel" Version="1.34.1" />
<PackageReference Include="Minio" Version="6.0.3" />
<PackageReference Include="MiniWord" Version="0.8.0" />

View File

@ -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<Trial> _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<Enroll> _enrollRepository,
[FromServices] IRepository<Trial> _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<Trial> _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<Trial> _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<Trial> _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<Trial> _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<Trial> _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<Trial> _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<Trial> _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<Trial> _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()
{