From 72b204786228a9864f42389e129c3fd07c07841f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 22 Sep 2023 15:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9site=20=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Prod_Study.json | 48 +++++++++++++++++++ .../Service/ImageAndDoc/ImageShareService.cs | 9 ++-- .../Service/Institution/SiteService.cs | 2 +- .../Service/TrialSiteUser/TrialService.cs | 11 +++-- .../Service/TrialSiteUser/TrialSiteService.cs | 2 +- .../ReadingCriterion/CriterionNidusTrial.cs | 9 ++-- 6 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 IRaCIS.Core.API/appsettings.Prod_Study.json diff --git a/IRaCIS.Core.API/appsettings.Prod_Study.json b/IRaCIS.Core.API/appsettings.Prod_Study.json new file mode 100644 index 000000000..b04f38c44 --- /dev/null +++ b/IRaCIS.Core.API/appsettings.Prod_Study.json @@ -0,0 +1,48 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AliyunOSS": { + "regionId": "cn-shanghai", + "region": "oss-cn-shanghai", + "endpoint": "https://oss-cn-shanghai.aliyuncs.com", + "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", + "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", + "bucketName": "zy-sir-store", + "viewEndpoint": "https://zy-sir-cache.oss-cn-shanghai.aliyuncs.com" + }, + + "ConnectionStrings": { + "RemoteNew": "Server=47.117.165.18,1434;Database=Prod_Study;User ID=sa;Password=WHxckj@2019;TrustServerCertificate=true", + "Hangfire": "Server=47.117.165.18,1434;Database=Prod_Study.hangfire;User ID=sa;Password=WHxckj@2019;TrustServerCertificate=true" + }, + + "BasicSystemConfig": { + + "OpenUserComplexPassword": false, + + "OpenSignDocumentBeforeWork": false, + + "OpenTrialRelationDelete": true, + + "OpenLoginLimit": false, + "LoginMaxFailCount": 5, + + "LoginFailLockMinutes": 30 + + }, + + "SystemEmailSendConfig": { + "Port": 465, + "Host": "smtp.qiye.aliyun.com", + "FromEmail": "study@extimaging.com", + "FromName": "study.extimaging", + "AuthorizationCode": "zhanying123", + "SiteUrl": "https://study.extimaging.com/login" + } + +} diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs index e84fb9df6..ab21ac4fd 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs @@ -5,25 +5,27 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using IRaCIS.Core.Application.Auth; +using EasyCaching.Core; namespace IRaCIS.Core.Application.Services { [AllowAnonymous, ApiExplorerSettings(GroupName = "Image")] public class ImageShareService : BaseService, IImageShareService { - + private readonly IEasyCachingProvider _provider; private readonly IRepository _imageShareRepository; private readonly IRepository _studyRepository; private readonly IConfiguration _configuration; private readonly ITokenService _tokenService; - public ImageShareService(IRepository imageShareRepository, IRepository studyRepository, IConfiguration configuration, ITokenService tokenService) + public ImageShareService(IRepository imageShareRepository, IRepository studyRepository, IConfiguration configuration, ITokenService tokenService, IEasyCachingProvider provider) { _imageShareRepository = imageShareRepository; _studyRepository = studyRepository; _configuration = configuration; _tokenService = tokenService; + _provider = provider; } [HttpPost] @@ -110,6 +112,7 @@ namespace IRaCIS.Core.Application.Services return ResponseOutput.NotOk(_localizer["ISS_ShareExpiration"]); } + var vitrualUserId = Guid.NewGuid(); var resource = new ResourceInfo() { StudyId = imageShare.StudyId, @@ -127,7 +130,7 @@ namespace IRaCIS.Core.Application.Services })) }; - + await _provider.SetAsync(vitrualUserId.ToString(), resource.Token, TimeSpan.FromDays(7)); return ResponseOutput.Ok(resource); } diff --git a/IRaCIS.Core.Application/Service/Institution/SiteService.cs b/IRaCIS.Core.Application/Service/Institution/SiteService.cs index 3ccc8139f..137d4ffd0 100644 --- a/IRaCIS.Core.Application/Service/Institution/SiteService.cs +++ b/IRaCIS.Core.Application/Service/Institution/SiteService.cs @@ -27,7 +27,7 @@ namespace IRaCIS.Application.Services { var siteQueryable = _siteRepository - .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)) + .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)||t.SiteNameCN.Contains(searchModel.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country)) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 6fad583bd..636943014 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -286,8 +286,16 @@ namespace IRaCIS.Application.Services await _repository.BatchDeleteAsync(o => o.SubjectVisit.TrialId == trialId); await _repository.BatchDeleteAsync(o => o.TrialId == trialId); + + await _repository.BatchDeleteAsync(o => o.ClinicalForm.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.ClinicalForm.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.TrialId == trialId); await _repository.BatchDeleteAsync(o => o.TrialReadingCriterion.TrialId == trialId); + + await _repository.BatchDeleteAsync(o => o.TrialReadingCriterion.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); @@ -375,9 +383,6 @@ namespace IRaCIS.Application.Services await _repository.BatchDeleteAsync(t => t.TrialId == trialId); - - - await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index 9145bcad1..e3dc9b5c9 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Services var siteQueryable = _siteRepository.AsQueryable(true) - .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)) + .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)|| t.SiteNameCN.Contains(searchModel.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country)) diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs index 7ead42443..37f656f98 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs @@ -15,11 +15,14 @@ namespace IRaCIS.Core.Domain.Models [Table("CriterionNidusTrial")] public class CriterionNidusTrial : Entity, IAuditAdd { - - /// + [JsonIgnore] + [ForeignKey("CriterionId")] + public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } + + /// /// CriterionId /// - [Required] + [Required] public Guid CriterionId { get; set; } ///