From f147cfa91feec613eb304c78fecafdf43286034a Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 30 三月 2024 11:12:24 +0800
Subject: [PATCH] Merge branch 'wxw'

---
 Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs |   36 +++++++++++++++++++++++++++---------
 1 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
index 46fad24..b1a74da 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -447,7 +447,7 @@
                     {
                         throw new Exception("鎷h揣鏁伴噺涓嶈兘澶т簬绠卞唴鍓╀綑寰呮嫞鏁伴噺");
                     }
-                    var pickQty = 0;//鎷h揣鐨勬暟閲�
+                    decimal pickQty = 0;//鎷h揣鐨勬暟閲�
                     var comDetailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.ExportAllotId == allot.Id && m.PalletNo == palletNo).ToList();
                     var comList = new List<BllCompleteDetail>();
                     foreach (var item in boxInfos)
@@ -580,7 +580,7 @@
                         {
                             throw new Exception("璇ョ鐮佸唴瀛樺湪鏀爜涓嶈兘杩涜鏁伴噺鎷h揣");
                         }
-                        int boxQty = boxInfo.First().Qty;
+                        decimal boxQty = boxInfo.First().Qty;
                         if (Convert.ToInt32(pickQty1) > boxQty)
                         {
                             throw new Exception("鎷h揣鏁伴噺涓嶈兘澶т簬绠卞唴鏁伴噺");
@@ -616,7 +616,7 @@
                             }
                         }
                     }
-                    var pickQty = 0;//鎷h揣鐨勬暟閲�
+                    decimal pickQty = 0;//鎷h揣鐨勬暟閲�
 
                     var comList = new List<BllCompleteDetail>();
                     foreach (var item in boxInfos)
@@ -1233,6 +1233,20 @@
 
                 #endregion
 
+                #region 楠岃瘉鍌ㄤ綅鐘舵�佹槸鍚︽甯�
+
+                var locat = Db.Queryable<SysStorageLocat>().First(a=>a.IsDel == "0" && a.LocatNo == result.LocatNo);
+                if (locat == null)
+                {
+                    throw new Exception("鏈幏鍙栧埌瀵瑰簲鍌ㄤ綅淇℃伅锛岃妫�鏌�!");
+                }
+                if (locat.Status != "1")
+                {
+                    throw new Exception("褰撳墠鍌ㄤ綅涓嶆槸鏈夌墿鍝侊紝璇锋鏌�!");
+                }
+
+                #endregion
+
                 //鑾峰彇搴撳瓨鏄庣粏淇℃伅
                 var stockDetail = Db.Queryable<DataStockDetail>().Where(s => s.IsDel == "0" && s.PalletNo == palletNo).ToList();
                 //楠岃瘉搴撳瓨鏄庣粏淇℃伅鏄惁瀛樺湪
@@ -1284,6 +1298,10 @@
                         item.AreaNo = "";//鎵�灞炲尯鍩熸洿鏀癸紙鏀逛负绌猴級
                         Db.Updateable(item).ExecuteCommand();
                     }
+                    //鍙樻洿鍌ㄤ綅鐘舵��
+                    locat.Status = "0";//鍌ㄤ綅鏇存敼锛堟敼涓虹┖鍌ㄤ綅锛�
+                    Db.Updateable(locat).ExecuteCommand();
+
                     //鍑哄簱娴佹按锛堟洿鏀圭姸鎬侊級
                     var allot = Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.Status == "1" && m.PalletNo == palletNo && m.SONo == soNo).ToList();
 
@@ -1596,7 +1614,7 @@
                         {
                             throw new Exception("璇ョ鐮佸唴瀛樺湪鏀爜涓嶈兘杩涜鏁伴噺鎷h揣");
                         }
-                        int boxQty = boxInfo.First().Qty;
+                        decimal boxQty = boxInfo.First().Qty;
                         if (Convert.ToInt32(pickQty1) > boxQty)
                         {
                             throw new Exception("鎷h揣鏁伴噺涓嶈兘澶т簬绠卞唴鏁伴噺");
@@ -1622,7 +1640,7 @@
                             }
                         }
                     }
-                    var pickQty = 0;//鎷h揣鐨勬暟閲�
+                    decimal pickQty = 0;//鎷h揣鐨勬暟閲�
 
                     var comList = new List<BllCompleteDetail>();
                     foreach (var item in boxInfos)
@@ -1850,7 +1868,7 @@
                         {
                             throw new Exception("璇ョ鐮佸唴瀛樺湪鏀爜涓嶈兘杩涜鏁伴噺鎷h揣");
                         }
-                        int boxQty = boxInfo.First().Qty;
+                        decimal boxQty = boxInfo.First().Qty;
                         if (Convert.ToInt32(pickQty1) > boxQty)
                         {
                             throw new Exception("鎷h揣鏁伴噺涓嶈兘澶т簬绠卞唴鏁伴噺");
@@ -1885,7 +1903,7 @@
                             }
                         }
                     }
-                    var pickQty = 0;//鎷h揣鐨勬暟閲�
+                    decimal pickQty = 0;//鎷h揣鐨勬暟閲�
 
                     var comList = new List<BllCompleteDetail>();
                     foreach (var item in boxInfos)
@@ -2674,7 +2692,7 @@
                 }
                 #endregion
 
-                var pickQty = 0;//鎷h揣鐨勬暟閲�
+                decimal pickQty = 0;//鎷h揣鐨勬暟閲�
                 if (string.IsNullOrWhiteSpace(boxNo))//鏁存墭鎷h揣
                 {
                     List<DataBoxInfo> boxInfos;
@@ -2830,7 +2848,7 @@
                         {
                             throw new Exception("璇ョ鐮佸唴瀛樺湪鏀爜涓嶈兘杩涜鏁伴噺鎷h揣");
                         }
-                        int boxQty = boxInfo.First().Qty;
+                        decimal boxQty = boxInfo.First().Qty;
                         if (Convert.ToInt32(pickQty1) > boxQty)
                         {
                             throw new Exception("鎷h揣鏁伴噺涓嶈兘澶т簬绠卞唴鏁伴噺");

--
Gitblit v1.8.0