From 3bdd686d50ae8c999924ac64101a5dbe4e271c71 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期五, 04 七月 2025 17:27:19 +0800
Subject: [PATCH] 优化日志信息,删除冗余的工具类代码

---
 core/Monitor.cs |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/core/Monitor.cs b/core/Monitor.cs
index dfadc6e..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) {
@@ -571,7 +577,7 @@
                 model.ph = cgDetail.S_BATCH_NO;
 
                 var jsonInfo = JsonConvert.SerializeObject(model);
-                var result = httpH.WebPost(Settings.ErpApiUrl + "CreateTaskReturn", jsonInfo);
+                var result = httpH.WebPost(Settings.ErpApiUrl + Settings.ErpRoute.CreateTaskReturn, jsonInfo);
 
                 LogHelper.InfoApi($"鍒涘缓浠诲姟瀹屾垚鍙嶉ERP鎺ュ彛锛岀粨鏋�{result}锛岃皟鐢ㄥ弬鏁帮細", model);
 

--
Gitblit v1.9.1