|  |  | 
 |  |  |                                 break; | 
 |  |  |                             } | 
 |  |  |                             int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 5)); | 
 |  |  |                             if (count>0){ | 
 |  |  |                             JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); | 
 |  |  |                             JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); | 
 |  |  |                             if (jarOtherProtocol == null) { | 
 |  |  |                                 break; | 
 |  |  |                             } | 
 |  |  |                             if (count>0){ | 
 |  |  |                                 if (jarOtherProtocol.getJarTemperature()<jarTemperature){ | 
 |  |  |                                     break; | 
 |  |  |                                 } | 
 |  |  |                             } | 
 |  |  |                             if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){ | 
 |  |  |                                 if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 3).equals(basJarOther.getJarCount())){ | 
 |  |  |                                     JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); | 
 |  |  |                                     JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); | 
 |  |  |                                     if (jarOtherProtocol == null) { | 
 |  |  |                                         break; | 
 |  |  |                                     } | 
 |  |  | //                                    JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); | 
 |  |  | //                                    JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); | 
 |  |  | //                                    if (jarOtherProtocol == null) { | 
 |  |  | //                                        break; | 
 |  |  | //                                    } | 
 |  |  |                                     if (jarOtherProtocol.getJarTemperature()>jarTemperature){ | 
 |  |  |                                         log.info("{}号硫化罐查询设备温度过高,等待降温....先执行入罐任务!!!",jarOtherProtocol.getJarNo()); | 
 |  |  |                                     } else { | 
 |  |  | 
 |  |  |                                 signExecute[i] = true; | 
 |  |  |                                 break;//开门任务   生成入硫化罐任务 | 
 |  |  |                             } | 
 |  |  |                         case 3: | 
 |  |  |                             if (jarWrkMastExecuteGenerate3(jarSlave,sign)){ | 
 |  |  |                                 signExecute[i] = true; | 
 |  |  |                                 break;//开出料门 | 
 |  |  |                             } | 
 |  |  |                         case 2: | 
 |  |  |                             if (jarProtocol.getJarTemperature()>jarTemperature){ | 
 |  |  |                                 log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); | 
 |  |  | 
 |  |  |                             if (jarWrkMastExecuteGenerate2(jarSlave,sign)){ | 
 |  |  |                                 signExecute[i] = true; | 
 |  |  |                                 break;//关进料门 | 
 |  |  |                             } | 
 |  |  |                         case 3: | 
 |  |  |                             if (jarWrkMastExecuteGenerate3(jarSlave,sign)){ | 
 |  |  |                                 signExecute[i] = true; | 
 |  |  |                                 break;//开出料门 | 
 |  |  |                             } | 
 |  |  |                         case 4: | 
 |  |  |                             if (jarProtocol.getJarTemperature()>jarTemperature){ | 
 |  |  | 
 |  |  |             // 下发站点信息 | 
 |  |  |             if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(9, staProtocol))) { | 
 |  |  |                 log.error("平衡车Rgv命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol)); | 
 |  |  |                 Thread.sleep(500); | 
 |  |  |                 return false; | 
 |  |  |             } | 
 |  |  |             Thread.sleep(500); | 
 |  |  |             return true; | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             log.error("平衡车Rgv命令下发失败,Rgv号={},任务数据={},endRow={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(endRow)); | 
 |  |  | 
 |  |  |             // 下发站点信息 | 
 |  |  |             if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(10, staProtocol))) { | 
 |  |  |                 log.error("平衡车Rgv命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol)); | 
 |  |  |                 Thread.sleep(500); | 
 |  |  |                 return false; | 
 |  |  |             } | 
 |  |  |             Thread.sleep(500); | 
 |  |  |             return true; | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             log.error("平衡车Rgv命令下发失败,Rgv号={},任务数据={},RGV4={},RGV5={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(RGV4), JSON.toJSON(RGV5)); | 
 |  |  | 
 |  |  |             // 下发站点信息 | 
 |  |  |             if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(11, staProtocol))) { | 
 |  |  |                 log.error("平衡车Rgv命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol)); | 
 |  |  |                 Thread.sleep(500); | 
 |  |  |                 return false; | 
 |  |  |             } | 
 |  |  |             Thread.sleep(500); | 
 |  |  |             return true; | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             log.error("平衡车Rgv命令下发失败,Rgv号={},任务数据={},RGV6={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(RGV6)); | 
 |  |  | 
 |  |  |             steCommand.setJarNo(siteId.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); | 
 |  |  |                 Thread.sleep(500); | 
 |  |  |                 return false; | 
 |  |  |             } | 
 |  |  |             Thread.sleep(500); | 
 |  |  |             return true; | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             log.error("穿梭车Ste命令下发失败,堆垛机号={},任务数据={},complete={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(complete)); | 
 |  |  | 
 |  |  |             jarCommand.setTaskModeType(jarTaskModeType); | 
 |  |  |             if (!MessageQueue.offer(SlaveType.Jar, jarCommand.getJarNo(), new Task(2, jarCommand))) { | 
 |  |  |                 log.error("硫化罐Jar命令下发失败,堆垛机号={},任务数据={},下发数据={}", jarCommand.getJarNo(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarCommand)); | 
 |  |  |                 Thread.sleep(500); | 
 |  |  |                 return false; | 
 |  |  |             } | 
 |  |  |             Thread.sleep(500); | 
 |  |  |             return true; | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             log.error("硫化罐Jar命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getJarId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarTaskModeType)); | 
 |  |  | 
 |  |  |                             if (jarProtocol.modeType != JarModeType.AUTO){ | 
 |  |  |                                 continue; | 
 |  |  |                             } | 
 |  |  |                             if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ | 
 |  |  |                             if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2) | 
 |  |  |                                     || jarProtocol.statusType .equals(JarStatusType.WAITING3) | 
 |  |  |                                     || jarProtocol.statusType .equals(JarStatusType.WAITING4) | 
 |  |  |                                     || jarProtocol.statusType .equals(JarStatusType.WAITING5) | 
 |  |  |                                     || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){ | 
 |  |  |                                 continue; | 
 |  |  |                             } | 
 |  |  |                             if (jarProtocol.getJarTemperature()>jarTemperature){ | 
 |  |  | 
 |  |  |                                         if (jarProtocol.modeType != JarModeType.AUTO){ | 
 |  |  |                                             continue; | 
 |  |  |                                         } | 
 |  |  |                                         if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ | 
 |  |  |                                         if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2) | 
 |  |  |                                                 || jarProtocol.statusType .equals(JarStatusType.WAITING3) | 
 |  |  |                                                 || jarProtocol.statusType .equals(JarStatusType.WAITING4) | 
 |  |  |                                                 || jarProtocol.statusType .equals(JarStatusType.WAITING5) | 
 |  |  |                                                 || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){ | 
 |  |  |                                             continue; | 
 |  |  |                                         } | 
 |  |  |                                         if (jarProtocol.getJarTemperature()>jarTemperature){ | 
 |  |  | 
 |  |  |                 if (jarProtocol.modeType != JarModeType.AUTO){ | 
 |  |  |                     continue; | 
 |  |  |                 } | 
 |  |  |                 if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ | 
 |  |  |                 if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2) | 
 |  |  |                         || jarProtocol.statusType .equals(JarStatusType.WAITING3) | 
 |  |  |                         || jarProtocol.statusType .equals(JarStatusType.WAITING4) | 
 |  |  |                         || jarProtocol.statusType .equals(JarStatusType.WAITING5) | 
 |  |  |                         || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){ | 
 |  |  |                     continue; | 
 |  |  |                 } | 
 |  |  |                 if (jarProtocol.getJarTemperature()>jarTemperature){ |