From 1b6bf29ff7daa1987de65940af52f452cabd6881 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期二, 15 七月 2025 17:27:50 +0800
Subject: [PATCH] 优化AGV任务部分日志、货位绑定内部方法

---
 core/Monitor.cs |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/core/Monitor.cs b/core/Monitor.cs
index 0a93748..93892f7 100644
--- a/core/Monitor.cs
+++ b/core/Monitor.cs
@@ -163,11 +163,15 @@
 
                     var cntId = detail.S_CNTR_CODE;
 
-                    var erp_no = string.IsNullOrEmpty(detail.S_BS_NO) ? "" : detail.S_BS_NO;
-                    var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName, detail.S_OO_NO, erp_no);
+                    var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName);
+                    task.S_OP_CODE = detail.S_OO_NO;
+                    if (string.IsNullOrEmpty(detail.S_BS_NO)) {
+                        task.S_BS_NO = detail.S_BS_NO;
+                        task.S_BS_TYPE = "ERP";
+                    }
 
-                    LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�-                    LocationHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿�+                    WCSHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+                    WCSHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿� 
                     using (var tran = db.Ado.UseTran()) {
                         if (db.Updateable<TN_Outbound_Detail>(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) {
@@ -302,10 +306,11 @@
                     detail.N_B_STATE = 2;
 
                     var cntId = detail.S_CNTR_CODE;
-                    var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName, detail.S_OO_NO);
+                    var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName);
+                    task.S_OP_CODE = detail.S_OO_NO;
 
-                    LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�-                    LocationHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿�+                    WCSHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+                    WCSHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿� 
                     using (var tran = db.Ado.UseTran()) {
                         if (db.Updateable<TN_SpotCheck_Detail>(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) {
@@ -432,10 +437,11 @@
                     detail.N_B_STATE = 2;
 
                     var cntId = detail.S_CNTR_CODE;
-                    var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName, detail.S_OO_NO);
+                    var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName);
+                    task.S_OP_CODE = detail.S_OO_NO;
 
-                    LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�-                    LocationHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿�+                    WCSHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+                    WCSHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿� 
                     using (var tran = db.Ado.UseTran()) {
                         if (db.Updateable<TN_RelocationList_Detail>(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) {

--
Gitblit v1.9.1