xiazhengtongxue
2026-03-17 4f3b0a6727ecfa555892ebea64bd76e5a07cd6fb
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
using Org.BouncyCastle.Asn1.Ocsp;
using System.Text;
using System.Text.RegularExpressions;
using WIDESEA_DTO.Agv;
@@ -25,6 +26,7 @@
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_TaskInfoService;
using WIDESEAWCS_Tasks;
using WIDESEAWCS_Tasks.DBNames;
using static Dm.net.buffer.ByteArrayBuffer;
@@ -57,6 +59,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                WriteLog.Write_Log("AGV浠诲姟鏇存柊鎺ュ彛", "AGV浠诲姟鏇存柊鎺ュ彛", "鏇存柊浠诲姟", $"浠诲姟锛歿agvUpdateDTO.ToJson()}");
                if (agvUpdateDTO.Message != null && agvUpdateDTO.Message == "ROBOT_ERROR-haiUnknownError")
                {
                    var task1 = _taskRepository.QueryFirst(x => (agvUpdateDTO.MissionCode ?? "") == x.GroupId);
@@ -153,6 +156,7 @@
            AgvTaskReqContent content = new AgvTaskReqContent();
            try
            {
                WriteLog.Write_Log("AGV浠诲姟璇锋眰", "AGV浠诲姟璇锋眰鎺ュ彛", "浠诲姟", $"浠诲姟锛歿agvTaskRequestDTO.ToJson()}");
                //鑾峰彇浠诲姟
                Dt_Task? taskExist = _taskRepository.QueryFirst(x=>x.PalletCode==agvTaskRequestDTO.ContainerCode) ?? throw new Exception($"鏈壘鍒版枡绠眥agvTaskRequestDTO.ContainerCode}浠诲姟");
                //鑾峰彇绔欏彴
@@ -189,6 +193,7 @@
            AgvTaskReqContent content = new AgvTaskReqContent();
            try
            {
                WriteLog.Write_Log("AGV浣滀笟瀹屾垚", "AGV浣滀笟瀹屾垚鎺ュ彛", "浠诲姟", $"浠诲姟锛歿agvTaskRequestDTO.ToJson()}");
                //鑾峰彇绔欏彴
                Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == agvTaskRequestDTO.PositionId) ?? throw new Exception($"鏈壘鍒皗agvTaskRequestDTO.PositionId}绔欏彴浣嶇疆");
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode) ?? throw new Exception($"鏈壘鍒板搴旇澶噞stationManger.StationDeviceCode}");