kazelee
2025-06-20 7267e82ccfbea0fa03e8bc809a2d5ac6f7da84ac
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字段判断是否成功,如果msg为”success”则表示成功,否则为报错信息或不存在。http code为422时候的报错为系统报错,其中的msg无法全部获取。
                    // SELFNOTE: 直接调用HttpHelper.Post方法,无法获取header,暂时不考虑
                    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; }
    }