From 8dbd0c5af65835a1f99a2ac359660d1fa964d945 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期二, 25 六月 2024 11:44:12 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/BllTransServer/NoticeServer.cs |   94 ++++++++++++++++++++++++++---------------------
 1 files changed, 52 insertions(+), 42 deletions(-)

diff --git a/Wms/WMS.BLL/BllTransServer/NoticeServer.cs b/Wms/WMS.BLL/BllTransServer/NoticeServer.cs
index 53992db..9887f0a 100644
--- a/Wms/WMS.BLL/BllTransServer/NoticeServer.cs
+++ b/Wms/WMS.BLL/BllTransServer/NoticeServer.cs
@@ -471,22 +471,8 @@
                         break;
                     #endregion
 
-                    #region 浠诲姟瀹屾垚
-                    case "2":
-                        //璧峰鍌ㄤ綅淇℃伅
-                        var startLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.StartLocat && w.IsDel == "0");
-                        if (startLocatInfo2 == null)
-                        {
-                            resultModel.Message = "璧峰鍌ㄤ綅淇℃伅涓嶅瓨鍦�!";
-                            return resultModel;
-                        }
-                        //鐩爣鍌ㄤ綅淇℃伅
-                        var endLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.EndLocat && w.IsDel == "0");
-                        if (endLocatInfo2 == null)
-                        {
-                            resultModel.Message = "鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�!";
-                            return resultModel;
-                        }
+                    #region 绉诲簱瀹屾垚
+                    case "3":
                         //搴撳瓨鏄庣粏
                         var sd3 = Db.Queryable<DataStockDetail>().First(w => w.PalletNo == taskInfo.PalletNo);
                         if (sd3 == null)
@@ -494,37 +480,61 @@
                             resultModel.Message = "搴撳瓨淇℃伅涓嶅瓨鍦�!";
                             return resultModel;
                         }
-                        sd3.WareHouseNo = endLocatInfo2.WareHouseNo;//鎵�灞炰粨搴�
-                        sd3.RoadwayNo = endLocatInfo2.RoadwayNo;//鎵�灞炲贩閬�
-                        sd3.AreaNo = endLocatInfo2.AreaNo;//鎵�灞炲尯鍩�
-                        sd3.LocatNo = endLocatInfo2.LocatNo;//鍌ㄤ綅鍦板潃
-                        if (endLocatInfo2.AreaNo == "A01")//娲佸噣鍖�
+                        if (taskInfo.Type == "0")//鍏ュ簱浠诲姟
                         {
-                            sd3.PalletStatus = "0";
-                        }
-                        else if (endLocatInfo2.AreaNo == "A02")//棰勬贩鍖�
-                        {
-                            sd3.PalletStatus = "1";
-                        }
-                        else if (endLocatInfo2.AreaNo == "A03")//鍗婃垚鍝佸尯
-                        {
-                            sd3.PalletStatus = "2";
-                        }
-                        else if (endLocatInfo2.AreaNo == "A04")//鑴忔《鍖�
-                        {
-                            sd3.PalletStatus = "3";
-                        }
+                            //鐩爣鍌ㄤ綅淇℃伅
+                            var endLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.EndLocat && w.IsDel == "0");
+                            if (endLocatInfo2 == null)
+                            {
+                                resultModel.Message = "鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�!";
+                                return resultModel;
+                            }
+                            endLocatInfo2.Status = "1";//鏈夌墿鍝�
+                            //淇敼鐩爣鍌ㄤ綅鐘舵��
+                            Db.Updateable(endLocatInfo2).ExecuteCommand();
 
+                            sd3.WareHouseNo = endLocatInfo2.WareHouseNo;//鎵�灞炰粨搴�
+                            sd3.RoadwayNo = endLocatInfo2.RoadwayNo;//鎵�灞炲贩閬�
+                            sd3.AreaNo = endLocatInfo2.AreaNo;//鎵�灞炲尯鍩�
+                            sd3.LocatNo = endLocatInfo2.LocatNo;//鍌ㄤ綅鍦板潃
+                            if (endLocatInfo2.AreaNo == "A01")//娲佸噣鍖�
+                            {
+                                sd3.PalletStatus = "0";
+                            }
+                            else if (endLocatInfo2.AreaNo == "A02")//棰勬贩鍖�
+                            {
+                                sd3.PalletStatus = "1";
+                            }
+                            else if (endLocatInfo2.AreaNo == "A03")//鍗婃垚鍝佸尯
+                            {
+                                sd3.PalletStatus = "2";
+                            }
+                            else if (endLocatInfo2.AreaNo == "A04")//鑴忔《鍖�
+                            {
+                                sd3.PalletStatus = "3";
+                            }
+                        }
+                        if (taskInfo.Type == "1")//鍑哄簱浠诲姟
+                        {
+                            //璧峰鍌ㄤ綅淇℃伅
+                            var startLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.StartLocat && w.IsDel == "0");
+                            if (startLocatInfo2 == null)
+                            {
+                                resultModel.Message = "璧峰鍌ㄤ綅淇℃伅涓嶅瓨鍦�!";
+                                return resultModel;
+                            }
+                            startLocatInfo2.Status = "0";//绌哄偍浣�
+                            //淇敼璧峰鍌ㄤ綅鐘舵��
+                            Db.Updateable(startLocatInfo2).ExecuteCommand();
+
+                            sd3.WareHouseNo = "";//鎵�灞炰粨搴�
+                            sd3.RoadwayNo = "";//鎵�灞炲贩閬�
+                            sd3.AreaNo = "";//鎵�灞炲尯鍩�
+                            sd3.LocatNo = "";//鍌ㄤ綅鍦板潃
+                        }
                         //淇敼搴撳瓨鏄庣粏
                         Db.Updateable(sd3).ExecuteCommand();
 
-                        startLocatInfo2.Status = "0";//绌哄偍浣�
-                        //淇敼璧峰鍌ㄤ綅鐘舵��
-                        Db.Updateable(startLocatInfo2).ExecuteCommand();
-
-                        endLocatInfo2.Status = "1";//鏈夌墿鍝�
-                        //淇敼鐩爣鍌ㄤ綅鐘舵��
-                        Db.Updateable(endLocatInfo2).ExecuteCommand();
                         break;    
                     #endregion
                 }

--
Gitblit v1.8.0