From 221d1a57573842b034cfa4f68b2b70cdf1a0a26a Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 02 一月 2025 22:25:34 +0800
Subject: [PATCH] 更新修改优化后的代码

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 6b37125..95dce0e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -270,7 +270,7 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒拌浠撳簱淇℃伅");
                 }
-
+                
                 Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo && x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).First();
                 if (inboundOrder == null)
                 {
@@ -344,6 +344,14 @@
                 if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
                 {
                     stockInfo.Remark = Initiallife.ToString();
+                    if (palletCode.Substring(0, 1) == "6")
+                    {
+                        stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt();
+                    }
+                    else
+                    {
+                        stockInfo.PalletType = PalletTypeEnum.LargestPallet.ObjToInt();
+                    }
                 }
 
                 List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
@@ -467,6 +475,14 @@
                 if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
                 {
                     stockInfo.Remark = Initiallife.ToString();
+                    if (palletCode.Substring(0, 1) == "6")
+                    {
+                        stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt();
+                    }
+                    else
+                    {
+                        stockInfo.PalletType = PalletTypeEnum.LargestPallet.ObjToInt();
+                    }
                 }
 
                 List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
@@ -557,16 +573,8 @@
                     Way = 1,
                     Details = detailModels
                 };
-                string response = _invokeERPService.InvokeInboundOrderApi(model);
-                ErpRequestContent? requestContent = JsonConvert.DeserializeObject<ErpRequestContent>(response);
-                if (requestContent == null)
-                {
-                    return WebResponseContent.Instance.Error();
-                }
-                if (requestContent.res == 0)
-                {
-                    return WebResponseContent.Instance.Error(requestContent.Data);
-                }
+                //鎺ㄩ�丒RP 娴嬭瘯娉ㄩ噴
+                _invokeERPService.InvokeInboundOrderApi(model);
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
@@ -649,7 +657,8 @@
                     Way = 1,
                     Details = detailModels
                 };
-                string response = _invokeERPService.InvokeInboundOrderApi(model);
+                //娴嬭瘯娉ㄩ噴
+                _invokeERPService.InvokeInboundOrderApi(model);
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)

--
Gitblit v1.9.3