| | |
| | | if (staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() < 9990) { |
| | | wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo()); |
| | | if (null == wrkMast) { |
| | | News.error("{}任务号错误,暂无拣料任务!", staProtocol.getWorkNo()); |
| | | continue; |
| | | } |
| | | } else { |
| | |
| | | } |
| | | |
| | | // 置顶任务 |
| | | wrkMast.setIoPri((double) 9999); |
| | | if (wrkMast.getIoPri()<8000){ |
| | | wrkMast.setIoPri(wrkMast.getIoPri()+9000d); |
| | | } |
| | | wrkMastMapper.updateById(wrkMast); |
| | | |
| | | // 目标库位 ===>> 最外层库位 |
| | |
| | | } |
| | | |
| | | // 置顶任务 |
| | | wrkMast.setIoPri((double) 9998); |
| | | if (wrkMast.getIoPri()<8000){ |
| | | wrkMast.setIoPri(wrkMast.getIoPri()+8999d); |
| | | } |
| | | wrkMastMapper.updateById(wrkMast); |
| | | |
| | | // 最外层库位,直接堆垛机出库 |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, 1); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (null == wrkCharge) { |
| | | if (steProtocol.getChargeStatus()==(short)0 && steProtocol.isBrushConnect()){ |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(1); // 穿梭车编号 |
| | | steCommand.setTaskNo(10060); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.CLOSE_CHARGE); // 任务模式: 断开充电 |
| | | if (!MessageQueue.offer(SlaveType.Ste, 1, new Task(2, steCommand))) { |
| | | News.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", wrkCharge.getSteNo(), JSON.toJSON(steCommand)); |
| | | try{ |
| | | if (steProtocol.getChargeStatus()==(short)0 && steProtocol.isBrushConnect()){ |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(1); // 穿梭车编号 |
| | | steCommand.setTaskNo(10060); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.CLOSE_CHARGE); // 任务模式: 断开充电 |
| | | if (!MessageQueue.offer(SlaveType.Ste, 1, new Task(2, steCommand))) { |
| | | News.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", wrkCharge.getSteNo(), JSON.toJSON(steCommand)); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | return; |
| | | } |
| | | return; |
| | | } |