From 19be6575a27a007b3dba7b0d28ddb769b5a1fed6 Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期二, 26 三月 2024 16:31:46 +0800
Subject: [PATCH] Merge branch 'csc'

---
 Wms/WMS.BLL/SysServer/StorageLocatServer.cs |   82 +++++++++++++++++++++++-----------------
 1 files changed, 47 insertions(+), 35 deletions(-)

diff --git a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
index f722153..75671e8 100644
--- a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
+++ b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
@@ -473,8 +473,8 @@
                 int b = 0; //1锛氭湁鐗╁搧 
                 int c = 0; //2锛氬叆搴撲腑 
                 int d = 0; //3锛氬嚭搴撲腑 
-                //int e = 0; //4锛氱Щ鍏ヤ腑 
-                //int f = 0; //5锛氱Щ鍑轰腑 
+                int e = 0; //4锛氱Щ鍏ヤ腑 
+                int f = 0; //5锛氱Щ鍑轰腑 
                 int g = 0; //6锛氭崯鍧廫灞忚斀 
 
                 foreach (var item in getLocateVms)
@@ -503,18 +503,18 @@
                         d = 1; //3锛氬嚭搴撲腑 
                         continue;
                     }
-                    ////4锛氱Щ鍏ヤ腑 
-                    //if (item.Status == "4")
-                    //{
-                    //    e = 1; //4锛氱Щ鍏ヤ腑 
-                    //    continue;
-                    //}
-                    ////5锛氱Щ鍑轰腑 
-                    //if (item.Status == "5")
-                    //{
-                    //    f = 1; //5锛氱Щ鍑轰腑 
-                    //    continue;
-                    //}
+                    //4锛氱Щ鍏ヤ腑 
+                    if (item.Status == "4")
+                    {
+                        e = 1; //4锛氱Щ鍏ヤ腑 
+                        continue;
+                    }
+                    //5锛氱Щ鍑轰腑 
+                    if (item.Status == "5")
+                    {
+                        f = 1; //5锛氱Щ鍑轰腑 
+                        continue;
+                    }
                     //6锛氭崯鍧廫灞忚斀 
                     if (item.Status == "6")
                     {
@@ -559,24 +559,24 @@
                     getLocateVm.Status = "3";
                     getLocateVms.Add(getLocateVm);
                 }
-                ////4锛氱Щ鍏ヤ腑 
-                //if (e == 0)
-                //{
-                //    getLocateVm = new GetLocateVm();
-                //    getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
-                //    getLocateVm.StatusNum = "0";
-                //    getLocateVm.Status = "4";
-                //    getLocateVms.Add(getLocateVm);
-                //}
-                ////5锛氱Щ鍑轰腑 
-                //if (f == 0)
-                //{
-                //    getLocateVm = new GetLocateVm();
-                //    getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
-                //    getLocateVm.StatusNum = "0";
-                //    getLocateVm.Status = "5";
-                //    getLocateVms.Add(getLocateVm);
-                //}
+                //4锛氱Щ鍏ヤ腑 
+                if (e == 0)
+                {
+                    getLocateVm = new GetLocateVm();
+                    getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
+                    getLocateVm.StatusNum = "0";
+                    getLocateVm.Status = "4";
+                    getLocateVms.Add(getLocateVm);
+                }
+                //5锛氱Щ鍑轰腑 
+                if (f == 0)
+                {
+                    getLocateVm = new GetLocateVm();
+                    getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
+                    getLocateVm.StatusNum = "0";
+                    getLocateVm.Status = "5";
+                    getLocateVms.Add(getLocateVm);
+                }
                 //6锛氭崯鍧廫灞忚斀 
                 if (g == 0)
                 {
@@ -635,7 +635,12 @@
         {
             try
             {
-                string str = "select RoadwayNo,RoadwayName,WareHouseNo from SysStorageRoadway where IsDel = @isdel and WareHouseNo = @warehouseno";
+                string str = "select RoadwayNo,RoadwayName,WareHouseNo from SysStorageRoadway where IsDel = @isdel";
+
+                if (!string.IsNullOrWhiteSpace(wareHouseNo))
+                {
+                    str += " and WareHouseNo = @warehouseno";
+                }
 
                 List<RoadwayDto> roadway = Db.Ado.SqlQuery<RoadwayDto>(str, new
                 {
@@ -667,7 +672,7 @@
                     throw new Exception("鏈壘鍒板搴斿偍浣�");
                 }
                 //鏈夌墿鍝併�佸嚭搴撲腑鏁版嵁婧愶紙搴撳瓨鏄庣粏琛級
-                if (storageLocat.Status == "1" || storageLocat.Status == "3")
+                if (storageLocat.Status == "1" || storageLocat.Status == "3" || storageLocat.Status == "5")
                 {
                     //搴撳瓨鏄庣粏
                     List<DataStockDetail> stockDetailList = Db.Queryable<DataStockDetail>().Where(w => w.LocatNo == locatNo && w.IsDel == "0").ToList();
@@ -696,7 +701,8 @@
                 else if (storageLocat.Status == "2")
                 {
                     //鎵樼洏缁戝畾淇℃伅
-                    List<BllPalletBind> palletBindList = Db.Queryable<BllPalletBind>().Where(w => w.LocatNo == locatNo && w.IsDel == "0").ToList();
+                    List<BllPalletBind> palletBindList = Db.Queryable<BllPalletBind>()
+                        .Where(w => w.LocatNo == locatNo && w.IsDel == "0" && w.Status == "1").ToList();
                     if (palletBindList == null || palletBindList.Count <= 0)
                     {
                         throw new Exception("鏈壘鍒板搴旂殑鎵樼洏缁戝畾淇℃伅");
@@ -744,6 +750,12 @@
                     case "3":
                         model.Status = "鍑哄簱涓�";
                         break;
+                    case "4":
+                        model.Status = "绉诲叆涓�";
+                        break;
+                    case "5":
+                        model.Status = "绉诲嚭涓�";
+                        break;
                     default:
                         model.Status = "";
                         break;

--
Gitblit v1.8.0