IRC_NewDev
parent
867c7b1752
commit
0888577cde
|
@ -16,6 +16,7 @@ using Microsoft.Extensions.Caching.Memory;
|
|||
using IRaCIS.Core.Application.Filter;
|
||||
using DocumentFormat.OpenXml.Drawing;
|
||||
using EasyCaching.Core;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -2581,9 +2582,8 @@ namespace IRaCIS.Application.Services
|
|||
var startReadingTimeKey = _userInfo.Id.ToString()+ "StartReadingTime";
|
||||
var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime";
|
||||
|
||||
int readingMinute = 120; // 为60整数
|
||||
int readingMinute = 12; // 为60整数
|
||||
int restMinute = 10; //
|
||||
|
||||
var startReadingTime = _provider.Get<string>(startReadingTimeKey).Value;
|
||||
var startRestTime = _provider.Get<string>(startRestTimeKey).Value;
|
||||
if (startReadingTime == null && startRestTime == null)
|
||||
|
@ -2596,7 +2596,7 @@ namespace IRaCIS.Application.Services
|
|||
int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes;
|
||||
if (timespanMin <= restMinute)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute/60, restMinute]);
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute/60m, restMinute]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2617,7 +2617,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
_provider.Remove(startReadingTimeKey);
|
||||
_provider.Set(startRestTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60, restMinute]);
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60m, restMinute]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue