| | |
| | | { |
| | | public partial class TaskService |
| | | { |
| | | #region å¯ä¹å£«ä»»å¡å建 |
| | | /// <summary> |
| | | /// å建å
¥åºä»»å¡ |
| | | /// å建å¯ä¹å£«AGVå
¥åºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="taskDTO"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | 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, |
| | |
| | | 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 |
| | |
| | | { |
| | | 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, |
| | |
| | | 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 |
| | | } |
| | | } |