From d66d362ee6d76f02331e56df1fdec1c2114c9f3e Mon Sep 17 00:00:00 2001 From: zxx <Zxx@HanInfo> Date: 星期三, 16 七月 2025 17:31:41 +0800 Subject: [PATCH] 1 --- HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 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 76d0997..e9c99ed 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.XiaoMi/wms/WCSHelper.cs @@ -58,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(); @@ -119,12 +124,18 @@ 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); + //鍥犱负鏈夌偣鍒版湭鐭ョ殑鎯呭喌 + string endLocAreaStr = null; + if (to!=null && to != "") + { + endLocAreaStr = LocationHelper.GetLocation(to).S_AREA_CODE; + } WCSTask TN_Task = new WCSTask() { - S_CODE = GenerateTaskNo(), + //S_CODE = GenerateTaskNo(), + S_CODE = orderName, S_START_AREA = fromLoc.S_AREA_CODE, - S_END_AREA = endLoc.S_AREA_CODE, + S_END_AREA = endLocAreaStr, S_START_LOC = from, S_END_LOC = to, S_TYPE = taskType, @@ -134,8 +145,8 @@ N_B_STATE = 0, S_B_STATE = WCSTask.GetStateStr(0), S_CNTR_CODE = cntrInfo, - //瀛樺皬绫充换鍔″彿 - S_WORKSHOP_NO = orderName + ////瀛樺皬绫充换鍔″彿 + //S_WORKSHOP_NO = orderName //N_START_LAYER = startLayer, //N_END_LAYER = endLayer, //N_CNTR_COUNT = cntrCount -- Gitblit v1.9.1