From 027b75833ae1bc3bd1bb597b18c65c9177fa62d4 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期三, 17 十二月 2025 12:10:18 +0800
Subject: [PATCH] 1.WMS中添加自动打印开关

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs"
index 65df8fc..5984e31 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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);

--
Gitblit v1.9.3