| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.StackerCraneEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Common.WMSInfo; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IShuttleCar; |
| | |
| | | using WIDESEAWCS_TaskInfoService; |
| | | using WIDESEAWCS_Tasks.ConveyorLineJob; |
| | | using WIDESEAWCS_Tasks.StackerCraneJob; |
| | | using static WIDESEAWCS_Common.WMSInfo.RequestWMS; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public partial class CommonStackerCraneJob : IJob |
| | | public partial class CommonStackerCraneJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | |
| | | } |
| | | else |
| | | { |
| | | SendTask(commonStackerCrane, task);//ä¸åå åæºä»»å¡ |
| | | task.ShuttleCarCode = ShuttleCar?.ShuttleCarCode; |
| | | _taskService.UpdateData(task); |
| | | } |
| | | } |
| | | SendTask(commonStackerCrane, task);//ä¸åå åæºä»»å¡ |
| | | } |
| | | } |
| | | |
| | |
| | | if (stackerCraneTaskCommand != null) |
| | | { |
| | | bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand); |
| | | bool worktype = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, task.TaskType == (int)TaskOtherTypeEnum.RelocationCar ? 2 : 1); |
| | | bool worktype = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, task.TaskType == (int)TaskOtherTypeEnum.RelocationCar ? (short)WorkType.Car : (short)WorkType.Cargo); |
| | | if (sendFlag && worktype) |
| | | { |
| | | if (commonStackerCrane.SetValue(StackerCraneDBName.CommandSend, sendFlag)) |
| | |
| | | task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); |
| | | } |
| | | } |
| | | if (task != null && task.TargetAddress != "SC01") return task;//å
¥åºä»»å¡å¤ææ¯å¦å·²åé
è´§ä½ï¼WMSå¤æè´§ä½ç¶ææ¯å¦å
许æ¾è´§ |
| | | if (task != null && !string.IsNullOrEmpty(task.TargetAddress)) return task;//å
¥åºä»»å¡å¤ææ¯å¦å·²åé
è´§ä½ï¼WMSå¤æè´§ä½ç¶ææ¯å¦å
许æ¾è´§ |
| | | return task; |
| | | } |
| | | |
| | |
| | | { |
| | | StackerCraneTaskCommandW stackerCraneTaskCommand = new StackerCraneTaskCommandW(); |
| | | |
| | | stackerCraneTaskCommand.Barcode = task.PalletCode; |
| | | stackerCraneTaskCommand.TaskNum = task.TaskNum; |
| | | stackerCraneTaskCommand.WorkType = (short)WorkType.Cargo; |
| | | stackerCraneTaskCommand.TrayType = 0; |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//夿æ¯å¦æ¯å
¥åºä»»å¡ |
| | | { |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway); |