yangpeixing
4 小时以前 027b75833ae1bc3bd1bb597b18c65c9177fa62d4
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
@@ -1,4 +1,5 @@
锘縰sing AngleSharp.Dom;
using Magicodes.ExporterAndImporter.Excel.Utility.TemplateExport;
using MailKit.Search;
using Masuit.Tools;
using Microsoft.Extensions.Hosting;
@@ -39,7 +40,9 @@
        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;
@@ -52,6 +55,11 @@
            _unitOfWorkManage = unitOfWorkManage;
            _productionOutboundOrderService = productionOutboundOrderService;
            _allocateOutboundOrderService = allocateOutboundOrderService;
            _printStatusContainer = printStatusContainer;
        }
        public MyBackgroundService()
        {
        }
        public Task StartAsync(CancellationToken cancellationToken)
@@ -308,12 +316,18 @@
                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);
                }
@@ -362,6 +376,8 @@
            return Task.CompletedTask;
        }
        public void PrintInbound(List<Dt_InboundOrder> orders)
        {
            var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);