#
yxFwq
2024-10-16 993d23c47942d39eaaf881da8cacd6350dfca227
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -7546,9 +7546,42 @@
            if (staProtocolRGVOther == null) {
                return false;
            }
            Integer[] steJarNoAB = SteAndJarUtil.getSteJarNoAB(wrkMastExecute.getJarId());
            boolean signOther = false;
            for(Integer jarNoOther : steJarNoAB){
                // 获取硫化罐信息
                JarThread jarThreadOther = (JarThread) SlaveConnection.get(SlaveType.Jar, jarNoOther);
                JarProtocol jarProtocolOther = jarThreadOther.getJarProtocol();
                if (jarProtocolOther == null) {
                    continue;
                }
                if (jarProtocolOther.modeType != JarModeType.AUTO){
                    continue;
                }
                if (jarProtocolOther.statusType .equals(JarStatusType.SOS)){
//                    log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                    continue;
                }
                if (jarProtocolOther.getJarTemperature()>jarTemperature){
//                    log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo());
                    continue;
                }
                BasJar basJarOther = basJarMapper.selectById(jarProtocolOther.getJarNo());
                if (Cools.isEmpty(basJarOther)){
//                    log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo());
                    continue;
                }
                if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 && jarProtocol.isLeftDoor() && jarProtocol.isRightDoor()
                        && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0
                ){
                    jarProtocol = jarProtocolOther;
                    signOther = true;
                    break;
                }
            }
            if (signOther){
            if (staProtocolRGV.rgvBoolean(1) && staProtocolRGVOther.rgvBoolean(1)){ //临时
//            if ( staProtocolRGVOther.rgvBoolean(1)){
                if (staProtocolRGV.getNowRow() != staProtocolRGVOther.getNowRow()){
                    //移走  == > 2
                    if (!jarRgvMoveTake(wrkMastExecute,2)){
@@ -7568,7 +7601,7 @@
                        if (wrkMastExecute.getIoType()==10){//10:A=>B
                            if (jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),1,SteStatusType.IDLE,true)){
                                //调车  == > 移动
                                if (!jarSteTake(wrkMastExecute,SteLocaType.POINT20.id,SteLocaType.POINT23.id,SteTaskModeType.STE_MOVE_14,false,wrkMastExecute.getJarId())){
                                    if (!jarSteTake(wrkMastExecute,SteLocaType.POINT20.id,SteLocaType.POINT23.id,SteTaskModeType.STE_MOVE_14,false,jarProtocol.getJarNo())){
                                    log.error("穿梭板Ste命令下发失败,ste号={},任务数据={},硫化罐数据={},sign={}",
                                            wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign);
                                }
@@ -7589,7 +7622,7 @@
                        } else {//11:B=>A
                            if (jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.IDLE,false)){
                                //调车  == > 移动
                                if (!jarSteTake(wrkMastExecute,SteLocaType.POINT23.id,SteLocaType.POINT20.id,SteTaskModeType.STE_MOVE_14,false,wrkMastExecute.getJarId())){
                                    if (!jarSteTake(wrkMastExecute,SteLocaType.POINT23.id,SteLocaType.POINT20.id,SteTaskModeType.STE_MOVE_14,false,jarProtocol.getJarNo())){
                                    log.error("穿梭板Ste命令下发失败,ste号={},任务数据={},硫化罐数据={},sign={}",
                                            wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign);
                                }
@@ -7611,7 +7644,7 @@
                    } else {
                        //调车  == > endRow
                        if (!jarRgvMoveTake(wrkMastExecute,SteAndJarUtil.getRgvJarNowRow(wrkMastExecute.getJarId()))){
                            if (!jarRgvMoveTake(wrkMastExecute,SteAndJarUtil.getRgvJarNowRow(jarProtocol.getJarNo()))){
                            log.error("平衡车RGV命令下发失败,rgv号={},任务数据={},硫化罐数据={},sign={}",
                                    wrkMastExecute.getJarId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign);
                        }
@@ -7629,6 +7662,8 @@
                log.error("jarWrkMastExecuteActionExecute1===>执行异常===》RGV不满足条件,等待===》异常数据:BasJar:"+ JSON.toJSONString(basJar.getEnterRgvNo())+";WrkMastExecute:"+JSON.toJSONString(wrkMastExecute));
                return false;
            }
            }
        } catch (Exception e){
            log.error("jarWrkMastExecuteActionExecute1任务执行下发异常==》wrkMastExecute={},异常原因={}",wrkMastExecute,e.getMessage());
        }