| | |
| | | List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{ |
| | | add(4); |
| | | }}); |
| | | // if (basJarMastList.size() != jarMaxLoc){ |
| | | // return false; |
| | | // } |
| | | if (basJarMastList.isEmpty()){ |
| | | return false; |
| | | } |
| | | |
| | | BasJarMast basJarMastSign = basJarMastList.get(0); |
| | | if (Cools.isEmpty(basJarMastSign)){ |
| | |
| | | // && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=jarMaxLoc*2){ |
| | | // return false; |
| | | // } |
| | | if (basJarMastList.isEmpty()){ |
| | | return false; |
| | | } |
| | | |
| | | BasJarMast basJarMastSign = basJarMastList.get(0); |
| | | if (Cools.isEmpty(basJarMastSign)){ |
| | |
| | | continue; |
| | | } |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null || steProtocol.getChargeStatus()!=0) { |
| | | if (steProtocol == null) { |
| | | continue; |
| | | } |
| | | if (Cools.isEmpty(steProtocol.getChargeStatus())) { |
| | | log.error("{}号小车,充电状态信息异常,小车信息:{}",steProtocol.getSteNo(),steProtocol.toString()); |
| | | continue; |
| | | } |
| | | if (steProtocol.getChargeStatus()!=0) { |
| | | continue; |
| | | } |
| | | WrkMastExecute wrkMastExecuteByCharge = wrkMastExecuteService.getWrkMastExecuteByCharge(steSlave.getId()); |
| | |
| | | continue; |
| | | } |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null || steProtocol.getChargeStatus()!=1) { |
| | | if (steProtocol == null) { |
| | | continue; |
| | | } |
| | | if (Cools.isEmpty(steProtocol.getChargeStatus())) { |
| | | log.error("{}号小车,充电状态信息异常,小车信息:{}",steProtocol.getSteNo(),steProtocol.toString()); |
| | | continue; |
| | | } |
| | | if (steProtocol.getChargeStatus()!=1) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | add(3); |
| | | add(4); |
| | | }}); |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 2); |
| | | |
| | | Integer count = basJarMastList.size(); |
| | | ArrayList<Integer> wrkNoList = new ArrayList<>(); |
| | | |
| | | for (Integer staNoEnt : staNos){ |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 2); |
| | | StaProtocol staProtocolEnt = devpThread.getStation().get(staNoEnt); |
| | | if (staProtocolEnt != null && staProtocolEnt.getWorkNo()!=0 && !wrkNoList.contains(staProtocolEnt.getWorkNo())){ |
| | | if (staProtocolEnt == null || (staProtocolEnt.isLoading() && staProtocolEnt.getWorkNo()==0)){ |
| | | log.error("站点异常,计数加一,站点号:"+staNoEnt); |
| | | count++; |
| | | } else if (staProtocolEnt != null && staProtocolEnt.getWorkNo()!=0 && !wrkNoList.contains(staProtocolEnt.getWorkNo())){ |
| | | if (staProtocolEnt.getStaNo().equals(basJar.getEntStaNo$())){ |
| | | count++; |
| | | wrkNoList.add(staProtocolEnt.getWorkNo()); |