From da7196f0acb1349fe0bc6b3b652093b495416adc Mon Sep 17 00:00:00 2001 From: zxx <Zxx@HanInfo> Date: 星期五, 11 七月 2025 17:42:42 +0800 Subject: [PATCH] 1 --- HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs | 40 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 38 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..5ce86b3 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,36 @@ 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_CODE = orderName, + 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