From 9f9b980d5c801db37922828deded131bdc00be3c Mon Sep 17 00:00:00 2001 From: Demo <Demo@DESKTOP-CPA90BF> Date: 星期二, 26 三月 2024 16:28:46 +0800 Subject: [PATCH] 修改分配方法 --- 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