From cdbf165488a87811159637946cf133d0caa12999 Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期三, 02 七月 2025 13:38:29 +0800 Subject: [PATCH] 调整调国自AGV接口数据处理逻辑 --- .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/5ccf4a7c-ee31-4f90-9aba-eb5f05866b98.vsidx | 0 dispatch/GZRobot.cs | 2 +- /dev/null | 0 process/TaskProcess.cs | 16 +++++++++------- core/WCSCore.cs | 7 +++++-- .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/67c4855d-af0b-4d46-837b-fbaab232d736.vsidx | 0 .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/040fc824-81e8-4390-903b-5e7d705a18ce.vsidx | 0 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/040fc824-81e8-4390-903b-5e7d705a18ce.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/040fc824-81e8-4390-903b-5e7d705a18ce.vsidx new file mode 100644 index 0000000..c8c3172 --- /dev/null +++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/040fc824-81e8-4390-903b-5e7d705a18ce.vsidx Binary files differ diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/0dac82e9-3813-4381-97c5-6d5e9aea9264.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/0dac82e9-3813-4381-97c5-6d5e9aea9264.vsidx deleted file mode 100644 index d7d2138..0000000 --- a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/0dac82e9-3813-4381-97c5-6d5e9aea9264.vsidx +++ /dev/null Binary files differ diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/5ccf4a7c-ee31-4f90-9aba-eb5f05866b98.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/5ccf4a7c-ee31-4f90-9aba-eb5f05866b98.vsidx new file mode 100644 index 0000000..410db45 --- /dev/null +++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/5ccf4a7c-ee31-4f90-9aba-eb5f05866b98.vsidx Binary files differ diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/f899d85d-f665-4743-b2a9-9b2ea8fc7674.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/67c4855d-af0b-4d46-837b-fbaab232d736.vsidx similarity index 94% rename from .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/f899d85d-f665-4743-b2a9-9b2ea8fc7674.vsidx rename to .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/67c4855d-af0b-4d46-837b-fbaab232d736.vsidx index f2a4816..bb3f97f 100644 --- a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/f899d85d-f665-4743-b2a9-9b2ea8fc7674.vsidx +++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/67c4855d-af0b-4d46-837b-fbaab232d736.vsidx Binary files differ diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/aba42493-3f71-43ce-88ef-e0cd43be7a13.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/aba42493-3f71-43ce-88ef-e0cd43be7a13.vsidx deleted file mode 100644 index 64ea0db..0000000 --- a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/aba42493-3f71-43ce-88ef-e0cd43be7a13.vsidx +++ /dev/null Binary files differ diff --git a/core/WCSCore.cs b/core/WCSCore.cs index 8cebf87..7464964 100644 --- a/core/WCSCore.cs +++ b/core/WCSCore.cs @@ -167,7 +167,9 @@ //cgDetail.F_QTY = 0; // 涓嶈缃负绌猴紝渚夸簬娴嬭瘯鏃堕鍏堣缃竴涓甯稿� } else { - var weight = float.Parse(data[0].parameter_varchar200_up); + var weight_str = data[0].parameter_varchar200_up.Split(';')[1].Split('-')[1]; + + var weight = float.Parse(weight_str); cgDetail.F_QTY = weight; tn_task.F_WEIGHT = weight; @@ -329,8 +331,9 @@ LogHelper.Info("鏇存柊鐗╂枡閲嶉噺澶辫触锛氭病鏈夋帴鍙楀埌鏉ヨ嚜鍥借嚜AGV鐨勯噸閲忎俊鎭�); return; } + var weight_str = data[0].parameter_varchar200_up.Split(';')[1].Split('-')[1]; - var weight = float.Parse(data[0].parameter_varchar200_up); + var weight = float.Parse(weight_str); cgDetail.F_QTY = weight; if (db.Updateable<TN_CG_Detail>(cgDetail).UpdateColumns(it => it.F_QTY).ExecuteCommand() <= 0) { diff --git a/dispatch/GZRobot.cs b/dispatch/GZRobot.cs index c4ee859..0bcb179 100644 --- a/dispatch/GZRobot.cs +++ b/dispatch/GZRobot.cs @@ -27,7 +27,7 @@ var result = apiHelper.Post(baseUrl + "api/engine/tasks/iostates/", JsonConvert.SerializeObject(data)); var dataResult = JsonConvert.DeserializeObject<gzResult<IOStatesInfoResult>>(result); } - + // DOC 1. 鍒涘缓璁㈠崟 WMS->RCS public static int CreateOrder(string taskNo, int priority, string param, string ts = "churuku", string created_user = "hanhe") { LogHelper.Info($"CreateOrder鍙傛暟淇℃伅:taskNo:{taskNo},priority:{priority},param:{param},ts:{ts}锛宑reated_user锛歿created_user}", "API"); diff --git a/process/TaskProcess.cs b/process/TaskProcess.cs index 390e9ea..fb46b5b 100644 --- a/process/TaskProcess.cs +++ b/process/TaskProcess.cs @@ -114,13 +114,15 @@ var startSite = LocationHelper.GetAgvSite(mst.S_START_LOC); var endSite = LocationHelper.GetAgvSite(mst.S_END_LOC); // 濡傛灉鎵句笉鍒颁細杩斿洖0锛屽氨鏄亣缁堢偣 - var code = -1; - if (taskType == TaskName.浜у搧鍏ュ簱) { - code = GZRobot.CreateOrder(mst.S_CODE, mst.N_PRIORITY, JsonConvert.SerializeObject(new { src = startSite, order_name = $"{mst.S_CODE}" }), "p2pdst", "pgapi"); - } - else { - code = GZRobot.CreateOrder(mst.S_CODE, mst.N_PRIORITY, JsonConvert.SerializeObject(new { src = startSite, dst = endSite }), "p2p", "pgapi"); - } + var code = GZRobot.CreateOrder(mst.S_CODE, mst.N_PRIORITY, JsonConvert.SerializeObject(new { src = startSite, order_name = $"tet" }), "p2pdst2", "pgapi"); + + //var code = -1; + //if (taskType == TaskName.浜у搧鍏ュ簱) { + // code = GZRobot.CreateOrder(mst.S_CODE, mst.N_PRIORITY, JsonConvert.SerializeObject(new { src = startSite, order_name = $"{mst.S_CODE}" }), "p2pdst", "pgapi"); + //} + //else { + // code = GZRobot.CreateOrder(mst.S_CODE, mst.N_PRIORITY, JsonConvert.SerializeObject(new { src = startSite, dst = endSite }), "p2p", "pgapi"); + //} // car_type 榛樿涓� // src_ort 璐ф灦鎺掑彿 -- Gitblit v1.9.1