From 2f8733caf7ae5c94483fa332e0d3af69b61a0eb0 Mon Sep 17 00:00:00 2001 From: lss <2538410689@qq.com> Date: 星期四, 03 七月 2025 23:09:25 +0800 Subject: [PATCH] 111 --- HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/DeviceProcess.cs | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/DeviceProcess.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/DeviceProcess.cs index 144adb1..ead1a1e 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/DeviceProcess.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/DeviceProcess.cs @@ -48,7 +48,7 @@ /// <summary> /// 鍙犵洏鏈虹┖鎵樿繑鍥� /// </summary> - internal static void Traystacker(string loc, int qty, int type) + internal static void Traystacker(string loc, int qty, int type,string cntrcode="") { try { @@ -91,8 +91,9 @@ /// </summary> internal static void Traffic() { + Console.WriteLine("寮�鍘熸潗鏂欏彔鐩樹綅缃垽鏂�); var db = new SqlHelper<object>().GetInstance(); - List<string> locs = new List<string>() { "LCDP-001" }; + List<string> locs = new List<string>() { "LCDP-001", "BADPW-01" }; var location = db.Queryable<Location>().Where(a => locs.Contains(a.S_CODE)).ToList(); if (location.Count > 0) { @@ -126,9 +127,9 @@ internal static void KjTraffic() { - + Console.WriteLine("寮�浜曟澗agv鍙犵洏鍥炲簱浣嶇疆鍒ゆ柇"); var db = new SqlHelper<object>().GetInstance(); - List<string> locs = new List<string>() { "PMDDW-001" }; + List<string> locs = new List<string>() { "AGV12DP-001", "AGV01DP-001", "AGV05DP-001" }; var location = db.Queryable<Location>().Where(a => locs.Contains(a.S_CODE)).ToList(); if (location.Count > 0) { @@ -144,12 +145,19 @@ // var cntrcodes = cntr.Select(a => a.S_CNTR_CODE).ToArray(); // cntrcode = string.Join(",", cntrcodes); //} - + string cntrcode = ""; + var cntr = db.Queryable<LocCntrRel>().Where(a => a.S_LOC_CODE.Trim() == item.S_CODE).ToList(); + if (cntr.Count > 0) + { + cntrcode = cntr.OrderBy(a => a.T_CREATE).First().S_CNTR_CODE; + // cntrcode = string.Join(",", cntrcodes); + } + LogHelper.Info($"璐т綅{item}鍙犳弧6涓紑濮嬪洖璋冩帴鍙�); //鍒涘缓杩囨湭瀹屾垚鐨勪换鍔′笉鍙戣捣璇锋眰 var mst = WCSHelper.GetTaskByStartloc(item.S_CODE); if (mst == null) { - Traystacker(item.S_CODE, item.N_CURRENT_NUM, 1); + Traystacker(item.S_CODE, item.N_CURRENT_NUM, 2, cntrcode); } } } -- Gitblit v1.9.1