dengjunjie
2026-02-26 f1d8d7b04a81619cb29457fa88538bbaf37d8c20
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs
@@ -15,8 +15,9 @@
{
    public partial class TaskService
    {
        #region å‡¯ä¹å£«ä»»åŠ¡åˆ›å»º
        /// <summary>
        /// åˆ›å»ºå…¥åº“任务
        /// åˆ›å»ºå‡¯ä¹å£«AGV入库任务
        /// </summary>
        /// <param name="taskDTO"></param>
        /// <returns></returns>
@@ -26,13 +27,12 @@
            {
                int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();
                //获取货位信息
                Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType);
                if (kLSLocationInfo == null) throw new Exception($"未找到终点库区【{taskDTO.toAreaCode}】可用空货位!");
                Dt_Task dt_Task = new Dt_Task()
                Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"未找到终点库区【{taskDTO.toAreaCode}】可用空货位!");
                Dt_Task dt_Task = new()
                {
                    TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    WMSTaskNum = taskDTO.taskCode,
                    WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    Grade = taskDTO.taskPriority,
                    PalletCode = taskDTO.containerCode,
                    Roadway = kLSLocationInfo.RoadwayNo,
@@ -57,7 +57,12 @@
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// åˆ›å»ºå‡¯ä¹å£«AGV出库任务
        /// </summary>
        /// <param name="taskDTO"></param>
        /// <param name="taskType"></param>
        /// <returns></returns>
        public WebResponseContent CreateKLSNewOutTask(TaskDTO taskDTO, int taskType)
        {
            try
@@ -69,7 +74,7 @@
                {
                    TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    WMSTaskNum = taskDTO.taskCode,
                    WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    Grade = taskDTO.taskPriority,
                    PalletCode = taskDTO.containerCode,
                    Roadway = kLSLocationInfo.RoadwayNo,
@@ -94,5 +99,21 @@
                throw new Exception(ex.Message);
            }
        }
        #endregion
        #region 5 è·¨æ¥¼å±‚运输任务创建
        public WebResponseContent CarryTask(TaskDTO taskDTO, int taskType)
        {
            return WebResponseContent.Instance.OK();
        }
        #endregion
        #region 6 è£å‰ªé€è´§
        public WebResponseContent CJCarryTaske(TaskDTO taskDTO, int taskType)
        {
            return WebResponseContent.Instance.OK();
        }
        #endregion
    }
}