| | |
| | | |
| | | // private static final Integer jarMaxLoc1 = 7; |
| | | private static Integer jarMaxLoc = 0; |
| | | // private static Integer signBigTurn = 0; |
| | | // private static Integer signSmallTurn = 0; |
| | | private static final Float jarTemperature = 50F; |
| | | @Autowired |
| | | private CommonService commonService; |
| | |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | // if (wrkMast.getStaNoSign().equals(signBigTurn)){ |
| | | // continue; |
| | | // } |
| | | |
| | | |
| | | crnStation = crnStation1; |
| | | |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getStaNo()>309){ |
| | | int wrkCount = wrkMastMapper.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).gt("sta_no", 309).lt("sta_no", 314).gt("wrk_sts",11L)); |
| | | if (wrkCount>=12){ |
| | | if (wrkMast.booleanStaNoSign()){ |
| | | RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("LineUp"+wrkMast.getStaNo()); |
| | | if (Cools.isEmpty(rgvOneSign)){ |
| | | continue; |
| | | } |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | StaProtocol staProtocolEnt = devpThread.getStation().get(212); |
| | | if (staProtocolEnt.isLoading() || staProtocolEnt.getWorkNo()!=0){ |
| | | if (rgvOneSign.getRgvOneSign()>=2){ |
| | | continue; |
| | | } |
| | | // int wrkCount = wrkMastMapper.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).gt("sta_no", 309).lt("sta_no", 314).gt("wrk_sts",11L)); |
| | | // if (wrkCount>=12){ |
| | | // continue; |
| | | // } |
| | | // RgvOneSign bigTurn = rgvOneSignMapper.selectOneSign("bigTurn"); |
| | | // if (Cools.isEmpty(bigTurn)){ |
| | | // continue; |
| | | // } |
| | | // if (bigTurn.getRgvOneSign()>13){ |
| | | // continue; |
| | | // } |
| | | // DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | // StaProtocol staProtocolEnt = devpThread.getStation().get(wrkMast.getStaNoBying()); |
| | | // if (staProtocolEnt.isLoading() || staProtocolEnt.getWorkNo()!=0){ |
| | | // continue; |
| | | // } |
| | | } |
| | | |
| | | // 工作档状态判断 |
| | |
| | | // } |
| | | } |
| | | } |
| | | // signBigTurn++; |
| | | // if (signBigTurn > 2){ |
| | | // signBigTurn = 0; |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | //自动、空闲、右门关闭、 Other左门关闭 |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 |
| | | && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | | if (jarProtocol.statusType != JarStatusType.SOS){ |
| | | if (jarProtocol.statusType != JarStatusType.SOS && jarProtocol.statusType != JarStatusType.SOS2){ |
| | | log.error("Jar任务创建===》执行===>行={}",4537); |
| | | BasJarMast basJarMast = new BasJarMast(basJar, wrkMast, jarLocDigit); |
| | | basJarMast.setJarEnterStaNo(staNo);//入硫化罐站点 |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | //门作业 无 |
| | | if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS && jarProtocol.jarErr==0 |
| | | if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS && jarProtocol.statusType!= JarStatusType.SOS2 && jarProtocol.jarErr==0 |
| | | && jarProtocol.isRightDoor() && jarProtocol.isLeftDoor() |
| | | && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | | //关进料门 |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | log.error("JarWrkMastExecute任务创建===>执行异常===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(basJarMastSign)); |
| | | } |
| | | return true; |
| | | } else if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS |
| | | } else if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS && jarProtocol.statusType != JarStatusType.SOS2 |
| | | && jarProtocol.statusType != JarStatusType.WAITING2 && jarProtocol.jarErr==0 |
| | | && jarProtocol.isLeftDoor() && jarProtocol.isRightDoor() |
| | | && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (jarProtocolOther.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocolOther.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | // log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | |
| | | add(5); |
| | | add(11); |
| | | add(17); |
| | | add(99); |
| | | add(100); |
| | | add(999); |
| | | }}); |
| | | if(!basJarMastList.isEmpty()){ |
| | | continue; |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | |
| | | add(5); |
| | | add(11); |
| | | add(17); |
| | | add(99); |
| | | add(100); |
| | | add(999); |
| | | }}); |
| | | if(basJarMastList.isEmpty()){ |
| | | if (wrkMastExecuteService.selectNoStartCharge(steSlave.getId())==0){ |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | |
| | | if (!jarSteTake(wrkMastExecuteByCharge,SteLocaType.POINT20.id,SteLocaType.POINT20.id,SteTaskModeType.CLOSE_CHARGE,true,wrkMastExecuteByCharge.getJarId())){ |
| | | log.error("穿梭板Ste命令下发失败,ste号={},任务数据={}", |
| | | wrkMastExecuteByCharge.getSteId(), JSON.toJSONString(wrkMastExecuteByCharge)); |
| | | } |
| | | try{ |
| | | Thread.sleep(1000); |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | wrkMastExecuteByCharge.setWrkType(2); |
| | | wrkMastExecuteByCharge.setWrkSts(100); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |