From 157abc191c34e57c1b958ae74fc3de6518ca8a30 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期五, 28 二月 2025 11:06:36 +0800
Subject: [PATCH] 修改客户需求

---
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 07842f2..68367c9 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -2249,7 +2249,7 @@
                 //鍑哄簱浠诲姟鍙锋洿鏀癸紝濡傛灉鐢盤LC鍑哄簱锛屽垯PLC鍥炰紶浠诲姟鍙蜂负锛氫换鍔″彿+瀹為檯鍑哄簱鍙�
                 var TtaskNo = taskNo;
                 var outLine = "";
-                if (userId == 0)
+                if (taskNo.Length == 18)
                 {
                     TtaskNo = taskNo.Substring(0, taskNo.Length - 3);
                     outLine = taskNo.Substring(taskNo.Length - 3, 3);
@@ -2481,7 +2481,8 @@
                         agvTask.CtnrTyp = "1";            //瀹瑰櫒绫诲瀷锛屽�间负1
                         if (type == "D02")
                         {
-                            agvTask.CtnrNum = "10";     //鍙犳墭浠诲姟闇�瑕佷笅鍙戠┖鎵樼洏鏁伴噺
+                            var palnoNum = Db.Queryable<BllPalletBind>().OrderByDescending(w=>w.Id).First(w => w.IsDel == "0" && w.PalletNo == task.PalletNo);
+                            agvTask.CtnrNum = palnoNum.Qty.ToString();     //鍙犳墭浠诲姟闇�瑕佷笅鍙戠┖鎵樼洏鏁伴噺
                         }
 
                         agvTaskList.Add(agvTask);
@@ -3931,7 +3932,7 @@
                     throw new Exception("鎷h揣鏁伴噺涓嶈兘澶т簬绠卞唴鍓╀綑寰呮嫞鏁伴噺");
                 }
                 decimal pickQty = 0;//鎷h揣鐨勬暟閲�
-
+                Db.BeginTran();
                 var comList = new List<BllCompleteDetail>();
                 foreach (var item in boxInfos)
                 {
@@ -4038,12 +4039,12 @@
                 }
                 //淇敼鍑哄簱鍗曚俊鎭�
                 Db.Updateable(notice).ExecuteCommand();
-                
+                Db.CommitTran();
                 return allot.LoadingAddre;
             }
             catch (Exception e)
             {
-
+                Db.RollbackTran();
                 throw new Exception(e.Message);
             }
         }

--
Gitblit v1.8.0