From 6b43055b5aa32dbea0dacee5a0235b0d5a76c293 Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期五, 30 五月 2025 17:19:35 +0800 Subject: [PATCH] 优化后台报错信息,空箱入库容器号增加检查逻辑 --- core/Monitor.cs | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/Monitor.cs b/core/Monitor.cs index 9c58898..c1bb5de 100644 --- a/core/Monitor.cs +++ b/core/Monitor.cs @@ -67,14 +67,14 @@ }; // BEG 姣忔杞閮芥鏌ュ搴斿鍣ㄦ槸鍚﹀凡鐧昏锛岀櫥璁板垯鏇存柊锛屾湭鐧昏鍒欐彃鍏�- var cntrItemRel = db.Queryable<TN_Container_Item>() + var cntrItemRel = db.Queryable<TN_Container_ItemType>() .Where(i => i.S_CNTR_CODE == cntrCode).First(); var insertTable = cntrItemRel == null; if (insertTable) { // 鏆傚畾鍦ㄦ弧鎵樹笅绾垮叆搴撶殑鏃跺�锛岀櫥璁版墭鐩樺鍣�鐗╂枡鍙峰叧绯伙紙鍚庨潰鍙兘浼氭敼鎴愮郴缁熺淮鎶わ級 - cntrItemRel = new TN_Container_Item { + cntrItemRel = new TN_Container_ItemType { S_ITEM_CODE = itemCode, S_CNTR_CODE = cntrCode, }; @@ -124,8 +124,8 @@ var cntId = locCntrRel.S_CNTR_CODE; var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName); - LocationHelper.LockLoc(ref startLoc, 2); // 璧风偣鍑哄簱閿�- LocationHelper.LockLoc(ref endLoc, 1); // 缁堢偣鍏ュ簱閿�+ LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+ LocationHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿� using (var tran = db.Ado.UseTran()) { if (db.Insertable<TN_CG_Detail>(cgDetail).ExecuteCommand() <= 0) { @@ -137,7 +137,7 @@ // BEG 鎻掑叆鎴栨洿鏂板鍣ㄤ笌鐗╂枡绫诲瀷鐨勭粦瀹氳〃 if (insertTable) { - if (db.Insertable<TN_Container_Item>(cntrItemRel).ExecuteCommand() <= 0) { + if (db.Insertable<TN_Container_ItemType>(cntrItemRel).ExecuteCommand() <= 0) { tran.RollbackTran(); info = $"鐧昏瀹瑰櫒鐗╂枡绫诲瀷缁戝畾琛ㄥけ璐ワ細鐗╂枡缂栫爜{cntrItemRel.S_ITEM_CODE}锛屽鍣ㄧ紪鐮亄cntrItemRel.S_CNTR_CODE}"; LogHelper.Info(info); @@ -145,7 +145,7 @@ } } else { - if (db.Updateable<TN_Container_Item>(cntrItemRel).ExecuteCommand() <= 0) { + if (db.Updateable<TN_Container_ItemType>(cntrItemRel).ExecuteCommand() <= 0) { tran.RollbackTran(); info = $"鐧昏瀹瑰櫒鐗╂枡绫诲瀷缁戝畾琛ㄥけ璐ワ細鐗╂枡缂栫爜{cntrItemRel.S_ITEM_CODE}锛屽鍣ㄧ紪鐮亄cntrItemRel.S_CNTR_CODE}"; LogHelper.Info(info); @@ -288,14 +288,14 @@ LogHelper.Info($"杞--{taskName}锛氭病鏈夋壘鍒板悎閫傜殑缁堢偣璐т綅锛佸崟鍙�{detail.S_OO_NO}'瑕佹眰缁堢偣搴撳尯涓�{detail.S_END_AREA}'"); continue; } - + detail.N_B_STATE = 2; var cntId = detail.S_CNTR_CODE; var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName); - LocationHelper.LockLoc(ref startLoc, 2); // 璧风偣鍑哄簱閿�- LocationHelper.LockLoc(ref endLoc, 1); // 缁堢偣鍏ュ簱閿�+ LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+ LocationHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿� using (var tran = db.Ado.UseTran()) { if (db.Updateable<TN_Outbound_Detail>(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) { @@ -451,8 +451,8 @@ var cntId = detail.S_CNTR_CODE; var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName); - LocationHelper.LockLoc(ref startLoc, 2); // 璧风偣鍑哄簱閿�- LocationHelper.LockLoc(ref endLoc, 1); // 缁堢偣鍏ュ簱閿�+ LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+ LocationHelper.LockEndLoc(ref endLoc); // 缁堢偣鍏ュ簱閿� using (var tran = db.Ado.UseTran()) { if (db.Updateable<TN_SpotCheck_Detail>(detail).UpdateColumns(it => it.N_B_STATE).ExecuteCommand() <= 0) { @@ -575,8 +575,8 @@ var cntId = detail.S_CNTR_CODE; var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskName); - LocationHelper.LockLoc(ref startLoc, 2); // 璧风偣鍑哄簱閿�- LocationHelper.LockLoc(ref endLoc, 1); // 缁堢偣鍏ュ簱閿�+ LocationHelper.LockStartLoc(ref startLoc); // 璧风偣鍑哄簱閿�+ LocationHelper.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