From 6caa7bd8d5503d9390f814616a99b158cd11e383 Mon Sep 17 00:00:00 2001 From: zxx <Zxx@HanInfo> Date: 星期一, 07 七月 2025 11:15:06 +0800 Subject: [PATCH] 1 --- HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs index 77d3e09..698f3d2 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs @@ -1,4 +1,5 @@ 锘縰sing HH.WCS.XiaoMi.util; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -57,8 +58,13 @@ var task = db.Queryable<WCSTask>().Where(a => a.S_CODE.Trim() == no).First(); return task; } + internal static WCSTask GetTaskName(string no) + { + var db = new SqlHelper<WCSTask>().GetInstance(); + var task = db.Queryable<WCSTask>().Where(a => a.S_WORKSHOP_NO.Trim() == no).First(); + return task; + } - internal static List<WCSTask> GetTaskBycntrcode(string no) { var db = new SqlHelper<WCSTask>().GetInstance(); @@ -105,7 +111,7 @@ N_SCHEDULE_TYPE = 1, N_B_STATE = 0, S_B_STATE = WCSTask.GetStateStr(0), - S_CNTR_CODE = cntrInfo, + S_CNTR_CODE = cntrInfo //N_START_LAYER = startLayer, //N_END_LAYER = endLayer, //N_CNTR_COUNT = cntrCount @@ -114,6 +120,35 @@ return CreateTask(TN_Task); } + //灏忕背澶т欢 + internal static bool CreateTaskDj(string no, string from, string to, string taskType, int pri, string cntrInfo,string orderName, int cntrCount = 1, int startLayer = 1, int endLayer = 1) + { + var fromLoc = LocationHelper.GetLocation(from); + var endLoc = LocationHelper.GetLocation(to); + WCSTask TN_Task = new WCSTask() + { + S_CODE = GenerateTaskNo(), + S_START_AREA = fromLoc.S_AREA_CODE, + S_END_AREA = endLoc.S_AREA_CODE, + S_START_LOC = from, + S_END_LOC = to, + S_TYPE = taskType, + S_OP_CODE = no, + N_PRIORITY = pri, + N_SCHEDULE_TYPE = 1, + N_B_STATE = 0, + S_B_STATE = WCSTask.GetStateStr(0), + S_CNTR_CODE = cntrInfo, + ////瀛樺皬绫充换鍔″彿 + //S_WORKSHOP_NO = orderName + //N_START_LAYER = startLayer, + //N_END_LAYER = endLayer, + //N_CNTR_COUNT = cntrCount + + }; + LogHelper.Info($"WCSTask鍙傛暟锛�====={JsonConvert.SerializeObject(TN_Task)}"); + return CreateTask(TN_Task); + } //灏忕背璐ф灦 internal static bool CreateTaskHj(string no, string from, string to, string taskType, int pri, string cntrInfo, int cntrCount = 1, int startLayer = 1, int endLayer = 1) { -- Gitblit v1.9.1