yanjinhui
2026-03-02 a4c0e9759befb4e8efa91e322370afe9d4673d4b
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
@@ -30,11 +31,14 @@
        /// <exception cref="NotImplementedException"></exception>
        public WebResponseContent UpdateTaskStatus(object TaskDTO, DeviceTypeEnum deviceTypeEnum)
        {
            WebResponseContent content = new WebResponseContent();
            GALAXISUpdateTaskStatus gALAXIS = new();
            try
            {
                if (deviceTypeEnum == DeviceTypeEnum.GALAXIS)
                {
                    GALAXISUpdateTaskStatus? gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
                    //GALAXISUpdateTaskStatus? gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
                    if (gALAXIS == null) throw new Exception("参数转换失败!");
                    var task = BaseDal.QueryFirst(x => x.WMSTaskNum == gALAXIS.taskId);
                    if (task == null) throw new Exception($"未找到任务,任务编号【{gALAXIS.taskId}】");
@@ -64,9 +68,13 @@
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
            finally
            {
                _trackloginfoService.AddTrackLog(gALAXIS, content, "下发凯乐士AGV任务", "", "");
            }
        }
        #endregion
        #region ä»»åŠ¡çŠ¶æ€è½¬æ¢
@@ -85,6 +93,7 @@
                        6 => TaskStatusEnum.TaskTypeError,
                        7 => TaskStatusEnum.ParameterError,
                        8 => TaskStatusEnum.RCSError,
                        10 => TaskStatusEnum.Takeing,
                        13 => TaskStatusEnum.Cancel,
                        _ => throw new ArgumentOutOfRangeException(
                            nameof(status),
@@ -107,7 +116,7 @@
            {
                throw new Exception(ex.Message);
            }
        }
        }
        #endregion
        #region ä»»åŠ¡èµ·ç‚¹å®Œæˆ
@@ -133,7 +142,7 @@
                Db.Ado.RollbackTran();
                throw new Exception(ex.Message);
            }
        }
        }
        #endregion
        #region ä»»åŠ¡å®Œæˆ
@@ -159,7 +168,7 @@
                Db.Ado.RollbackTran();
                throw new Exception(ex.Message);
            }
        }
        }
        #endregion
        #region æ›´æ–°è´§ä½çŠ¶æ€
@@ -211,7 +220,7 @@
            {
                throw new Exception(ex.Message);
            }
        }
        }
        #endregion
    }
}