From fa98d09fc729817d6d640845827954b07472661b Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 16 七月 2025 09:29:38 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index bae79e7..60b594c 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -1164,7 +1164,7 @@
                 }
                 //鍒ゆ柇鎵樼洏鏄惁鍦ㄥ簱澶�
                 var stockDetail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == model.PalletNo);
-                if (stockDetail != null && !string.IsNullOrEmpty(stockDetail.WareHouseNo))
+                if (stockDetail != null && !string.IsNullOrEmpty(stockDetail.WareHouseNo) && stockDetail.WareHouseNo != "W04")
                 {
                     throw new Exception("璇ユ墭鐩樺凡鏈夊偍浣嶄俊鎭紝璇锋牳瀹烇紒");
                 }
@@ -4287,10 +4287,18 @@
             try
             {
                 string strMsg = "";
-                var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == locatNo && w.Status == "0" && w.WareHouseNo == "W04");
+                var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == locatNo && w.WareHouseNo == "W04");
                 if (storageLocat == null)
                 {
-                    throw new Exception("-1:鍦扮爜(鍌ㄤ綅淇℃伅)涓嶅瓨鍦ㄦ垨闈炵┖闂茬姸鎬侊紝璇锋牳鏌�!");
+                    throw new Exception("-1:鍦扮爜(鍌ㄤ綅淇℃伅)涓嶅瓨鍦紝璇锋牳鏌�!");
+                }
+                if (storageLocat.Status != "0")
+                {
+                    var detailInfo = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo);
+                    if (detailInfo != null)
+                    {
+                        throw new Exception("-1:鍦扮爜(鍌ㄤ綅淇℃伅)闈炵┖闂诧紝璇锋牳鏌�!");
+                    }
                 }
 
                 return strMsg;
@@ -6087,10 +6095,18 @@
                 #endregion
 
                 #region 鍦扮爜淇℃伅(鍌ㄤ綅淇℃伅)
-                var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == model.LocatNo && w.Status == "0");
+                var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == model.LocatNo);
                 if (storageLocat == null)
                 {
-                    throw new Exception("鍌ㄤ綅淇℃伅涓嶅瓨鍦ㄦ垨闈炵┖闂茬姸鎬侊紝璇锋牳鏌�!");
+                    throw new Exception("鍌ㄤ綅淇℃伅涓嶅瓨锛岃鏍告煡!");
+                }
+                if (storageLocat.Status != "0")
+                { 
+                    var detailInfo=Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo);
+                    if (detailInfo != null)
+                    {
+                        throw new Exception("鍌ㄤ綅涓嶆槸绌洪棽鐘舵�侊紝璇锋牳鏌�!");
+                    }
                 }
                 #endregion
 
@@ -6556,10 +6572,10 @@
 
                 foreach (var item in stockDetailList)
                 {
-                    if (item.AreaNo != "B06" && item.AreaNo != "B07" && item.AreaNo != "B09")
-                    {
-                        throw new Exception("璇ユ墭鐩橀潪绾胯竟鍥炲簱鎵樼洏!");
-                    }
+                    //if (item.AreaNo != "B06" && item.AreaNo != "B07" && item.AreaNo != "B09")
+                    //{
+                    //    throw new Exception("璇ユ墭鐩橀潪绾胯竟鍥炲簱鎵樼洏!");
+                    //}
                     //搴撳瓨鎬昏〃
                     var stock = Db.Queryable<DataStock>().First(w => w.IsDel == "0" && w.SkuNo == item.SkuNo && w.LotNo == item.LotNo);
                     if (stock == null)

--
Gitblit v1.8.0