diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs
index b95d960..384b573 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs
@@ -23,6 +23,7 @@ using WY.NewJit.EdiReceive.Interfaces;
using WY.NewJit.EdiReceive.Services;
using WY.NewJit.EntityFrameworkCore;
using WY.NewJit.MsgBaseData;
+using WY.NewJit.MsgCheck;
namespace WY.NewJit.EdiReceive
{
@@ -61,6 +62,11 @@ namespace WY.NewJit.EdiReceive
private readonly EdiParseDomainService _ediParseDomainService;
+ ///
+ /// 配置
+ ///
+ private readonly Microsoft.Extensions.Configuration.IConfiguration _configuration;
+
///
/// 错误信息前缀
///
@@ -84,7 +90,8 @@ namespace WY.NewJit.EdiReceive
NewJitDapperRepository newJitDapperRepository,
IBlobContainer blobContainer,
DicDomainService dicDomainService,
- EdiParseDomainService ediParseDomainService)
+ EdiParseDomainService ediParseDomainService,
+ Microsoft.Extensions.Configuration.IConfiguration configuration)
{
_importRecordRepository = importRecordRepository;
_logger = logger;
@@ -92,6 +99,7 @@ namespace WY.NewJit.EdiReceive
_blobContainer = blobContainer;
_dicDomainService = dicDomainService;
_ediParseDomainService = ediParseDomainService;
+ _configuration = configuration;
}
#region 私有方法
@@ -485,6 +493,32 @@ namespace WY.NewJit.EdiReceive
return ret;
}
}
+
+ ///
+ /// 打印时间提醒
+ ///
+ ///
+ ///
+ [UnitOfWork]
+ [HttpPost]
+ [Route("print-timeout-remind")]
+ public virtual async Task PrintTimeoutRemind(TimeOutRemindInputDto input)
+ {
+ TimeOutRemindResultDto retObj = new TimeOutRemindResultDto();
+ retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind_New:{"Record"}"].TryToInt() ?? 40;
+ var qry = await _importRecordRepository.MaxAsync(itm => itm.CreateTime);
+ retObj.LastReceiveTime = qry != null ? Convert.ToDateTime(qry) : ServerHelper.CurrentDateTime;
+ retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime);
+ return retObj;
+ }
+
+ private int MinuteDiff(DateTime beginTime, DateTime endTime)
+ {
+ TimeSpan beginSpan = new TimeSpan(beginTime.Ticks);
+ TimeSpan endSpan = new TimeSpan(endTime.Ticks);
+ TimeSpan diffSpan = endSpan.Subtract(beginSpan).Duration();
+ return (int)(diffSpan.TotalMinutes);
+ }
#endregion
}
}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
index 8d3a481..2b57780 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
@@ -39,12 +39,17 @@
字典领域服务
+
+
+ 配置
+
+
错误信息前缀
-
+
构造函数
@@ -125,6 +130,13 @@
校验出错时,是否强制执行
执行成功返回真
+
+
+ 打印时间提醒
+
+
+
+
生产线权限管理应用服务实现