From eadf8f52660089f115bde9ae1b74e7ad7be86842 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 11 Jan 2024 14:24:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=98=85=E7=89=87=E4=BC=91?= =?UTF-8?q?=E6=81=AF=E6=97=B6=E9=97=B4=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTaskService.cs | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index ff1c8b199..5e74df673 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -2586,34 +2586,34 @@ namespace IRaCIS.Application.Services else { #region 两小时 - var cacheDate = DateTime.Parse(value.ToString()); - int timespanMin = (DateTime.Now - cacheDate).Minutes; - if (timespanMin > 120 && timespanMin < 130) - { - throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]); - } - else if (timespanMin > 130) - { - cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 130))) * 130); - _provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); - // _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); + //var cacheDate = DateTime.Parse(value.ToString()); + //int timespanMin = (DateTime.Now - cacheDate).Minutes; + //if (timespanMin > 120 && timespanMin < 130) + //{ + // throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]); + //} + //else if (timespanMin > 130) + //{ + // cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 130))) * 130); + // _provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); + // // _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); - } + //} #endregion #region 测试用的5分钟 - //var cacheDate = DateTime.Parse(value.ToString()); - //int timespanMin = (DateTime.Now - cacheDate).Minutes; - //if (timespanMin >= 5 && timespanMin <= 10) - //{ - // throw new BusinessValidationFailedException("您已连续阅片2个小时,请休息20分钟后,再继续阅片。"); - //} - //else if (timespanMin > 10) - //{ - // cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 10))) * 10); - // _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); + var cacheDate = DateTime.Parse(value.ToString()); + int timespanMin = (DateTime.Now - cacheDate).Minutes; + if (timespanMin >= 5 && timespanMin <= 10) + { + throw new BusinessValidationFailedException("您已连续阅片2个小时,请休息20分钟后,再继续阅片。"); + } + else if (timespanMin > 10) + { + cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 10))) * 10); + _provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); - //} + } #endregion