| | |
| | | |
| | | public static final long COMMAND_TIMEOUT = 5 * 1000; |
| | | // private static final int[][] execute = new int[][]{{1,4},{2,4},{3,4},{4,4},{5,6},{6,6},{7,4},{8,4},{9,3},{10,4},{11,4}}; |
| | | private static final int[][] execute = new int[][]{{1,4},{2,4},{3,4},{4,4},{5,6},{6,6},{9,3},{10,4},{11,4}}; |
| | | private static final int[][] execute = new int[][]{{1,4},{2,4},{3,4},{4,4},{5,6},{6,6},{7,4},{8,4},{9,3},{10,4},{11,4}}; |
| | | |
| | | @Autowired |
| | | private CommonService commonService; |
| | |
| | | */ |
| | | public synchronized void jarMastGenerate() { |
| | | for (JarSlave jarSlave : slaveProperties.getJar()) { |
| | | if (jarSlave.getId()>4){ |
| | | continue; |
| | | } |
| | | try{ |
| | | if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){ |
| | | continue; |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | |
| | | JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | |
| | | //自动、空闲、右门关闭、 Other左门关闭 |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 |
| | | && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | | if (jarProtocol.statusType == JarStatusType.IDLE || jarProtocol.statusType == JarStatusType.MOVING){ |
| | | if (jarProtocol.statusType != JarStatusType.SOS){ |
| | | log.error("Jar任务创建===》执行===>行={}",4537); |
| | | BasJarMast basJarMast = new BasJarMast(basJar, wrkMast, jarLocDigit); |
| | | basJarMast.setJarEnterStaNo(staNo);//入硫化罐站点 |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | |
| | | JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | |
| | | //门作业 无 |
| | | //自动、空闲、右门关闭、 Other左门关闭 |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0){ |
| | | switch (sign){ |
| | | case 5: |
| | | if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | break;//出硫化罐 ===》 入冷却槽 |
| | | } |
| | | if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | //出硫化罐 ===》 入冷却槽 |
| | | } |
| | | return signExecute; |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage()); |
| | |
| | | continue; |
| | | } |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | | if (jarOtherProtocol == null) { |
| | |
| | | log.error("JarWrkMastExecute任务创建===>执行异常===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(basJarMast)); |
| | | } |
| | | return true; |
| | | } else if ((jarProtocol.statusType == JarStatusType.WAITING3 || jarProtocol.statusType == JarStatusType.MOVING) && jarProtocol.isLeftDoor()){ |
| | | } else if (jarProtocol.isLeftDoor()){ |
| | | //生成入硫化罐任务 |
| | | if (!jarWrkMastExecuteGenerateExecute(basJar,basJarMast,basJar.getJarNo(),new int[]{basJar.getEnterSteNo(),basJar.getEnterRgvNo(),5,1})){ |
| | | log.error("JarWrkMastExecute任务创建===>执行异常===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(basJarMast)); |
| | | } |
| | | return true; |
| | | } else if (jarProtocol.statusType == JarStatusType.IDLE && jarProtocol.isLeftDoor()){ |
| | | log.error("JarWrkMastExecute任务创建===>执行异常===》硫化罐空闲但是门未关===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(basJarMast)); |
| | | } |
| | | // else if (jarProtocol.statusType == JarStatusType.IDLE && jarProtocol.isLeftDoor()){ |
| | | // log.error("JarWrkMastExecute任务创建===>执行异常===》硫化罐空闲但是门未关===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(basJarMast)); |
| | | // } |
| | | } |
| | | return false; |
| | | } else { |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){ |
| | | return false; |
| | | } |
| | | List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{ |
| | | add(14);//冷却完成 |
| | | List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusListB(jarSlave.getId(), new ArrayList<Integer>() {{ |
| | | add(12);//冷却完成 |
| | | }}); |
| | | if (basJarMastList.isEmpty()){ |
| | | return false; |
| | | } |
| | | |
| | | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),7)!=0){ |
| | | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),6)!=0){ |
| | | return false; |
| | | } |
| | | |
| | | BasJarMast jarMastByJarIdMin = basJarMastService.getJarMastByJarIdMin(jarSlave.getId(),14,14); |
| | | BasJarMast jarMastByJarIdMin = basJarMastService.getJarMastByJarIdMinB(jarSlave.getId(),12,12); |
| | | if (Cools.isEmpty(jarMastByJarIdMin)){ |
| | | return false; |
| | | } |
| | | |
| | | //判断小车状态 |
| | | if (!jarWrkMastExecuteGenerateSteStatus(jarSlave.getJarOutSte().get(0).getSteNo(),2,SteStatusType.IDLE)){ |
| | | return false; |
| | | } |
| | | // |
| | | // //判断小车状态 |
| | | // if (!jarWrkMastExecuteGenerateSteStatus(jarSlave.getJarOutSte().get(0).getSteNo(),3,SteStatusType.IDLE)){ |
| | | // return false; |
| | | // } |
| | | |
| | | //判断RGV状态 |
| | | JarSlave.RgvStn rgvStn = jarSlave.getJarOutRgv().get(0); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | |
| | | //门作业 无 |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0){ |
| | | //关进料门 |
| | | if (!jarWrkMastExecuteGenerateExecute(basJar,jarMastByJarIdMin,basJar.getBurial(),new int[]{basJar.getOutSteNo(),basJar.getOutRgvNo(),3,1})){ |
| | | //冷却完成上输送线 |
| | | if (!jarWrkMastExecuteGenerateExecute(basJar,jarMastByJarIdMin,basJar.getBurial(),new int[]{basJar.getOutSteNo(),basJar.getOutRgvNo(),9,1})){ |
| | | log.error("JarWrkMastExecute任务创建===>执行异常===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(jarMastByJarIdMin)); |
| | | } |
| | | return true; |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | |
| | | if (SteAndJarUtil.steAndJarNowRow(staProtocolRGV.getNowRow() , jarProtocol.getJarNo())){ |
| | | //判断小车状态 |
| | | if (!jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.IDLE)){ |
| | | if (!jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.WAITING2)){ |
| | | return false; |
| | | } |
| | | //调车 == > 取货 |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (SteAndJarUtil.steAndJarNowRow(staProtocolRGV.getNowRow() , jarProtocolOther.getJarNo())){ |
| | | //判断小车状态 |
| | | if (wrkMastExecute.getIoType()==7){ //7 B=>C |
| | | if (!jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.IDLE)){ |
| | | if (jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.IDLE)){ |
| | | //调车 == > 移动 |
| | | if (jarSteTake(wrkMastExecute,SteLocaType.POINT23.id,SteLocaType.POINT26.id,SteTaskModeType.STE_MOVE_14,false,SteAndJarUtil.getBJarNo(wrkMastExecute.getJarId()))){ |
| | | log.error("穿梭板Ste命令下发失败,ste号={},任务数据={},硫化罐数据={},sign={}", |
| | |
| | | // if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | // return false; |
| | | // } |
| | | |
| | | // if (jarProtocol.getJarTemperature()>50){ |
| | | // log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | // return false; |
| | | // } |
| | | BasJar basJar = basJarMapper.selectById(wrkMastExecute.getJarId()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号冷却槽查询设备档案无信息!!!",wrkMastExecute.getJarId()); |
| | |
| | | log.error("9:出冷却槽Two==>任务下发===>行={}",6468); |
| | | // 下发站点信息 |
| | | staProtocol.setWorkNo(wrkMastExecute.getWrkNo().intValue()); |
| | | staProtocol.setStaNo(staProtocol.getStaNo()); |
| | | staProtocol.setStaNo(wrkMastExecute.getOutStaNo()); |
| | | if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(2, staProtocol))) { |
| | | return false; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | //移走 == > 2 |
| | | if (!jarRgvMoveTake(wrkMastExecute,2)){ |
| | | log.error("平衡车RGV命令下发失败,rgv号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getJarId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getJarId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | //调车 == > 移动 |
| | | if (!jarSteTake(wrkMastExecute,SteLocaType.POINT20.id,SteLocaType.POINT23.id,SteTaskModeType.STE_MOVE_14,false,wrkMastExecute.getJarId())){ |
| | | log.error("穿梭板Ste命令下发失败,ste号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | wrkMastExecute.setWrkType(1); |
| | | wrkMastExecute.setWrkSts(3); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("穿梭板Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | } else if (jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.IDLE)){ |
| | | wrkMastExecute.setWrkType(1); |
| | | wrkMastExecute.setWrkSts(4); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("穿梭板Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | } |
| | | } else {//11:B=>A |
| | |
| | | //调车 == > 移动 |
| | | if (!jarSteTake(wrkMastExecute,SteLocaType.POINT23.id,SteLocaType.POINT20.id,SteTaskModeType.STE_MOVE_14,false,wrkMastExecute.getJarId())){ |
| | | log.error("穿梭板Ste命令下发失败,ste号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | wrkMastExecute.setWrkType(1); |
| | | wrkMastExecute.setWrkSts(3); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("穿梭板Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | } else if (jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),1,SteStatusType.IDLE)){ |
| | | wrkMastExecute.setWrkType(1); |
| | | wrkMastExecute.setWrkSts(4); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("穿梭板Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | } |
| | | } |
| | |
| | | //调车 == > endRow |
| | | if (!jarRgvMoveTake(wrkMastExecute,SteAndJarUtil.getRgvJarNowRow(wrkMastExecute.getJarId()))){ |
| | | log.error("平衡车RGV命令下发失败,rgv号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getJarId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getJarId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | wrkMastExecute.setWrkType(1); |
| | | wrkMastExecute.setWrkSts(2); |
| | | if (!wrkMastExecuteService.updateById(wrkMastExecute)){ |
| | | log.error("硫化罐Jar命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},硫化罐数据={},sign={}", |
| | | wrkMastExecute.getJarId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | wrkMastExecute.getJarId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign); |
| | | } |
| | | } |
| | | return true; |
| | |
| | | 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.WAITING2)){ |
| | | if (steProtocol.statusType.equals(SteStatusType.WAITING)){ |
| | | //ste任务完成 |
| | | if (jarSteTake(wrkMastExecute,null,null,null,true,SteAndJarUtil.getBJarNo(wrkMastExecute.getJarId()))){ |
| | | wrkMastExecute.setWrkSts(4); |
| | |
| | | } |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | |
| | | } else if (jarWrkMastExecuteGenerateSteStatus(steSlave.getId(),3,SteStatusType.IDLE)){ |
| | | List<WrkMastExecute> wrkMastExecutes = wrkMastExecuteService.selectWrkMastExecuteByTypeAndIoTyperAndWrkType(null, 9, null); |
| | | if (wrkMastExecutes.isEmpty()){ |
| | | List<WrkMastExecute> wrkMastExecutesB = wrkMastExecuteService.selectWrkMastExecuteByTypeAndIoTyperAndWrkType(null, 9, null); |
| | | List<WrkMastExecute> wrkMastExecutesA = wrkMastExecuteService.selectWrkMastExecuteByTypeAndIoTyperAndWrkType(null, 6, null); |
| | | List<WrkMastExecute> wrkMastExecutesB = wrkMastExecuteService.selectWrkMastExecuteByTypeAndIoTyperAndWrkType(null, 6, null); |
| | | List<WrkMastExecute> wrkMastExecutesA = wrkMastExecuteService.selectWrkMastExecuteByTypeAndIoTyperAndWrkType(null, 5, null); |
| | | if (!wrkMastExecutesB.isEmpty() || !wrkMastExecutesA.isEmpty()){ |
| | | WrkMastExecute wrkMastExecute = !wrkMastExecutesB.isEmpty() ? wrkMastExecutesB.get(0) : wrkMastExecutesA.get(0); |
| | | BasJar basJar = basJarMapper.selectById(wrkMastExecute.getJarId()); |