From 7267e82ccfbea0fa03e8bc809a2d5ac6f7da84ac Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期五, 20 六月 2025 15:33:36 +0800 Subject: [PATCH] 优化国自AGV和ERP下发的报文处理逻辑 --- dispatch/GZRobot.cs | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dispatch/GZRobot.cs b/dispatch/GZRobot.cs index 465007f..0604374 100644 --- a/dispatch/GZRobot.cs +++ b/dispatch/GZRobot.cs @@ -7,6 +7,7 @@ using HH.WCS.Mobox3.AnGang.models; using Newtonsoft.Json; using static HH.WCS.Mobox3.AnGang.api.ApiModel; +using static System.Net.WebRequestMethods; namespace HH.WCS.Mobox3.AnGang.dispatch { /// <summary> @@ -41,7 +42,14 @@ if (response != "") { try { var dataResult = JsonConvert.DeserializeObject<gzResult<OrderInfoResult>>(response); - if (dataResult.code == 0) { + // 鍘熶唬鐮侀儴鍒�+ //if (dataResult.code == 0) { + // orderId = dataResult.data[0].in_order_id; + //} + // 灏婇噸鏂囨。鐨勭増鏈�+ // 杩斿洖鍙傛暟涓紝code鐩墠涓嶅啀浣跨敤锛屽彲閫氳繃msg瀛楁鍒ゆ柇鏄惁鎴愬姛锛屽鏋渕sg涓衡�success鈥濆垯琛ㄧず鎴愬姛锛屽惁鍒欎负鎶ラ敊淇℃伅鎴栦笉瀛樺湪銆俬ttp code涓�22鏃跺�鐨勬姤閿欎负绯荤粺鎶ラ敊锛屽叾涓殑msg鏃犳硶鍏ㄩ儴鑾峰彇銆�+ // SELFNOTE: 鐩存帴璋冪敤HttpHelper.Post鏂规硶锛屾棤娉曡幏鍙杊eader锛屾殏鏃朵笉鑰冭檻 + if (dataResult.msg == "success") { orderId = dataResult.data[0].in_order_id; } } @@ -240,7 +248,7 @@ return list; } - // DOC 澶囩敤 + // DOC 6. 浜や簰琛ㄦ煡璇紙鏇存柊缁堢偣璐т綅锛� public static bool UpdateInteractInfo(UpdateInteractInfo interactInfo) { string msg = ""; var result = false; @@ -257,6 +265,7 @@ } return result; } + // DOC 5. 绉伴噸淇℃伅鏌ヨ public static List<CustomData> CustomBuf() { @@ -420,6 +429,7 @@ public class UpdateInteractInfo { public int interaction_info_id { get; set; } + public string type_name { get; set; } = "GET_DST"; public string info_status { get; set; } public string return_value { get; set; } } -- Gitblit v1.9.1