| | |
| | | return false; |
| | | } |
| | | |
| | | if (staProtocolRGV.rgvBoolean(2) && staProtocolRGVOther.rgvBoolean(1)){ |
| | | // if (staProtocolRGV.rgvBoolean(2) && staProtocolRGVOther.rgvBoolean(1)){ |
| | | if (staProtocolRGV.rgvBoolean(2)){ |
| | | if (staProtocolRGV.getNowRow() != staProtocolRGVOther.getNowRow()){ |
| | | //移走 == > 2 |
| | | if (!jarRgvMoveTake(wrkMastExecute,2)){ |
| | |
| | | public synchronized boolean jarSteTake(WrkMastExecute wrkMastExecute,Integer startLoad,Integer endLoad,SteTaskModeType steTaskModeType,boolean complete){ |
| | | try { |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setTaskNo(wrkMastExecute.getWrkNo().intValue()); |
| | | steCommand.setSteNo(wrkMastExecute.getSteId()); |
| | | steCommand.setStartLoad(startLoad); |
| | | steCommand.setEndLoad(endLoad); |
| | | steCommand.setTaskModeType(steTaskModeType); |
| | | steCommand.setComplete(complete); |
| | | if (!complete){ |
| | | steCommand.setTaskMode(steTaskModeType.id.shortValue()); |
| | | } |
| | | steCommand.setJarNo(wrkMastExecute.getJarId().shortValue()); |
| | | if (!MessageQueue.offer(SlaveType.Ste, steCommand.getSteNo(), new Task(2, steCommand))) { |
| | | log.error("穿梭车Ste命令下发失败,堆垛机号={},任务数据={},下发数据={},complete={}", steCommand.getSteNo(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steCommand),complete); |
| | |
| | | continue; |
| | | } |
| | | if (steProtocol.getMode()==(short)1 && steProtocol.taskNo!=0 && steProtocol.getChargeStatus()==0){ |
| | | if (steProtocol.statusType.equals(SteStatusType.WAITING)){ |
| | | |
| | | } |
| | | // if (steProtocol.statusType.equals(SteStatusType.WAITING)){ |
| | | // |
| | | // } |
| | | WrkMastExecute wrkMastExecute = wrkMastExecuteService.getWrkMastExecuteByWrkNo(steProtocol.getTaskNo().longValue()); |
| | | if (!Cools.isEmpty(wrkMastExecute)){ |
| | | switch (wrkMastExecute.getIoType()){ |
| | |
| | | if (wrkMastExecute.getWrkSts()==5){ |
| | | //1:RGV小车移动、2:RGV小车到位、3:rgv取货、4:rgv取货完成、5:Ste穿梭版入硫化罐、6:入罐完成、7:更新完成 //io_type = 5 |
| | | //ste任务完成 |
| | | if (wrkMastExecute.getWrkSts()==3){//==>4 |
| | | //1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版取货、4:取货完成等待下一步、5:Ste穿梭版放货至冷却池、6:放货完成、7:更新完成 //io_type = 6 |
| | | //ste任务等待完成 |
| | | if (steProtocol.statusType.equals(SteStatusType.WAITING)){ |
| | | //ste任务完成 |
| | | if (jarSteTake(wrkMastExecute,null,null,null,true)){ |
| | | wrkMastExecute.setWrkSts(6); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign); |
| | | } |
| | | return true; |
| | | if (steProtocol.statusType.equals(SteStatusType.WAITING)){ |
| | | //ste任务完成 |
| | | if (jarSteTake(wrkMastExecute,null,null,null,true)){ |
| | | wrkMastExecute.setWrkSts(6); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign); |
| | | } |
| | | return true; |
| | | } |
| | | log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign); |
| | | return true; |
| | | } |
| | | log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign); |
| | | return true; |
| | | } |
| | | return false; |