From 74ca5a83f24c53c48ad7e6f5b7739649fb411546 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期四, 17 七月 2025 17:19:53 +0800
Subject: [PATCH] 优化部分日志和未使用代码

---
 core/WCSCore.cs |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/WCSCore.cs b/core/WCSCore.cs
index a683ebd..dd776f4 100644
--- a/core/WCSCore.cs
+++ b/core/WCSCore.cs
@@ -174,7 +174,7 @@
                 };
 
                 // 鏁版嵁搴撴搷浣�-                if (db.Insertable<TN_Record_Table>(record).ExecuteCommand() <= 0) {
+                if (db.Insertable(record).ExecuteCommand() <= 0) {
                     info = "鎻掑叆鍑哄叆搴撹褰曡〃澶辫触锛� + JsonConvert.SerializeObject(record);
                     LogHelper.Info(info);
                     return;
@@ -284,7 +284,7 @@
 
             using (var tran = db.Ado.UseTran()) {
                 detail.N_B_STATE = spotStateCode;
-                if (db.Updateable<TN_Outbound_Detail>(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) {
+                if (db.Updateable(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) {
                     tran.RollbackTran();
                     LogHelper.Info($"{taskName}锛欰GV鍙栬揣锛氫慨鏀规槑缁嗗崟鐘舵�涓恒�3浠诲姟鎵ц瀹屾垚銆戝け璐ワ紒");
                     return;
@@ -401,7 +401,7 @@
                 plan.SFJS = model.sfjs;
                 plan.SFSL = model.sfsl;
                 plan.HWZT = model.hwzt;
-                var success = db.Updateable<TN_Outbound_Plan>(plan).UpdateColumns(p => new { p.SFJS, p.SFSL, p.HWZT }).ExecuteCommand() > 0;
+                var success = db.Updateable(plan).UpdateColumns(p => new { p.SFJS, p.SFSL, p.HWZT }).ExecuteCommand() > 0;
                 info = "鏇存柊鍑哄簱璁″垝鍗曡褰曡〃" + (success ? "鎴愬姛" : "澶辫触");
                 LogHelper.Info(info);
             }
@@ -552,7 +552,7 @@
 
                 using (var tran = db.Ado.UseTran()) {
                     if (locCntrRelOld != null) {
-                        if (db.Deleteable<TN_Loc_Container>(locCntrRelOld).ExecuteCommand() <= 0 &&
+                        if (db.Deleteable(locCntrRelOld).ExecuteCommand() <= 0 &&
                             db.Updateable<TN_Location>().SetColumns(l => l.N_CURRENT_NUM == 0).Where(l => l.S_CODE == locCntrRelOld.S_LOC_CODE).ExecuteCommand() <= 0) {
                             tran.RollbackTran();
                             info = $"鍒犻櫎鏃ц揣浣嶅鍣ㄥ叧绯昏〃澶辫触锛氳揣浣嶇紪鐮亄locCntrRelOld.S_LOC_CODE}锛屽鍣ㄧ紪鐮亄locCntrRelOld.S_CNTR_CODE}";
@@ -561,14 +561,14 @@
                         }
                     }
 
-                    if (db.Insertable<TN_Loc_Container>(locCntrRel).ExecuteCommand() <= 0) {
+                    if (db.Insertable(locCntrRel).ExecuteCommand() <= 0) {
                         tran.RollbackTran();
                         info = $"鎻掑叆璐т綅瀹瑰櫒鍏崇郴琛ㄥけ璐ワ細璐т綅缂栫爜{locCntrRel.S_LOC_CODE}锛屽鍣ㄧ紪鐮亄locCntrRel.S_CNTR_CODE}";
                         LogHelper.Info(info);
                         return new Result<bool>(false, info);
                     }
 
-                    if (db.Updateable<TN_Location>(startLoc).UpdateColumns(it => new {
+                    if (db.Updateable(startLoc).UpdateColumns(it => new {
                         it.N_LOCK_STATE,
                         it.S_LOCK_STATE,
                         it.S_LOCK_OP,
@@ -581,7 +581,7 @@
                         return new Result<bool>(false, info);
                     }
 
-                    if (db.Updateable<TN_Location>(endLoc).UpdateColumns(it => new {
+                    if (db.Updateable(endLoc).UpdateColumns(it => new {
                         it.N_LOCK_STATE,
                         it.S_LOCK_STATE,
                         it.S_LOCK_OP,
@@ -593,7 +593,7 @@
                         return new Result<bool>(false, info);
                     }
 
-                    if (db.Insertable<TN_Task>(task).ExecuteCommand() <= 0) {
+                    if (db.Insertable(task).ExecuteCommand() <= 0) {
                         tran.RollbackTran();
                         info = $"鐢熸垚浠诲姟'{taskName}'澶辫触锛屼换鍔″彿={task.S_CODE}锛屽鍣ㄥ彿={cntId}锛岃捣鐐�{startLoc.S_CODE}锛岀粓鐐�{endLoc.S_CODE}";
                         LogHelper.Info(info);

--
Gitblit v1.9.1