| | |
| | | 锘縰sing AngleSharp.Dom; |
| | | using Magicodes.ExporterAndImporter.Excel.Utility.TemplateExport; |
| | | using MailKit.Search; |
| | | using Masuit.Tools; |
| | | using Microsoft.Extensions.Hosting; |
| | |
| | | private readonly IDt_AllocateOutboundOrderService _allocateOutboundOrderService; |
| | | private Timer _timer; |
| | | |
| | | public MyBackgroundService(ILogger<MyBackgroundService> logger, ILocationInfoRepository locationRepository, IStockInfoRepository stockInfoRepository,IDt_TaskRepository taskRepository,ISys_ConfigService configService,IDt_InboundOrderRepository inboundOrderRepository,IDt_AllocateOutboundOrderRepository allocateoutboundorderRepository,IDt_ProductionOutboundOrderRepository productionOutboundOrderRepository,IUnitOfWorkManage unitOfWorkManage, IDt_ProductionOutboundOrderService productionOutboundOrderService, IDt_AllocateOutboundOrderService allocateOutboundOrderService) |
| | | private readonly PrintStatusContainer _printStatusContainer; |
| | | |
| | | public MyBackgroundService(ILogger<MyBackgroundService> logger, ILocationInfoRepository locationRepository, IStockInfoRepository stockInfoRepository,IDt_TaskRepository taskRepository,ISys_ConfigService configService,IDt_InboundOrderRepository inboundOrderRepository,IDt_AllocateOutboundOrderRepository allocateoutboundorderRepository,IDt_ProductionOutboundOrderRepository productionOutboundOrderRepository,IUnitOfWorkManage unitOfWorkManage, IDt_ProductionOutboundOrderService productionOutboundOrderService, IDt_AllocateOutboundOrderService allocateOutboundOrderService, PrintStatusContainer printStatusContainer) |
| | | { |
| | | _logger = logger; |
| | | _locationRepository = locationRepository; |
| | |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _productionOutboundOrderService = productionOutboundOrderService; |
| | | _allocateOutboundOrderService = allocateOutboundOrderService; |
| | | _printStatusContainer = printStatusContainer; |
| | | } |
| | | |
| | | public MyBackgroundService() |
| | | { |
| | | } |
| | | |
| | | public Task StartAsync(CancellationToken cancellationToken) |
| | |
| | | |
| | | if (inboundOrderAdd.Count > 0) |
| | | { |
| | | //PrintInbound(inboundOrderAdd); |
| | | if (_printStatusContainer.AutomaticPrint) |
| | | { |
| | | PrintInbound(inboundOrderAdd); |
| | | } |
| | | _inboundOrderRepository.AddData(inboundOrderAdd); |
| | | } |
| | | if (inboundOrderUpdate.Count > 0) |
| | | { |
| | | //PrintInbound(inboundOrderUpdate); |
| | | if (_printStatusContainer.AutomaticPrint) |
| | | { |
| | | PrintInbound(inboundOrderUpdate); |
| | | } |
| | | _inboundOrderRepository.UpdateData(inboundOrderUpdate); |
| | | } |
| | | |
| | |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | |
| | | |
| | | public void PrintInbound(List<Dt_InboundOrder> orders) |
| | | { |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |