From 9ebb2b2124c6ea776c61da36c3cc49940895687a Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 27 三月 2024 08:09:39 +0800
Subject: [PATCH] Merge branch 'master' into wxw

---
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs |   64 ++++++++++++++++---------------
 1 files changed, 33 insertions(+), 31 deletions(-)

diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index e85ca4e..17d6ceb 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -2874,41 +2874,43 @@
                         #region 鍖呰淇℃伅
 
                         var pack = packList.FirstOrDefault(p => p.PackagNo == detail.PackagNo);
-                        if (pack == null)
-                        {
-                            throw new Exception("鏈煡璇㈠埌鐗╂枡鍖呰");
-                        }
                         var pNum = 0;//鎵樼洏鐗╁搧鏁伴噺
                         var bNum = 0;//绠辩墿鍝佹暟閲�
-                        if (pack.L5Num.HasValue)
+                        if (pack != null)
                         {
-                            pNum = Convert.ToInt32(pack.L5Num);
-                            bNum = Convert.ToInt32(pack.L4Num);
+                            //throw new Exception("鏈煡璇㈠埌鐗╂枡鍖呰");
+                            if (pack.L5Num.HasValue)
+                            {
+                                pNum = Convert.ToInt32(pack.L5Num);
+                                bNum = Convert.ToInt32(pack.L4Num);
+                            }
+                            else if (pack.L4Num.HasValue)
+                            {
+                                pNum = Convert.ToInt32(pack.L4Num);
+                                bNum = Convert.ToInt32(pack.L3Num);
+                            }
+                            else if (pack.L3Num.HasValue)
+                            {
+                                pNum = Convert.ToInt32(pack.L3Num);
+                                bNum = Convert.ToInt32(pack.L2Num);
+                            }
+                            else if (pack.L2Num.HasValue)
+                            {
+                                pNum = Convert.ToInt32(pack.L2Num);
+                                bNum = Convert.ToInt32(pack.L1Num);
+                            }
+                            else if (pack.L1Num.HasValue)
+                            {
+                                pNum = Convert.ToInt32(pack.L1Num);
+                                bNum = Convert.ToInt32(pack.L1Num);
+                            }
                         }
-                        else if (pack.L4Num.HasValue)
-                        {
-                            pNum = Convert.ToInt32(pack.L4Num);
-                            bNum = Convert.ToInt32(pack.L3Num);
-                        }
-                        else if (pack.L3Num.HasValue)
-                        {
-                            pNum = Convert.ToInt32(pack.L3Num);
-                            bNum = Convert.ToInt32(pack.L2Num);
-                        }
-                        else if (pack.L2Num.HasValue)
-                        {
-                            pNum = Convert.ToInt32(pack.L2Num);
-                            bNum = Convert.ToInt32(pack.L1Num);
-                        }
-                        else if (pack.L1Num.HasValue)
-                        {
-                            pNum = Convert.ToInt32(pack.L1Num);
-                            bNum = Convert.ToInt32(pack.L1Num);
-                        }
-                        if (pNum == 0)
-                        {
-                            throw new Exception("鏈煡璇㈠埌鐗╂枡鍖呰鎵樼鍏崇郴淇℃伅");
-                        }
+                       
+                        
+                        //if (pNum == 0)
+                        //{
+                        //    throw new Exception("鏈煡璇㈠埌鐗╂枡鍖呰鎵樼鍏崇郴淇℃伅");
+                        //}
                         #endregion
                         //鍙栧悎閫傚簱瀛樺晢鍝�
                         Dictionary<int, decimal> stockQtyDic = new Dictionary<int, decimal>();//鎵樺嚭搴撶墿鍝佹暟

--
Gitblit v1.8.0