yanjinhui
2026-03-02 8f0d94b96853b2b12bd1dd10c862277edb5f685a
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/KLSTaskExtend.cs
@@ -1,9 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO;
using WIDESEAWCS_Model.Models;
@@ -16,6 +18,7 @@
        #region ä¸‹å‘凯乐士AGV任务
        public void SendGALAXISTask(List<Dt_Task> tasks)
        {
            WebResponseContent content = new WebResponseContent(); // åˆ›å»ºå“åº”对象
            GALAXISTaskInfo gALAXISTaskInfo = new();
            try
            {
@@ -38,6 +41,7 @@
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(GALAXISTaskInfo)) ?? throw new Exception("未找到凯乐士AGV任务下发接口配置信息!请检查接口配置");
                string response = HttpHelper.Post(apiInfo.ApiAddress, gALAXISTaskInfo.Serialize());
                GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>();
                content.Data = agvContent;
                if (agvContent.success)
                {
                    if (agvContent.data.returnStatus != 0) throw new Exception(agvContent.data.returnInfo);
@@ -45,12 +49,19 @@
                    {
                        task.TaskState = (int)TaskStatusEnum.Execut;
                    });
                    content.OK();
                    _taskService.UpdateData(tasks);
                }
            }
            catch (Exception ex)
            {
                WriteError(nameof(TaskJob), ex.Message, ex);
                content.Error(ex.Message);
                //WriteError(nameof(TaskJob), ex.Message, ex);
            }
            finally
            {
                _trackloginfoService.AddTrackLog(gALAXISTaskInfo.Serialize(), content, "下发凯乐士AGV任务","","");
                //dt_trackloginfoService.Instance.AddTrackLog(outTaskInfo, content, "接收宇航WMS出库任务下发", "", $"{msg},变更结果:{content.Status}");
            }
        }
        #endregion