From 20a792b07666f14494e29e847f1ee5a9979b7567 Mon Sep 17 00:00:00 2001
From: DESKTOP-9BNTV8O <DESKTOP-9BNTV8O@163.com>
Date: 星期三, 25 十二月 2024 17:00:47 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/BllTransServer/RcsServer.cs |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Wms/WMS.BLL/BllTransServer/RcsServer.cs b/Wms/WMS.BLL/BllTransServer/RcsServer.cs
index da97210..6913032 100644
--- a/Wms/WMS.BLL/BllTransServer/RcsServer.cs
+++ b/Wms/WMS.BLL/BllTransServer/RcsServer.cs
@@ -71,7 +71,7 @@
                     case "0"://鎺ユ枡璁惧鍙噣妗�
                         {
                             //鍙《鐩爣鍌ㄤ綅鍦板潃淇℃伅
-                            endLoction = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.AreaNo == deviceInfo.AreaNo);
+                            endLoction = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.AreaNo == deviceInfo.AreaNo && w.Column == 1);
                             if (endLoction == null)
                             {
                                 throw new Exception("鍙《璁惧鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�");
@@ -95,7 +95,7 @@
                     case "1"://娣锋枡璁惧鍙枡妗讹紙娣锋枡锛�
                         {
                             //鍙《鐩爣鍌ㄤ綅鍦板潃淇℃伅
-                            endLoction = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.AreaNo == deviceInfo.AreaNo);
+                            endLoction = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.AreaNo == deviceInfo.AreaNo && w.Column == 1);
                             if (endLoction == null)
                             {
                                 throw new Exception("鍙《璁惧鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�");
@@ -126,7 +126,7 @@
                             if (houseNo == "M04")//闄や簡鍠峰共杞﹂棿涓嬫枡鍙i兘鏄�2涓偍浣嶏紙鎶曟枡鍌ㄤ綅銆佹姇瀹屾枡鍌ㄤ綅锛�
                             {
                                 //鍙《鐩爣鍌ㄤ綅鍦板潃淇℃伅
-                                endLoction = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.AreaNo == deviceInfo.AreaNo);
+                                endLoction = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.AreaNo == deviceInfo.AreaNo && w.Column == 1);
                             }
                             else
                             {
@@ -249,7 +249,7 @@
                                     SendDate = DateTime.Now,  //鍙戦�佹椂闂�
                                                               //BackDate = DateTime.Now,  //杩斿洖鏃堕棿
                                     StartLocat = item.LocatNo,//璧峰浣嶇疆
-                                    EndLocat = model.Location,//鐩爣浣嶇疆
+                                    EndLocat = endLoction.LocatNo,//鐩爣浣嶇疆
                                     PalletNo = item.PalletNo,//鎵樼洏鐮�
                                     IsSend = 1,//鏄惁鍙啀娆′笅鍙�
                                     IsCancel = 1,//鏄惁鍙彇娑�
@@ -265,7 +265,7 @@
                                 {
                                     Taskno = taskNo,//浠诲姟鍙�
                                     Startport = item.LocatNo,
-                                    Endport = model.Location,
+                                    Endport = endLoction.LocatNo,
                                     Pallno = item.PalletNo,
                                     Crtype = "1",//鍙《
                                     WareHouseNo = houseNo
@@ -322,7 +322,7 @@
                     SendDate = DateTime.Now,  //鍙戦�佹椂闂�
                     //BackDate = DateTime.Now,  //杩斿洖鏃堕棿
                     StartLocat = pallet.LocatNo,//璧峰浣嶇疆
-                    EndLocat = model.Location,//鐩爣浣嶇疆
+                    EndLocat = endLoction.LocatNo,//鐩爣浣嶇疆
                     PalletNo = pallet.PalletNo,//鎵樼洏鐮�
                     IsSend = 1,//鏄惁鍙啀娆′笅鍙�
                     IsCancel = 1,//鏄惁鍙彇娑�
@@ -339,7 +339,7 @@
                 {
                     Taskno = taskNo,//浠诲姟鍙�
                     Startport = pallet.LocatNo,//璧峰浣嶇疆
-                    Endport = model.Location,//鐩爣浣嶇疆
+                    Endport = endLoction.LocatNo,//鐩爣浣嶇疆
                     Pallno = pallet.PalletNo,//妗跺彿
                     Crtype = "1",//鍙《
                     WareHouseNo = houseNo//杞﹂棿缂栫爜
@@ -399,7 +399,7 @@
                     throw new Exception($"璇ユ《鏈夋鍦ㄦ墽琛岀殑浠诲姟锛孭alletNo:{model.PalletNo}");
                 }
                 //閫氳繃璁惧鍙锋煡鎵惧埌鎵�灞炶澶囷紙鍖哄煙锛�
-                var deviceInfo = Db.Queryable<SysStorageArea>().First(w => w.IsDel == "0" && w.DeviceCode == model.Location);
+                var deviceInfo = Db.Queryable<SysStorageArea>().First(w => w.IsDel == "0" && w.DeviceCode.Contains(model.Location));
                 if (deviceInfo == null)
                 {
                     throw new Exception("璁惧淇℃伅涓嶅瓨鍦�");
@@ -549,7 +549,7 @@
                     //IsSuccess = 1, //鏄惁涓嬪彂鎴愬姛 0澶辫触 1鎴愬姛
                     SendDate = DateTime.Now,  //鍙戦�佹椂闂�
                     //BackDate = DateTime.Now,  //杩斿洖鏃堕棿
-                    StartLocat = model.Location,//璧峰浣嶇疆
+                    StartLocat = deviceLocatInfo.LocatNo,//璧峰浣嶇疆
                     EndLocat = loction.LocatNo,//鐩爣浣嶇疆
                     PalletNo = model.PalletNo,//妗跺彿
                     IsSend = 1,//鏄惁鍙啀娆′笅鍙�
@@ -564,7 +564,7 @@
                 var task = new TaskDetial
                 {
                     Taskno = taskNo,//浠诲姟鍙�
-                    Startport = model.Location,
+                    Startport = deviceLocatInfo.LocatNo,
                     Endport = loction.LocatNo,
                     Pallno = model.PalletNo,
                     Crtype = "0",//鍏ュ簱

--
Gitblit v1.8.0