From 4e2242741688e1da1399166b1ada9874f472b819 Mon Sep 17 00:00:00 2001 From: pulg <plg@Haninfo> Date: 星期三, 11 六月 2025 17:54:59 +0800 Subject: [PATCH] 1 --- HH.WCS.QingXiNongfu/wms/TaskHelper.cs | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/HH.WCS.QingXiNongfu/wms/TaskHelper.cs b/HH.WCS.QingXiNongfu/wms/TaskHelper.cs index 39e81ec..889efdc 100644 --- a/HH.WCS.QingXiNongfu/wms/TaskHelper.cs +++ b/HH.WCS.QingXiNongfu/wms/TaskHelper.cs @@ -1,4 +1,5 @@ -锘縰sing HH.WCS.QingXigongchang.util; +锘縰sing HH.WCS.QingXigongchang.process; +using HH.WCS.QingXigongchang.util; using Newtonsoft.Json; using SqlSugar; using System; @@ -103,10 +104,13 @@ LogHelper.Info($"CreateTransport- CreateTask Error" + $"璧风偣鎴栫粓鐐硅揣浣嶆暟鎹畁ull"); return false; } - if (fromLoc.S_LOCK_STATE.Trim() != "鏃� || endLoc.S_LOCK_STATE.Trim() != "鏃�) + if (fromLoc.S_AREA_CODE != "YWLWJJB") { - LogHelper.Info($"CreateTransport- CreateTask Error" + $"璧风偣 {fromLoc.S_LOCK_STATE}鎴栫粓鐐箋endLoc.S_LOCK_STATE}鐘舵�涓嶄负 鏃�"); - return false; + if (fromLoc.S_LOCK_STATE.Trim() != "鏃� || endLoc.S_LOCK_STATE.Trim() != "鏃�) + { + LogHelper.Info($"CreateTransport- CreateTask Error" + $"璧风偣 {fromLoc.S_LOCK_STATE}鎴栫粓鐐箋endLoc.S_LOCK_STATE}鐘舵�涓嶄负 鏃�"); + return false; + } } } WMSTask wmsTask = new WMSTask() @@ -217,6 +221,10 @@ task.T_END_TIME = DateTime.Now; db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE, it.T_END_TIME }).ExecuteCommand(); } + if (task.S_END_LAREA == "YWLWJJB") + { + var b = TaskProcess.CreateTransport(task.S_SRC_NO, task.S_END_LOC, task.S_NOTE, "鍘熺墿鏂欐惉杩�绾哥", task.S_CNTRS.Split(',').ToList(), task.N_START_LAYER, 1, task.N_CNTR_COUNT, task.N_PRIORITY); + } } internal static void Fail(WMSTask task) { @@ -264,10 +272,12 @@ LogHelper.Info(wmsTask.S_START_LOC + "LockLoc:閿佺粨鏋� + res); model = db.Queryable<Location>().Where(a => a.S_LOC_CODE == wmsTask.S_END_LOC).First(); - - model.S_LOCK_STATE = "鍏ュ簱閿�; - res = db.Updateable(model).UpdateColumns(it => new { it.S_LOCK_STATE }).ExecuteCommand() > 0; - LogHelper.Info(wmsTask.S_END_LOC + "LockLoc:閿佺粨鏋� + res); + if (wmsTask.S_START_LAREA != "YWLWJJB") + { + model.S_LOCK_STATE = "鍏ュ簱閿�; + res = db.Updateable(model).UpdateColumns(it => new { it.S_LOCK_STATE }).ExecuteCommand() > 0; + LogHelper.Info(wmsTask.S_END_LOC + "LockLoc:閿佺粨鏋� + res); + } } db.Insertable(wmsTask).ExecuteCommand(); db.Ado.CommitTran(); -- Gitblit v1.9.1