kazelee
2025-07-08 9f18954857e9c4c691fc2c8e83d7728abdc18f74
dispatch/GZRobot.cs
@@ -1,13 +1,17 @@
using System;
using System.Collections.Generic;
using System.IdentityModel.Protocols.WSTrust;
using System.Security.Policy;
using System.Threading.Tasks;
using HH.WCS.Mobox3.AnGang.util;
using HH.WCS.Mobox3.AnGang.core;
using HH.WCS.Mobox3.AnGang.models;
using HH.WCS.Mobox3.AnGang.util;
using Newtonsoft.Json;
using static HH.WCS.Mobox3.AnGang.api.ApiModel;
using static System.Net.WebRequestMethods;
using static HH.WCS.Mobox3.AnGang.api.ApiModel;
namespace HH.WCS.Mobox3.AnGang.dispatch {
    /// <summary>
@@ -261,7 +265,8 @@
            }
            else {
                msg = "[guozi-UpdateInteractInfo]更新交互信息失败";
                Console.WriteLine(msg);
                //Console.WriteLine(msg);
                LogHelper.Info(msg);
            }
            return result;
        }
@@ -270,13 +275,18 @@
        // DOC 5.   称重信息查询
        public static List<CustomData> CustomBuf() {
            var res = new List<CustomData>();
            string msg = "";
            var result = apiHelper.Get(baseUrl + $"/api/engine/agvs/custom-buf/");
            //var result = apiHelper.Get(baseUrl + $"/api/engine/agvs/custom-buf/", "application/json");
            LogHelper.Info($"正在请求GET: \"/api/engine/agvs/custom-buf/\"", "API");
            var result = apiHelper.GetNew(baseUrl + $"api/engine/agvs/custom-buf/");
            if (!string.IsNullOrEmpty(result)) {
                Console.WriteLine(result);
                
                try {
                    LogHelper.Info($"称重信息:" + result);
                    var data = JsonConvert.DeserializeObject<gzResult<CustomData>>(result);
                    if (data.data != null) {
                        res = data.data;
                    }