From 97a9ad53c6d1ac097f46f0b5d4d4d53547c9efe4 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 21 十一月 2025 16:18:21 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_OrderServices/Dt_InboundOrderService.cs |   77 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 74 insertions(+), 3 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_OrderServices/Dt_InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_OrderServices/Dt_InboundOrderService.cs"
index f4ab182..3d0d20a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_OrderServices/Dt_InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_OrderServices/Dt_InboundOrderService.cs"
@@ -50,6 +50,11 @@
             return base.UpdateData(saveModel);
         }
 
+        /// <summary>
+        /// 鏌ヨ鍏ュ簱鍗曟嵁淇℃伅
+        /// </summary>
+        /// <param name="OrderNo"></param>
+        /// <returns></returns>
         public WebResponseContent GetInboundOrderInfo(string OrderNo)
         {
             WebResponseContent content=new WebResponseContent();
@@ -67,6 +72,12 @@
                 return content.Error(ex.Message);
             }
         }
+
+        /// <summary>
+        /// 鎵撳嵃
+        /// </summary>
+        /// <param name="keys"></param>
+        /// <returns></returns>
         public WebResponseContent PrintOrder(int[] keys)
         {
             WebResponseContent content = new WebResponseContent();
@@ -81,7 +92,7 @@
                         inboundOrders.Add(InboundOrder);
                     }
                 }
-                content=PrintInbound(inboundOrders);
+                content = PrintInbound(inboundOrders);
                 return content;
             }
             catch (Exception ex)
@@ -90,6 +101,42 @@
             }
         }
 
+        /// <summary>
+        /// 澶氭鎵撳嵃
+        /// </summary>
+        /// <param name="keys"></param>
+        /// <param name="num"></param>
+        /// <returns></returns>
+        public WebResponseContent MultiplePrintOrder(int keys,int num)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>();
+                var InboundOrder = BaseDal.QueryFirst(x => x.Id == keys);
+                for (int i = 0; i < num; i++)
+                {
+                    if (InboundOrder != null)
+                    {
+                        inboundOrders.Add(InboundOrder);
+                    }
+                }
+
+                content = PrintInbound(inboundOrders);
+                return content;
+            }
+            catch (Exception ex)
+            {
+                return content.Error("鏈煡閿欒锛岃鑱旂郴绠$悊鍛�");
+            }
+        }
+
+        /// <summary>
+        /// 鎷嗗垎
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="num"></param>
+        /// <returns></returns>
         public WebResponseContent SplitOrder(int id,int num)
         {
             WebResponseContent content = new WebResponseContent();
@@ -100,7 +147,7 @@
                 {
                     return content.Error("鏈壘鍒拌鍏ュ簱鍗曚俊鎭�");
                 }
-                if(originalOrder.Quantity < num || num <= 0)
+                if(originalOrder.Quantity < num || num <= 0 || originalOrder.Quantity - num == 0) 
                 {
                     return content.Error("鎷嗗垎鏁伴噺涓嶅悎娉�");
                 }
@@ -123,7 +170,6 @@
                     Texture = originalOrder.Texture,
                     Quantity = num,
                     OrderStatus = originalOrder.OrderStatus,
-
                 };
                 originalOrder.Quantity = originalOrder.Quantity - num;
 
@@ -137,6 +183,12 @@
             }
         }
 
+
+        /// <summary>
+        /// 鎵撳嵃鎵樼洏鐮�
+        /// </summary>
+        /// <param name="num"></param>
+        /// <returns></returns>
         public WebResponseContent PrintPalletCode(int num)
         {
             WebResponseContent content = new WebResponseContent();
@@ -155,6 +207,12 @@
                 return content.Error("鏈煡閿欒锛岃鑱旂郴绠$悊鍛�");
             }
         }
+
+        /// <summary>
+        /// 鑾峰彇璁㈠崟缂栧彿
+        /// </summary>
+        /// <param name="printCode"></param>
+        /// <returns></returns>
         public string GetOrderPintCode(string printCode)
         {
             string PrintCode = "";
@@ -174,6 +232,13 @@
             SqlSugarHelper.DbWMS.Updateable(PrintSetting).ExecuteCommand();
             return PrintCode;
         }
+
+        /// <summary>
+        /// 璋冪敤鎵撳嵃鎵樼洏鐮佹帴鍙�
+        /// </summary>
+        /// <param name="palletCodes"></param>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException"></exception>
         public WebResponseContent PrintPallet(List<string> palletCodes)
         {
             var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
@@ -188,6 +253,12 @@
             return JsonConvert.DeserializeObject<WebResponseContent>(result);
         }
 
+        /// <summary>
+        /// 璋冪敤鎵撳嵃鍗曟嵁鎺ュ彛
+        /// </summary>
+        /// <param name="orders"></param>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException"></exception>
         public WebResponseContent PrintInbound(List<Dt_InboundOrder> orders)
         {
             var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);

--
Gitblit v1.9.3