#
zjj
2024-08-20 649f2e387786c86e248a8e031979c3fb67a5e39d
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -60,7 +60,7 @@
    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 = 7;
    private static final Float jarTemperature = 80F;
    private static final Float jarTemperature = 50F;
    @Autowired
    private CommonService commonService;
    @Autowired
@@ -4835,8 +4835,28 @@
                            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;
@@ -5310,6 +5330,11 @@
                            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
@@ -5441,11 +5466,11 @@
            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)){
@@ -8162,7 +8187,38 @@
                    if(basJarMastList.isEmpty()){
                        if (wrkMastExecuteService.selectNoStartCharge(steSlave.getId())==0){
                            if (wrkMastExecuteService.selectMoveStart(steSlave.getId())==0){
                                continue;
                                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;
                                }
                            }
                        }
                    }