diff --git a/IRaCIS.Core.API/appsettings.Test_IRC.json b/IRaCIS.Core.API/appsettings.Test_IRC.json index 6ea44f9ae..e3d28221d 100644 --- a/IRaCIS.Core.API/appsettings.Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.Test_IRC.json @@ -62,7 +62,11 @@ "AutoLoginOutMinutes": 1, - "OpenLoginMFA": false + "OpenLoginMFA": false, + + "ContinuousReadingTimeMin": 120, + + "ReadingRestTimeMin": 10 }, "SystemEmailSendConfig": { diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 660370dd1..3821474a5 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -21,6 +21,7 @@ using IRaCIS.Core.Application.Service.ReadingCalculate.Interface; using AutoMapper.QueryableExtensions; using IRaCIS.Application.Contracts; using IRaCIS.Core.Domain.Models; +using Microsoft.Extensions.Options; namespace IRaCIS.Application.Services { @@ -42,6 +43,7 @@ namespace IRaCIS.Application.Services private readonly IReadingCalculateService _readingCalculateService; private readonly IRepository _subjectVisitRepository; private readonly IRepository _subjectRepository; + private readonly IOptionsMonitor _verifyConfig; private readonly IRepository _readingGlobalTaskInfoRepository; private readonly IRepository _readingCriterionPageRepository; private readonly IRepository _readingTaskRelationRepository; @@ -84,6 +86,7 @@ namespace IRaCIS.Application.Services IReadingCalculateService readingCalculateService, IRepository subjectVisitRepository, IRepository subjectRepository, + IOptionsMonitor verifyConfig, IRepository readingGlobalTaskInfoRepository, IRepository readingCriterionPageRepository, IRepository readingTaskRelationRepository, @@ -125,6 +128,7 @@ namespace IRaCIS.Application.Services this._readingCalculateService = readingCalculateService; this._subjectVisitRepository = subjectVisitRepository; this._subjectRepository = subjectRepository; + this._verifyConfig = verifyConfig; this._readingGlobalTaskInfoRepository = readingGlobalTaskInfoRepository; this._readingCriterionPageRepository = readingCriterionPageRepository; this._readingTaskRelationRepository = readingTaskRelationRepository; @@ -2981,8 +2985,8 @@ namespace IRaCIS.Application.Services var startReadingTimeKey = _userInfo.Id.ToString() + "StartReadingTime"; var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime"; - int readingMinute = 120; // 为60整数 - int restMinute = 10; // + int readingMinute = _verifyConfig.CurrentValue.ContinuousReadingTimeMin; // 为60整数 + int restMinute = _verifyConfig.CurrentValue.ReadingRestTimeMin; // var startReadingTime = _provider.Get(startReadingTimeKey).Value; var startRestTime = _provider.Get(startRestTimeKey).Value; if (startReadingTime == null && startRestTime == null) diff --git a/IRaCIS.Core.Domain/_Config/_AppSettings.cs b/IRaCIS.Core.Domain/_Config/_AppSettings.cs index 1361360fb..80aed90e8 100644 --- a/IRaCIS.Core.Domain/_Config/_AppSettings.cs +++ b/IRaCIS.Core.Domain/_Config/_AppSettings.cs @@ -24,6 +24,17 @@ namespace IRaCIS.Core.Domain.Share public int AutoLoginOutMinutes { get; set; } public bool OpenLoginMFA { get; set; } + + /// + /// 连续阅片时间 (min) + /// + public int ContinuousReadingTimeMin { get; set; } + + /// + /// 休息时间 (min) + /// + public int ReadingRestTimeMin { get; set; } + } public class SystemEmailSendConfig