Browse Source

冲突 补充 提交

HQ
liuyunfeng 10 months ago
parent
commit
e9ad9c732e
  1. 36
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs
  2. 14
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml

36
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.EdiReceive.Services;
using WY.NewJit.EntityFrameworkCore; using WY.NewJit.EntityFrameworkCore;
using WY.NewJit.MsgBaseData; using WY.NewJit.MsgBaseData;
using WY.NewJit.MsgCheck;
namespace WY.NewJit.EdiReceive namespace WY.NewJit.EdiReceive
{ {
@ -61,6 +62,11 @@ namespace WY.NewJit.EdiReceive
private readonly EdiParseDomainService _ediParseDomainService; private readonly EdiParseDomainService _ediParseDomainService;
/// <summary>
/// 配置
/// </summary>
private readonly Microsoft.Extensions.Configuration.IConfiguration _configuration;
/// <summary> /// <summary>
/// 错误信息前缀 /// 错误信息前缀
/// </summary> /// </summary>
@ -84,7 +90,8 @@ namespace WY.NewJit.EdiReceive
NewJitDapperRepository newJitDapperRepository, NewJitDapperRepository newJitDapperRepository,
IBlobContainer<OurFileContainer> blobContainer, IBlobContainer<OurFileContainer> blobContainer,
DicDomainService dicDomainService, DicDomainService dicDomainService,
EdiParseDomainService ediParseDomainService) EdiParseDomainService ediParseDomainService,
Microsoft.Extensions.Configuration.IConfiguration configuration)
{ {
_importRecordRepository = importRecordRepository; _importRecordRepository = importRecordRepository;
_logger = logger; _logger = logger;
@ -92,6 +99,7 @@ namespace WY.NewJit.EdiReceive
_blobContainer = blobContainer; _blobContainer = blobContainer;
_dicDomainService = dicDomainService; _dicDomainService = dicDomainService;
_ediParseDomainService = ediParseDomainService; _ediParseDomainService = ediParseDomainService;
_configuration = configuration;
} }
#region 私有方法 #region 私有方法
@ -485,6 +493,32 @@ namespace WY.NewJit.EdiReceive
return ret; return ret;
} }
} }
/// <summary>
/// 打印时间提醒
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[UnitOfWork]
[HttpPost]
[Route("print-timeout-remind")]
public virtual async Task<TimeOutRemindResultDto> 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 #endregion
} }
} }

14
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml

@ -39,12 +39,17 @@
字典领域服务 字典领域服务
</summary> </summary>
</member> </member>
<member name="F:WY.NewJit.EdiReceive.ImportRecordAppService._configuration">
<summary>
配置
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.ImportRecordAppService._errorMessagePrefix"> <member name="P:WY.NewJit.EdiReceive.ImportRecordAppService._errorMessagePrefix">
<summary> <summary>
错误信息前缀 错误信息前缀
</summary> </summary>
</member> </member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.EdiReceive.Entitys.ImportRecord,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.EdiReceive.ImportRecordAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},WY.NewJit.MsgBaseData.DicDomainService,WY.NewJit.EdiReceive.Services.EdiParseDomainService)"> <member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.EdiReceive.Entitys.ImportRecord,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.EdiReceive.ImportRecordAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},WY.NewJit.MsgBaseData.DicDomainService,WY.NewJit.EdiReceive.Services.EdiParseDomainService,Microsoft.Extensions.Configuration.IConfiguration)">
<summary> <summary>
构造函数 构造函数
</summary> </summary>
@ -125,6 +130,13 @@
<param name="forceExecute">校验出错时,是否强制执行</param> <param name="forceExecute">校验出错时,是否强制执行</param>
<returns>执行成功返回真</returns> <returns>执行成功返回真</returns>
</member> </member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.PrintTimeoutRemind(WY.NewJit.MsgCheck.TimeOutRemindInputDto)">
<summary>
打印时间提醒
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:WY.NewJit.Extends.ProductLineAuthorityAppService"> <member name="T:WY.NewJit.Extends.ProductLineAuthorityAppService">
<summary> <summary>
生产线权限管理应用服务实现 生产线权限管理应用服务实现

Loading…
Cancel
Save