1
xiazhengtongxue
2026-03-27 5d55a31d8ce95e511ffb408f38ed06e81742b67e
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs
@@ -1,9 +1,11 @@
using Autofac.Core;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Org.BouncyCastle.Asn1.Ocsp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_DTO.Agv;
@@ -12,9 +14,8 @@
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.Agv;
using System.Reflection.Metadata;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_TaskInfoService
{
@@ -30,10 +31,12 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                string? apiAddress = _apiInfoRepository.QueryFirst(x => x.ApiCode == SendTask.ToString())?.ApiAddress;
                if (string.IsNullOrEmpty(apiAddress)) throw new Exception($"未找到发送AGV任务接口,请检查接口配置");
                string request = JsonConvert.SerializeObject(taskModel, settings);
                string response = HttpHelper.Post(apiAddress, request);
                WriteLog.Write_Log("AGV入库任务下发", "出库任务下发接口", "请求任务", $"请求:{request},回传:{response}");
                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>() ?? throw new Exception("AGV任务发送未返回结果");
                if (agvContent.Success)
                {
@@ -55,6 +58,7 @@
        /// </summary>
        public void AgvSearchStatus1(Dt_ErrorInfo e2)
        {
            WriteLog.Write_Log("AGV查询调用及WMS故障上报", "AGV查询调用及WMS故障接口", "请求", $"请求:{e2.ToJson()}");
            if (e2 != null)
            {
                // æŸ¥è¯¢æ˜¯å¦æœ‰é”™è¯¯æ²¡æœ‰å°±æ·»åŠ ï¼Œæœ‰å°±å–æ¶ˆ