| | |
| | | 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 Integer jarMaxLoc = 6; |
| | | private static final Float jarTemperature = 50F; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | @Autowired |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | 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(); |
| | |
| | | break;//开门任务 生成入硫化罐任务 |
| | | } |
| | | case 2: |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | if (jarWrkMastExecuteGenerate2(jarSlave,sign)){ |
| | | signExecute[i] = true; |
| | | break;//关进料门 |
| | |
| | | break;//开出料门 |
| | | } |
| | | case 4: |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | if (jarWrkMastExecuteGenerate4(jarSlave,sign)){ |
| | | signExecute[i] = true; |
| | | break;//出硫化罐 ===》 入冷却槽 |
| | |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0){ |
| | | if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | //出硫化罐 ===》 入冷却槽 |
| | | return signExecute; |
| | | //冷却完成上输送线 |
| | | } |
| | | return signExecute; |
| | | continue; |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage()); |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | |
| | | if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | |
| | | if (wrkMastExecuteService.getWrkMastExecuteByjarReginCount(basJar.getRegion())!=0){ |
| | | return false; |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(basJarMastSign)){ |
| | | return false; |
| | | } |
| | | |
| | | if (wrkMastExecuteService.getWrkMastExecuteByjarReginCount(basJarMastSign.getJarRegin())!=0){ |
| | | return false; |
| | | } |
| | | // //判断小车状态 |
| | | // if (!jarWrkMastExecuteGenerateSteStatus(jarSlave.getJarInSte().get(0).getSteNo(),1,SteStatusType.IDLE)){ |
| | | // return false; |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (Cools.isEmpty(basJarMastSign)){ |
| | | return false; |
| | | } |
| | | |
| | | if (wrkMastExecuteService.getWrkMastExecuteByjarReginCount(basJarMastSign.getJarRegin())!=0){ |
| | | return false; |
| | | } |
| | | // //判断小车状态 |
| | | // if (!jarWrkMastExecuteGenerateSteStatus(jarSlave.getJarInSte().get(0).getSteNo(),2,SteStatusType.IDLE)){ |
| | | // return false; |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | // if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | // log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | // return false; |
| | | // } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | if (basJarMastList.isEmpty()){ |
| | | return false; |
| | | } |
| | | |
| | | List<BasJarMast> basJarMastList10 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{ |
| | | add(10); |
| | | }}); |
| | | if (basJarMastList10.size()==jarMaxLoc){ |
| | | return false; |
| | | } |
| | | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),4)!=0){ |
| | | return false; |
| | | } |
| | | |
| | | BasJarMast jarMastByJarIdMin = basJarMastService.getJarMastByJarIdMin(jarSlave.getId(),8,8); |
| | | if (Cools.isEmpty(jarMastByJarIdMin)){ |
| | | return false; |
| | | } |
| | | if (wrkMastExecuteService.getWrkMastExecuteByjarReginCount(jarMastByJarIdMin.getJarRegin())!=0){ |
| | | return false; |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(jarMastByJarIdMin)){ |
| | | return false; |
| | | } |
| | | |
| | | if (wrkMastExecuteService.getWrkMastExecuteByjarReginCount(jarMastByJarIdMin.getJarRegin())!=0){ |
| | | return false; |
| | | } |
| | | // |
| | | // //判断小车状态 |
| | | // if (!jarWrkMastExecuteGenerateSteStatus(jarSlave.getJarOutSte().get(0).getSteNo(),3,SteStatusType.IDLE)){ |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | |
| | | // 获取硫化罐信息 |
| | | JarThread jarThreadOther = (JarThread) SlaveConnection.get(SlaveType.Jar, SteAndJarUtil.getRgvJarNo(jarProtocol.getJarNo())); |
| | | JarProtocol jarProtocolOther = jarThreadOther.getJarProtocol(); |
| | | if (jarProtocolOther == null) { |
| | | return false; |
| | | } |
| | | if (jarProtocolOther.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | |
| | | BasJar basJarOther = basJarMapper.selectById(jarProtocolOther.getJarNo()); |
| | | if (Cools.isEmpty(basJarOther)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocolOther.getJarNo()); |
| | | return false; |
| | | } |
| | | |
| | | if (!jarProtocolOther.isRightDoor()){ |
| | | return false; |
| | | } |
| | | |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | // if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | // log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | // return false; |
| | | // } |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | // if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | // return false; |
| | | // } |
| | | // if (jarProtocol.getJarTemperature()>50){ |
| | | // if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | // log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | // return false; |
| | | // } |
| | |
| | | log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | |
| | | 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)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | |
| | | && jarProtocol.leftDoorOpen!=1 && jarProtocol.leftDoorOpen!=3 |
| | | && jarProtocol.rightDoorOpen!=1 && jarProtocol.rightDoorOpen!=3 |
| | | && (jarProtocol.leftDoorOpen==2 || jarProtocol.rightDoorOpen==2)){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | WrkMastExecute wrkMastExecuteSou = new WrkMastExecute(); |
| | | wrkMastExecuteSou.setWrkSts(3); |
| | | List<WrkMastExecute> wrkMastExecuteList = wrkMastExecuteService.selectWrkMastExecuteByWrk(wrkMastExecuteSou); |
| | |
| | | && jarProtocol.leftDoorClose!=1 && jarProtocol.leftDoorClose!=3 |
| | | && jarProtocol.rightDoorClose!=1 && jarProtocol.rightDoorClose!=3 |
| | | && (jarProtocol.leftDoorClose==2 || jarProtocol.rightDoorClose==2)){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | WrkMastExecute wrkMastExecuteSou = new WrkMastExecute(); |
| | | wrkMastExecuteSou.setWrkSts(3); |
| | | List<WrkMastExecute> wrkMastExecuteList = wrkMastExecuteService.selectWrkMastExecuteByWrk(wrkMastExecuteSou); |
| | |
| | | return true; |
| | | } |
| | | return true; |
| | | } else { |
| | | log.error("{}号平衡车当前状态不满足入硫化罐条件,当前任务,平衡车从取货"); |
| | | } |
| | | } |
| | | return true; |
| | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.leftDoorOpen != 0 || jarProtocol.rightDoorOpen != 0){ |
| | |
| | | } |
| | | public synchronized Integer jarGetStartStaNo(Integer staNo) { |
| | | try { |
| | | int[] jarNos=new int[]{4,2,3,1};//(607分配硫化罐) |
| | | int[] jarNos=new int[]{3,1,4,2};//(607分配硫化罐) |
| | | ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | add(607);add(608);add(609);add(610);add(611);add(612); |
| | | add(613);add(614);add(615);add(616);add(617);add(618); |
| | | add(619);add(620);add(621);add(622); |
| | | }}; |
| | | ArrayList<Integer> jarNoList = new ArrayList<>(); |
| | | ArrayList<Integer> jarNoList1 = new ArrayList<>(); |
| | | ArrayList<Integer> jarNoListNow = new ArrayList<>(); |
| | | for (int jarNo : jarNos) { |
| | | List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarNo, new ArrayList<Integer>() {{ |
| | |
| | | jarNoList.add(jarNo); |
| | | } |
| | | } |
| | | jarNoList.add(4); |
| | | jarNoList.add(2); |
| | | jarNoList.add(3); |
| | | jarNoList.add(1); |
| | | for (int jarNo : jarNos) { |
| | | if (!jarNoList.contains(jarNo)){ |
| | | jarNoList1.add(jarNo); |
| | | } |
| | | } |
| | | for (int jarNo : jarNoList1) { |
| | | List<BasJarMast> jarMastByJarIdAndStatusList = basJarMastService.getJarMastByJarIdAndStatusList(8, jarNo); |
| | | if (jarMastByJarIdAndStatusList.isEmpty()){ |
| | | jarNoList.add(jarNo); |
| | | } |
| | | } |
| | | jarNoList1 = new ArrayList<Integer>(); |
| | | for (int jarNo : jarNos) { |
| | | if (!jarNoList.contains(jarNo)){ |
| | | jarNoList1.add(jarNo); |
| | | } |
| | | } |
| | | for (int jarNo : jarNoList1) { |
| | | List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarNo, new ArrayList<Integer>() {{ |
| | | add(5); |
| | | add(6); |
| | | add(7); |
| | | add(8); |
| | | add(9); |
| | | add(13); |
| | | add(14); |
| | | add(15); |
| | | }}); |
| | | if (basJarMastList.isEmpty()){ |
| | | jarNoList.add(jarNo); |
| | | } |
| | | } |
| | | for (int jarNo : jarNoList) { |
| | | if (jarNoListNow.contains(jarNo)){ |
| | | continue; |
| | |
| | | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>50){ |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |