|  |  |  | 
|---|
|  |  |  | if (basJarMastService.selectJarMastOperation(jarSlave.getId(),2)!=0){ | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){ | 
|---|
|  |  |  | BasJar basJar = basJarMapper.selectById(jarSlave.getId()); | 
|---|
|  |  |  | int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 11)); | 
|---|
|  |  |  | if (count>0){ | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){ | 
|---|
|  |  |  | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)==7){ | 
|---|
|  |  |  | 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 { | 
|---|
|  |  |  | if (basJarMastService.getJarMastByJarIdCount(jarSlave.getId())>0){ | 
|---|
|  |  |  | log.info("{}号硫化罐查询设备温度过高,先执行了入罐任务,执行完毕再进行冷却!!!",jarOtherProtocol.getJarNo()); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (basJarMastService.getJarMastByJarIdCount(jarSlave.getId())>=jarMaxLoc*2){ | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 11)); | 
|---|
|  |  |  | if (count>0){ | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //门作业  无 | 
|---|
|  |  |  | //自动、空闲、右门关闭、   Other左门关闭 | 
|---|
|  |  |  | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 | 
|---|
|  |  |  | 
|---|
|  |  |  | if (basJarMastList.size() != jarMaxLoc){ | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=0 | 
|---|
|  |  |  | && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=7 | 
|---|
|  |  |  | && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=14){ | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //            if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=0 | 
|---|
|  |  |  | //                    && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=7 | 
|---|
|  |  |  | //                    && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=14){ | 
|---|
|  |  |  | //                return false; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | BasJarMast basJarMastSign = basJarMastList.get(0); | 
|---|
|  |  |  | if (Cools.isEmpty(basJarMastSign)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | if(basJarMastList.isEmpty()){ | 
|---|
|  |  |  | if (wrkMastExecuteService.selectNoStartCharge(steSlave.getId())==0){ | 
|---|
|  |  |  | if (wrkMastExecuteService.selectMoveStart(steSlave.getId())==0){ | 
|---|
|  |  |  | boolean sign = true; | 
|---|
|  |  |  | for (SteSlave.InStn inStn : steSlave.getSteInStn()){ | 
|---|
|  |  |  | //检测站点状态 | 
|---|
|  |  |  | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, inStn.getDevpPlcId()); | 
|---|
|  |  |  | StaProtocol staProtocol = devpThread.getStation().get(inStn.getStaNo()); | 
|---|
|  |  |  | if (staProtocol == null) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | staProtocol = staProtocol.clone(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0) { | 
|---|
|  |  |  | // 获取硫化罐信息 | 
|---|
|  |  |  | JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, inStn.getJarNo()); | 
|---|
|  |  |  | JarProtocol jarProtocol = jarThread.getJarProtocol(); | 
|---|
|  |  |  | if (jarProtocol == null) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (jarProtocol.modeType != JarModeType.AUTO){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (jarProtocol.statusType .equals(JarStatusType.SOS)){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (jarProtocol.getJarTemperature()>jarTemperature){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sign = false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(sign){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|