From 5a15fa73d5f6a39917013871a65eb11a8c013391 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 05 十一月 2025 17:30:56 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/ERPInboundOrderService.cs |   46 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 44 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/ERPInboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/ERPInboundOrderService.cs"
index e3a0f21..9351ba7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/ERPInboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/ERPInboundOrderService.cs"
@@ -9,10 +9,12 @@
 using System.Threading.Tasks;
 using WIDESEA_Common;
 using WIDESEA_Core.Const;
+using WIDESEA_IOrderRepository;
 using WIDESEA_IServices;
 using WIDESEA_IStorageBasicServices.Stock;
 using WIDESEA_Model.Models.ERP;
 using WIDESEA_Model.Models.Order;
+using WIDESEA_OrderRepository;
 
 namespace WIDESEA_StorageBasicServices
 {
@@ -20,10 +22,12 @@
     {
         private readonly IUnitOfWorkManage _unitOfWorkManage; 
         private readonly ISys_ConfigService _configService;
-        public ERPInboundOrderService(IUnitOfWorkManage unitOfWorkManage, ISys_ConfigService configService)
+        private readonly IDt_InboundOrderRepository _inboundOrderRepository;
+        public ERPInboundOrderService(IUnitOfWorkManage unitOfWorkManage, ISys_ConfigService configService,IDt_InboundOrderRepository inboundOrderRepository)
         {
             _unitOfWorkManage = unitOfWorkManage;
             _configService = configService;
+            _inboundOrderRepository = inboundOrderRepository;
         }
         public virtual PageGridData<WMS_閲囪喘鍙婃垚鍝佸叆搴撴竻鍗昣ST> GetPageData(PageDataOptions options)
         {
@@ -36,7 +40,45 @@
             new PageGridData<WMS_閲囪喘鍙婃垚鍝佸叆搴撴竻鍗昣ST>(totalCount, data);
             return new PageGridData<WMS_閲囪喘鍙婃垚鍝佸叆搴撴竻鍗昣ST>(totalCount, data);
         }
-
+        public WebResponseContent Print(List<WMS_閲囪喘鍙婃垚鍝佸叆搴撴竻鍗昣ST> wMSs)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                List<Dt_InboundOrder> orderinbound=new List<Dt_InboundOrder>();
+                foreach (var wMS in wMSs)
+                {
+                    Dt_InboundOrder Print = new Dt_InboundOrder()
+                    {
+                        OrderNo = GetOrderPintCode("OrderNoIn"),
+                        UpperOrderNo = wMS.鍗曞彿,
+                        DemandClassification = wMS.闇�姹傚垎绫�,
+                        OrderType = wMS.鍗曟嵁绫诲瀷,
+                        WarehouseName = wMS.鍏ュ簱浠撳簱鍚嶇О,
+                        Datetime = wMS.鏃ユ湡.ToString(),
+                        LineNumber = wMS.琛屽彿,
+                        ProductDrawingNumber = wMS.浜у搧鍥惧彿,
+                        MaterialNo = wMS.鏂欏彿,
+                        MaterialName = wMS.鍝佸悕,
+                        Weight = wMS.鍗曢噸,
+                        WareHouseId = wMS.鍏ュ簱浠撳簱缂栫爜,
+                        Specs = wMS.瑙勬牸,
+                        Unit = wMS.鍗曚綅,
+                        Texture = wMS.鐢ㄥ弸鏉愯川,
+                        Quantity = wMS.鍏ュ簱鏁伴噺,
+                        OrderStatus = wMS.鍗曟嵁鐘舵��
+                    };
+                    orderinbound.Add(Print);
+                }
+                _inboundOrderRepository.AddData(orderinbound);
+                PrintInbound(orderinbound);
+                return content.OK("鎵撳嵃鎴愬姛");
+            }
+            catch (Exception ex)
+            {
+                return content.Error(ex.Message);
+            }
+        }
         public void PrintInbound(List<Dt_InboundOrder> orders)
         {
             var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);

--
Gitblit v1.9.3