Compare commits
32 Commits
Test_IRC_N
...
Uat_IRC_Ne
| Author | SHA1 | Date |
|---|---|---|
|
|
266917bb4f | |
|
|
01b48982bb | |
|
|
47825b2239 | |
|
|
1fa3dcadae | |
|
|
92fecfa024 | |
|
|
cea0d7f346 | |
|
|
c02fe93ad8 | |
|
|
c58b52d1bb | |
|
|
7a2720fd0e | |
|
|
34f1e9452b | |
|
|
967438d4da | |
|
|
420804d539 | |
|
|
c182f2d91c | |
|
|
e3fd35f72d | |
|
|
5118186892 | |
|
|
6b6253eb76 | |
|
|
5275c86a02 | |
|
|
47480a5d4d | |
|
|
8d6c554e2a | |
|
|
08d5e54fe0 | |
|
|
140cc3ce94 | |
|
|
906b6f1d25 | |
|
|
e34c3268ea | |
|
|
655aad4119 | |
|
|
c4301f848c | |
|
|
d98d8a0729 | |
|
|
2ab8323291 | |
|
|
1ac6bcd79f | |
|
|
3eab14960e | |
|
|
bccb9bbbbb | |
|
|
fa29e1a53c | |
|
|
f790193350 |
|
|
@ -7,10 +7,10 @@
|
|||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=10.10.10.49,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=10.10.10.49,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||
//"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
//"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||
//"RemoteNew": "Server=10.10.10.49,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
//"Hangfire": "Server=10.10.10.49,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||
"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
|||
{
|
||||
this.RequestDuplication();
|
||||
}
|
||||
catch (BusinessValidationFailedException)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
|
@ -91,6 +95,8 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
|||
|
||||
// 验证请求频繁情况
|
||||
if (
|
||||
requestPath == "/ReadingImageTask/changeDicomReadingQuestionAnswer"&&
|
||||
|
||||
!requestPath
|
||||
.Split("/", StringSplitOptions.RemoveEmptyEntries)
|
||||
.Any(segment => segment.StartsWith("get", StringComparison.OrdinalIgnoreCase)) &&
|
||||
|
|
@ -106,17 +112,14 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
|||
RequestTime = DateTime.Now
|
||||
};
|
||||
|
||||
IRCSystemInfo.RequestRecordList= IRCSystemInfo.RequestRecordList.Where(x => x.RequestTime >= DateTime.Now.AddSeconds(-RequestDuplicationOptionsMonitor.CurrentValue.CacheTimeSeconds)).ToList();
|
||||
|
||||
|
||||
var requestsTimes = IRCSystemInfo.RequestRecordList.Any(x=>
|
||||
x.RequestTime>= requestInfo.RequestTime.AddMilliseconds(-RequestDuplicationOptionsMonitor.CurrentValue.DuplicationWindowMs)&&
|
||||
x.RequestKey== requestInfo.RequestKey);
|
||||
if (requestsTimes)
|
||||
var isAdded = IRCSystemInfo.TryAddRequestRecord(
|
||||
requestInfo,
|
||||
RequestDuplicationOptionsMonitor.CurrentValue.CacheTimeSeconds,
|
||||
RequestDuplicationOptionsMonitor.CurrentValue.DuplicationWindowMs);
|
||||
if (!isAdded)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["RequestDuplicationFilter_RequestDuplication"], ApiResponseCodeEnum.BusinessValidationFailed);
|
||||
}
|
||||
IRCSystemInfo.RequestRecordList.Add(requestInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,6 +146,31 @@ public class RequestDuplicationOptions
|
|||
public static class IRCSystemInfo
|
||||
{
|
||||
public static List<RequestInfo> RequestRecordList { get; set; } = new List<RequestInfo>();
|
||||
|
||||
private static readonly object requestRecordLock = new object();
|
||||
|
||||
public static bool TryAddRequestRecord(RequestInfo requestInfo, int cacheTimeSeconds, int duplicationWindowMs)
|
||||
{
|
||||
lock (requestRecordLock)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
RequestRecordList = RequestRecordList
|
||||
.Where(x => x.RequestTime >= now.AddSeconds(-cacheTimeSeconds))
|
||||
.ToList();
|
||||
|
||||
var isDuplicate = RequestRecordList.Any(x =>
|
||||
x.RequestTime >= requestInfo.RequestTime.AddMilliseconds(-duplicationWindowMs) &&
|
||||
x.RequestKey == requestInfo.RequestKey);
|
||||
|
||||
if (isDuplicate)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RequestRecordList.Add(requestInfo);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RequestInfo
|
||||
|
|
@ -236,4 +261,4 @@ public static class AppSettings
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3081,7 +3081,7 @@
|
|||
SystemAnonymizationService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.SystemAnonymizationService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemAnonymization},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.SystemAnonymizationService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemAnonymization},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<summary>
|
||||
SystemAnonymizationService
|
||||
</summary>
|
||||
|
|
@ -12381,6 +12381,11 @@
|
|||
影像工具
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.AddDeleteTypeEnum">
|
||||
<summary>
|
||||
新增修改类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.ImageToolAttribute">
|
||||
<summary>
|
||||
影像工具属性
|
||||
|
|
@ -13326,6 +13331,11 @@
|
|||
影像工具
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.AddDeleteTypeEnum">
|
||||
<summary>
|
||||
新增修改类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.ImageToolAttribute">
|
||||
<summary>
|
||||
影像工具属性
|
||||
|
|
@ -14736,7 +14746,7 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segmentation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SegmentBinding},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Application.Service.IVisitTaskService,IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Application.Service.IReadingCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserFeedBack},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCriterionPage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskRelation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingJudgeInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganTrialInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService,IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoWithoutPETCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CriterionKeyFileRead},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionKeyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Application.Service.IGeneralCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskStudy},IRaCIS.Core.Application.Service.ImageAndDoc.IDownloadAndUploadService,IRaCIS.Core.Application.Interfaces.ITrialEmailNoticeConfigService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segmentation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SegmentBinding},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Application.Service.IVisitTaskService,IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Application.Service.IReadingCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserFeedBack},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCriterionPage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskRelation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingJudgeInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganTrialInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService,IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoWithoutPETCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CriterionKeyFileRead},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionKeyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Application.Service.IGeneralCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskStudy},Microsoft.Extensions.Configuration.IConfiguration,IRaCIS.Core.Application.Service.ImageAndDoc.IDownloadAndUploadService,IRaCIS.Core.Application.Interfaces.ITrialEmailNoticeConfigService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<summary>
|
||||
IR影像阅片
|
||||
</summary>
|
||||
|
|
@ -15178,7 +15188,14 @@
|
|||
<param name="visitTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ComputeJudgeResult(System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.GroupTaskAnswerDto})">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.SendWeComNotifier(System.Guid,System.String)">
|
||||
<summary>
|
||||
发送微信通知
|
||||
</summary>
|
||||
<param name="visiTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ComputeJudgeResult(System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.GroupTaskAnswerDto},System.Guid)">
|
||||
<summary>
|
||||
计算返回的结果 为True表示不相等
|
||||
</summary>
|
||||
|
|
@ -17496,17 +17513,17 @@
|
|||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
||||
<summary>
|
||||
质疑
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
||||
<summary>
|
||||
一致性核查
|
||||
һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
||||
<summary>
|
||||
复制
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||
|
|
@ -20245,11 +20262,12 @@
|
|||
<param name="editTrialSiteCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetTrialSiteSelect(System.Guid)">
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetTrialSiteSelect(System.Guid,System.Nullable{System.Boolean})">
|
||||
<summary>
|
||||
获取项目下的 site 下拉框数据 CRC只看到他负责的
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="ignoreDisable"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.DeleteTrialSite(System.Guid)">
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
|
@ -13,7 +14,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// SystemAnonymizationService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Image")]
|
||||
public class SystemAnonymizationService(IRepository<SystemAnonymization> _systemAnonymizationRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISystemAnonymizationService
|
||||
public class SystemAnonymizationService(IRepository<SystemAnonymization> _systemAnonymizationRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, ISystemAnonymizationService
|
||||
{
|
||||
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var entity = await _systemAnonymizationRepository.InsertOrUpdateAsync(addOrEditSystemAnonymization, true);
|
||||
|
||||
await _fusionCache.SetAsync(CacheKeys.SystemAnonymization, CacheHelper.GetSystemAnonymizationListAsync(_systemAnonymizationRepository), TimeSpan.FromDays(7));
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
|
|
|
|||
|
|
@ -1002,6 +1002,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string ImageTool { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改类型
|
||||
/// </summary>
|
||||
public AddDeleteType AddDeleteTypeEnum { get; set; } = AddDeleteType.Arbitrium;
|
||||
|
||||
/// <summary>
|
||||
/// 影像工具属性
|
||||
/// </summary>
|
||||
|
|
@ -2483,6 +2488,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string ImageTool { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改类型
|
||||
/// </summary>
|
||||
public AddDeleteType AddDeleteTypeEnum { get; set; } = AddDeleteType.Arbitrium;
|
||||
|
||||
/// <summary>
|
||||
/// 影像工具属性
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc;
|
||||
using IRaCIS.Core.Application.Service.OAuth;
|
||||
|
|
@ -16,6 +17,7 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
|||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
|
|
@ -80,6 +82,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IGeneralCalculateService _generalCalculateService,
|
||||
IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository,
|
||||
IRepository<TaskStudy> _taskStudyRepository,
|
||||
IConfiguration _config,
|
||||
IDownloadAndUploadService _downloadAndUploadService,
|
||||
ITrialEmailNoticeConfigService _trialEmailNoticeConfigService,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IReadingImageTaskService
|
||||
|
|
@ -3363,6 +3366,18 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
// 验证一个问题不能有多个答案
|
||||
bool hasDuplicate = await _readingTaskQuestionAnswerRepository
|
||||
.Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
||||
.GroupBy(x => x.ReadingQuestionTrialId)
|
||||
.AnyAsync(g => g.Count() > 1);
|
||||
|
||||
if (hasDuplicate)
|
||||
{
|
||||
_ = SendWeComNotifier(inDto.VisitTaskId, "阅片问题答案有重复");
|
||||
}
|
||||
|
||||
|
||||
//验证后处理影像必须传
|
||||
if (_visitTaskRepository.Any(t => t.Id == inDto.VisitTaskId && t.TrialReadingCriterion.ImageUploadEnum != ReadingImageUpload.None))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
|
@ -7,6 +8,7 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
|||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
|
@ -676,7 +678,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(groupTasks);
|
||||
noteEqual = noteEqual || ComputeJudgeResult(groupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -708,7 +710,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = ComputeJudgeResult(groupTasks);
|
||||
noteEqual = ComputeJudgeResult(groupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -757,7 +759,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -819,7 +822,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -922,12 +926,61 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发送微信通知
|
||||
/// </summary>
|
||||
/// <param name="visiTaskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task SendWeComNotifier(Guid visiTaskId,string msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isOpenWeComNotice = _config.GetValue<bool>("WeComNoticeConfig:IsOpenWeComNotice");
|
||||
|
||||
if (isOpenWeComNotice)
|
||||
{
|
||||
string webhook = _config["WeComNoticeConfig:WebhookUrl"] ?? string.Empty;
|
||||
|
||||
var uri = new Uri(_config["SystemEmailSendConfig:SiteUrl"]);
|
||||
var baseUrl = uri.GetLeftPart(UriPartial.Authority);
|
||||
|
||||
var userList = _config.GetSection("WeComNoticeConfig:APINoticeUserList").Get<string[]>();
|
||||
|
||||
var visitTask = _visitTaskRepository.Where(x => x.Id == visiTaskId).Include(x=>x.Subject).Include(x=>x.Trial).Include(x=>x.SourceSubjectVisit).FirstOrDefault();
|
||||
|
||||
|
||||
// 🔔 异步告警(不要阻塞请求)
|
||||
_ = WeComNotifier.SendAlertAsync(
|
||||
webhook: webhook,
|
||||
alert: new WeComAlert
|
||||
{
|
||||
Env = baseUrl,
|
||||
UserName = msg,
|
||||
Api = "",
|
||||
Message = $"异常信息:{msg}, 项目方案号:{visitTask.Trial.ResearchProgramNo}, 试验参与者:{visitTask.Subject.Code}, 访视:{visitTask.SourceSubjectVisit.VisitName}, 任务名称:{visitTask.TaskName}, 任务Id:{visiTaskId}",
|
||||
Stack = string.Empty,
|
||||
AtUsers = userList ?? []
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Logger.Error($"MassTransit里发送企业微信出现错误:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 计算返回的结果 为True表示不相等
|
||||
/// </summary>
|
||||
/// <param name="groupTasks"></param>
|
||||
/// <returns></returns>
|
||||
private bool ComputeJudgeResult(List<GroupTaskAnswerDto> groupTasks)
|
||||
private bool ComputeJudgeResult(List<GroupTaskAnswerDto> groupTasks,Guid visiTaskId)
|
||||
{
|
||||
var noteEqual = false;
|
||||
foreach (var item in groupTasks)
|
||||
|
|
@ -935,11 +988,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
// 裁判问题可以不必填
|
||||
if(item.TaskAnswerList.Count()==0)
|
||||
{
|
||||
_ = SendWeComNotifier(visiTaskId, "两个阅片任务的答案等于0");
|
||||
break;
|
||||
}
|
||||
else if (item.TaskAnswerList.Count() != 2)
|
||||
{
|
||||
noteEqual = true;
|
||||
// 发送微信通知
|
||||
_ = SendWeComNotifier(visiTaskId, "两个阅片任务的答案不等于2");
|
||||
break;
|
||||
}
|
||||
else if (noteEqual)
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var subjectVisitQuery = _subjectVisitRepository.Where(t => t.TrialId == inQuery.TrialId)/*.Where(t => t.IsLostVisit == false)*/
|
||||
.Where(t => t.Subject.IsSubjectQuit == false || (t.Subject.IsSubjectQuit == true && t.SubmitState == SubmitStateEnum.Submitted))
|
||||
.Where(sv => sv.Subject.FinalSubjectVisitId == null ? true : sv.VisitNum <= sv.Subject.LatestSubjectVisit.VisitNum).Select(sv => new ReadModuleView()
|
||||
.Where(sv => sv.Subject.FinalSubjectVisitId == null ? true : sv.VisitNum <= sv.Subject.FinalSubjectVisit.VisitNum).Select(sv => new ReadModuleView()
|
||||
{
|
||||
Id = sv.Id,
|
||||
CreateTime = sv.CreateTime,
|
||||
|
|
|
|||
|
|
@ -296,6 +296,8 @@ namespace IRaCIS.Application.Contracts
|
|||
#endregion
|
||||
|
||||
public TrialDataStore TrialDataStoreType { get; set; }
|
||||
|
||||
public TrialType TrialType { get; set; }
|
||||
}
|
||||
|
||||
public class TrialPacsInfo
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ namespace IRaCIS.Core.Application.Interfaces
|
|||
Task<PageOutput<SiteStatDTO>> GetSiteCRCList(SiteCrcQueryDTO param);
|
||||
Task<IResponseOutput<PageOutput<SiteStatSimpleDTO>> > GetSiteCRCSimpleList(SiteCrcQueryDTO param);
|
||||
Task<PageOutput<TrialSiteScreeningDTO>> GetTrialSiteScreeningList(TrialSiteQuery trialSiteQuery);
|
||||
Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId);
|
||||
Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId, bool? ignoreDisable);
|
||||
}
|
||||
}
|
||||
|
|
@ -1566,7 +1566,7 @@ namespace IRaCIS.Core.Application
|
|||
[AllowAnonymous]
|
||||
public async Task<TrialConfigInfo> GetTrialExtralConfig(Guid trialId)
|
||||
{
|
||||
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialDataStoreType, t.IsExternalViewTrialChart, t.TrialObjectNameList, t.CollectImagesEnum, t.IsIQCAutoNextTask, t.IsImageQualityControl }).FirstOrDefault();
|
||||
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialDataStoreType, t.IsExternalViewTrialChart, t.TrialObjectNameList, t.CollectImagesEnum, t.IsIQCAutoNextTask, t.IsImageQualityControl, t.TrialType }).FirstOrDefault();
|
||||
|
||||
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig();
|
||||
|
||||
|
|
@ -1578,6 +1578,7 @@ namespace IRaCIS.Core.Application
|
|||
trialConfig.CollectImagesEnum = extralObj.CollectImagesEnum;
|
||||
trialConfig.IsIQCAutoNextTask = extralObj.IsIQCAutoNextTask;
|
||||
trialConfig.TrialDataStoreType = extralObj.TrialDataStoreType;
|
||||
trialConfig.TrialType = extralObj.TrialType;
|
||||
|
||||
return trialConfig;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,13 +268,21 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// 获取项目下的 site 下拉框数据 CRC只看到他负责的
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="ignoreDisable"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{trialId:guid}")]
|
||||
public async Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId)
|
||||
public async Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId, bool? ignoreDisable)
|
||||
{
|
||||
//CRC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
var query = _trialSiteRepository.Where(t => t.TrialId == trialId);
|
||||
|
||||
if (ignoreDisable == true)
|
||||
{
|
||||
query = query.IgnoreQueryFilters();
|
||||
}
|
||||
|
||||
var list = await query
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<TrialSiteForSelect>(_mapper.ConfigurationProvider).OrderBy(t => t.TrialSiteCode).ToListAsync();
|
||||
|
||||
|
|
|
|||
|
|
@ -504,6 +504,28 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 问题增删类型
|
||||
/// </summary>
|
||||
public enum AddDeleteType
|
||||
{
|
||||
/// <summary>
|
||||
/// 任意
|
||||
/// </summary>
|
||||
Arbitrium = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 仅基线
|
||||
/// </summary>
|
||||
OnlyBaseLine = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 仅随访
|
||||
/// </summary>
|
||||
OnlyVisit = 2,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 影像标记类型
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public class UserRole : BaseFullAuditEntity
|
|||
|
||||
|
||||
|
||||
|
||||
[Comment("医生生成账号后,会有值")]
|
||||
public Guid? DoctorId { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,12 @@ public class ReadingQuestionTrial : BaseAddAuditEntity
|
|||
/// </summary>
|
||||
public string ImageToolAttribute { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改类型
|
||||
/// </summary>
|
||||
public AddDeleteType AddDeleteTypeEnum { get; set; } = AddDeleteType.Arbitrium;
|
||||
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public List<ExportResult> ExportResult
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,37 @@
|
|||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-uat-irc-build-image
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
arch: 386
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
server:
|
||||
host: 101.132.253.119
|
||||
user: root
|
||||
password:
|
||||
from_secret: test_ssh_pwd
|
||||
|
||||
steps:
|
||||
- name: publish-test-irc
|
||||
commands:
|
||||
- bash /opt/1panel/xc-deploy-new/Uat_IRC/devops-publish/uat-branch-publish.sh
|
||||
- name: notify-wecom
|
||||
commands:
|
||||
- bash /opt/1panel/xc-deploy-new/devops-center/drone-notify-wecom.sh "$DRONE_BUILD_STATUS" "$DRONE_REPO_NAME" "$DRONE_BRANCH" "$DRONE_BUILD_NUMBER" "4355b98e-1e72-4678-8dfb-2fc6ad0bf449" "$DRONE_COMMIT_MESSAGE" "$DRONE_COMMIT_AUTHOR" "Uat_IRC_API Uat_IRC_SCP_API" "irc.uat.extimaging.com"
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- Uat_IRC_Net8
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-irc-publish
|
||||
|
|
|
|||
Loading…
Reference in New Issue