yxFwq
2024-11-24 f3de21a928fd73a1c9f66a7fe4d24afb1c9916af
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -61,6 +61,8 @@
//    private static final Integer jarMaxLoc1 = 7;
    private static  Integer jarMaxLoc = 0;
//    private static  Integer signBigTurn = 0;
//    private static  Integer signSmallTurn = 0;
    private static final Float jarTemperature = 50F;
    @Autowired
    private CommonService commonService;
@@ -3098,6 +3100,10 @@
            if (wrkMast == null) {
                continue;
            }
//            if (wrkMast.getStaNoSign().equals(signBigTurn)){
//                continue;
//            }
            crnStation = crnStation1;
@@ -3112,12 +3118,30 @@
                continue;
            }
            if (wrkMast.getStaNo()>300){
                DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1);
                StaProtocol staProtocolEnt = devpThread.getStation().get(212);
                if (staProtocolEnt.isLoading() || staProtocolEnt.getWorkNo()!=0){
            if (wrkMast.booleanStaNoSign()){
                RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("LineUp"+wrkMast.getStaNo());
                if (Cools.isEmpty(rgvOneSign)){
                    continue;
                }
                if (rgvOneSign.getRgvOneSign()>=2){
                    continue;
                }
//                int wrkCount = wrkMastMapper.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).gt("sta_no", 309).lt("sta_no", 314).gt("wrk_sts",11L));
//                if (wrkCount>=12){
//                    continue;
//                }
//                RgvOneSign bigTurn = rgvOneSignMapper.selectOneSign("bigTurn");
//                if (Cools.isEmpty(bigTurn)){
//                    continue;
//                }
//                if (bigTurn.getRgvOneSign()>13){
//                    continue;
//                }
//                DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1);
//                StaProtocol staProtocolEnt = devpThread.getStation().get(wrkMast.getStaNoBying());
//                if (staProtocolEnt.isLoading() || staProtocolEnt.getWorkNo()!=0){
//                    continue;
//                }
            }
            // 工作档状态判断
@@ -3338,6 +3362,10 @@
//                }
            }
        }
//        signBigTurn++;
//        if (signBigTurn > 2){
//            signBigTurn = 0;
//        }
    }
@@ -5116,16 +5144,17 @@
                                break;
                            }
                            BasJar basJar = basJarMapper.selectById(jarSlave.getId());
                            BasJar basJarOther = basJarMapper.selectById(jarSlave.getJarOtherId());
                            jarMaxLoc = basJar.getJarCount();
                            if (jarMaxLoc == 0) {
                            if (jarMaxLoc == 0 || basJarOther.getJarCount() == 0) {
                                break;
                            }
                            int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 11));
                            int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 6));
                            if (count>0){
                                break;
                            }
                            if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){
                                if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 3).equals(jarMaxLoc)){
                                if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 3).equals(basJarOther.getJarCount())){
                                    JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
                                    JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
                                    if (jarOtherProtocol == null) {
@@ -5211,7 +5240,7 @@
            if (jarProtocol.modeType != JarModeType.AUTO){
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -5241,7 +5270,7 @@
            //自动、空闲、右门关闭、   Other左门关闭
            if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
                    && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0){
                if (jarProtocol.statusType != JarStatusType.SOS){
                if (jarProtocol.statusType != JarStatusType.SOS && jarProtocol.statusType != JarStatusType.SOS2){
                    log.error("Jar任务创建===》执行===>行={}",4537);
                    BasJarMast basJarMast = new BasJarMast(basJar, wrkMast, jarLocDigit);
                    basJarMast.setJarEnterStaNo(staNo);//入硫化罐站点
@@ -5329,11 +5358,11 @@
                case 3:
                case 4:
                    signExecute = jarWrkMastExecuteGenerateJar(signExecute,sign);//硫化罐任务
//                case 5:
//                    signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//冷却槽取输送线
                default:
//                    jarWrkMastExecuteGenerateSte(signExecute,sign);//小车移动
                case 5:
                    signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//冷却槽取输送线
                default:
                    jarWrkMastExecuteGenerateSte(signExecute,sign);//小车移动
//                    signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//冷却槽取输送线
            }
            if (!signExecute[0] && !signExecute[1]){
@@ -5458,13 +5487,13 @@
                }
                //门作业  无
                //自动、空闲、右门关闭、   Other左门关闭
                if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
                        && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0){
                if (jarProtocol.isAutoing() && jarProtocol.jarErr==0){
                    if (jarWrkMastExecuteGenerate5(jarSlave,sign)){
                        signExecute[jarSlave.getId()-5] = true;
                        return signExecute;
                        //冷却完成上输送线
                    }
                    continue;
                }
            } catch (Exception e){
                log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage());
@@ -5473,65 +5502,65 @@
        return signExecute;
    }
//    public synchronized boolean[] jarWrkMastExecuteGenerateSte(boolean[] signExecute,Integer sign) {
//        for (JarSlave jarSlave : slaveProperties.getJar()) {
//            if (jarSlave.getId()<5){
//                continue;
//            }
//            try{
//                if (signExecute[jarSlave.getId()-5]){
//                    continue;
//                }
//                if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){
//                    continue;
//                }
//
//                // 获取硫化罐信息
//                JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId());
//                JarProtocol jarProtocol = jarThread.getJarProtocol();
//                if (jarProtocol == null) {
//                    continue;
//                }
//                if (jarProtocol.modeType != JarModeType.AUTO){
//                    continue;
//                }
//                if (jarProtocol.getJarTemperature()>jarTemperature){
//                    log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo());
//                    continue;
//                }
//
//                JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
//                JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
//                if (jarOtherProtocol == null) {
//                    continue;
//                }
////                    if (jarOtherProtocol.modeType != JarModeType.AUTO){
////                        continue;
////                    }
//
//                BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo());
//                if (Cools.isEmpty(basJar)){
//                    log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo());
//                    continue;
//                }
//                //门作业  无
//                //自动、空闲、右门关闭、   Other左门关闭
//                if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
//                        && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0){
//                    switch (sign){
//                        case 5:
//                            if (jarWrkMastExecuteGenerate5(jarSlave,sign)){
//                                signExecute[jarSlave.getId()-5] = true;
//                                break;
//                            }
    public synchronized boolean[] jarWrkMastExecuteGenerateSte(boolean[] signExecute,Integer sign) {
        for (JarSlave jarSlave : slaveProperties.getJar()) {
            if (jarSlave.getId()<5){
                continue;
            }
            try{
                if (signExecute[jarSlave.getId()-5]){
                    continue;
                }
                if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){
                    continue;
                }
                // 获取硫化罐信息
                JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId());
                JarProtocol jarProtocol = jarThread.getJarProtocol();
                if (jarProtocol == null) {
                    continue;
                }
                if (jarProtocol.modeType != JarModeType.AUTO){
                    continue;
                }
                if (jarProtocol.getJarTemperature()>jarTemperature){
                    log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo());
                    continue;
                }
                JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
                JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
                if (jarOtherProtocol == null) {
                    continue;
                }
//                    if (jarOtherProtocol.modeType != JarModeType.AUTO){
//                        continue;
//                    }
//                }
//            } catch (Exception e){
//                log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage());
//            }
//        }
//        return signExecute;
//    }
                BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo());
                if (Cools.isEmpty(basJar)){
                    log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo());
                    continue;
                }
                //门作业  无
                //自动、空闲、右门关闭、   Other左门关闭
                if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
                        && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0){
                    switch (sign){
                        case 5:
                            if (jarWrkMastExecuteGenerate5(jarSlave,sign)){
                                signExecute[jarSlave.getId()-5] = true;
                                break;//出硫化罐 ===》 入冷却槽
                            }
                    }
                }
            } catch (Exception e){
                log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage());
            }
        }
        return signExecute;
    }
    /**
     *  JarWrkMastExecute任务创建   //完成
@@ -5590,7 +5619,7 @@
                        if (jarProtocol.modeType != JarModeType.AUTO){
                            return false;
                        }
                        if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){
                        if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                            return false;
                        }
                        if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -5698,7 +5727,7 @@
                    return false;
                }
                if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){
                if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                    log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                    return false;
                }
@@ -5724,7 +5753,7 @@
                }
                //门作业  无
                if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS && jarProtocol.jarErr==0
                if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS && jarProtocol.statusType!= JarStatusType.SOS2 && jarProtocol.jarErr==0
                        && jarProtocol.isRightDoor() && jarProtocol.isLeftDoor()
                        && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0){
                    //关进料门
@@ -5756,11 +5785,6 @@
            List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
                add(6);
            }});
//            if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=0
//                    && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=jarMaxLoc
//                    && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=jarMaxLoc*2){
//                return false;
//            }
            if (basJarMastList.isEmpty()){
                return false;
            }
@@ -5792,7 +5816,7 @@
                    return false;
                }
                if (jarProtocol.statusType .equals(JarStatusType.SOS)){
                if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                    log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                    return false;
                }
@@ -5822,6 +5846,15 @@
                        log.error("JarWrkMastExecute任务创建===>执行异常===》异常数据:BasJar:"+ JSON.toJSONString(basJar)+";BasJarMast:"+JSON.toJSONString(basJarMastSign));
                    }
                    return true;
                } else if (jarProtocol.isAutoing() && jarProtocol.statusType != JarStatusType.SOS && jarProtocol.statusType != JarStatusType.SOS2
                        && jarProtocol.statusType != JarStatusType.WAITING2 && jarProtocol.jarErr==0
                            && jarProtocol.isLeftDoor() && jarProtocol.isRightDoor()
                            && jarProtocol.leftDoorOpen==0  && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0  && jarProtocol.rightDoorClose==0){
                        Integer integer = basJarMastService.updateStatus(jarProtocol.getJarNo(), 6, 8);
                        if (basJarMastList.size()!=integer){
                            log.error("{}号硫化罐硫化完成后开门完成修改硫化档案状态结果数量不一致!!!查询资料数量={},更新返回数量={}",jarProtocol.getJarNo(),basJarMastList.size(),integer);
                        }
                        return true;
                }
                return false;
            } else {
@@ -5890,7 +5923,7 @@
                    return false;
                }
                if (jarProtocol.statusType .equals(JarStatusType.SOS)){
                if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                    log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                    return false;
                }
@@ -5908,7 +5941,24 @@
                if (basJarMastList10.size()==jarMaxLoc){
                    return false;
                }
                if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),4)!=0 && !basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 4).equals(jarMaxLoc)){
                BasJar basJarOther = basJarMapper.selectById(jarSlave.getJarOtherId());
                if (Cools.isEmpty(basJarOther)){
                    log.error("{}号硫化罐查询设备档案无信息!!!",jarSlave.getJarOtherId());
                    return false;
                }
                if (basJarOther.getJarCount() == 0) {
                    return false;
                }
                List<BasJarMast> basJarMastListOther = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
                    add(8);
                }});
                if (!basJarMastListOther.isEmpty() && basJarMastListOther.size() < basJarOther.getJarCount()){
                    return false;
                }
                if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),4)!=0 && !basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 4).equals(basJarOther.getJarCount() )){
                    return false;
                }
@@ -6441,7 +6491,7 @@
            if (jarProtocol.modeType != JarModeType.AUTO){
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -6569,7 +6619,7 @@
            if (jarProtocol.modeType != JarModeType.AUTO){
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -6697,7 +6747,7 @@
            if (jarProtocol.modeType != JarModeType.AUTO){
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -6813,7 +6863,7 @@
            if (jarProtocol.modeType != JarModeType.AUTO){
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -6929,7 +6979,7 @@
            if (jarProtocol.modeType != JarModeType.AUTO){
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -7065,7 +7115,7 @@
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -7537,7 +7587,7 @@
                return false;
            }
            if (jarProtocol.statusType .equals(JarStatusType.SOS)){
            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                return false;
            }
@@ -7589,7 +7639,7 @@
                    continue;
                }
                if (jarProtocolOther.statusType .equals(JarStatusType.SOS)){
                if (jarProtocolOther.statusType .equals(JarStatusType.SOS)  || jarProtocol.statusType .equals(JarStatusType.SOS2)){
//                    log.error("{}号硫化罐查询设备正在硫化中,任务异常!!!",jarProtocol.getJarNo());
                    continue;
                }
@@ -7867,26 +7917,18 @@
        try{
            switch (sign){
                case 1:
                case 5:
                case 9:
                    if (jarWrkMastExecuteGenerateSteComplete(sign)){
                        break;
                    }
                case 2:
                case 6:
                case 10:
                    if (jarWrkMastExecuteGenerateJarComplete(sign)){
                        break;
                    }
                case 3:
                case 7:
                case 11:
                    if (jarWrkMastExecuteGenerateRgvComplete1(sign)){
                        break;
                    }
                case 4:
                case 8:
                case 12:
                    if (jarWrkMastExecuteGenerateRgvComplete2(sign)){
                        break;
                    }
@@ -8099,7 +8141,7 @@
                        && (jarProtocol.leftDoorClose==2  || jarProtocol.rightDoorClose==2)){
                    if (jarProtocol.getJarTemperature()>jarTemperature){
                        log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo());
                        return false;
                        continue;
                    }
                    WrkMastExecute wrkMastExecuteSou = new WrkMastExecute();
                    wrkMastExecuteSou.setWrkSts(3);
@@ -8429,6 +8471,9 @@
                        add(5);
                        add(11);
                        add(17);
                        add(99);
                        add(100);
                        add(999);
                    }});
                    if(!basJarMastList.isEmpty()){
                        continue;
@@ -8479,7 +8524,7 @@
                            if (jarProtocol.modeType != JarModeType.AUTO){
                                continue;
                            }
                            if (jarProtocol.statusType .equals(JarStatusType.SOS)){
                            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                                continue;
                            }
                            if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -8543,6 +8588,9 @@
                        add(5);
                        add(11);
                        add(17);
                        add(99);
                        add(100);
                        add(999);
                    }});
                    if(basJarMastList.isEmpty()){
                        if (wrkMastExecuteService.selectNoStartCharge(steSlave.getId())==0){
@@ -8567,7 +8615,7 @@
                                        if (jarProtocol.modeType != JarModeType.AUTO){
                                            continue;
                                        }
                                        if (jarProtocol.statusType .equals(JarStatusType.SOS)){
                                        if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                                            continue;
                                        }
                                        if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -8611,6 +8659,11 @@
                        if (!jarSteTake(wrkMastExecuteByCharge,SteLocaType.POINT20.id,SteLocaType.POINT20.id,SteTaskModeType.CLOSE_CHARGE,true,wrkMastExecuteByCharge.getJarId())){
                            log.error("穿梭板Ste命令下发失败,ste号={},任务数据={}",
                                    wrkMastExecuteByCharge.getSteId(), JSON.toJSONString(wrkMastExecuteByCharge));
                        }
                        try{
                            Thread.sleep(1000);
                        } catch (Exception e){
                        }
                        wrkMastExecuteByCharge.setWrkType(2);
                        wrkMastExecuteByCharge.setWrkSts(100);
@@ -8670,13 +8723,44 @@
            }
        }
        try{
            for (int idi = 1;idi<5;idi++){
                LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, idi);
                if (ledThread != null) {
                    ErrMsg errMsg1 = new ErrMsg();
                    errMsg1.setErrMsg("测试:"+idi);
                    errMsg1.setArea("1");
                    MessageQueue.offer(SlaveType.Led, idi, new Task(5, errMsg1));
                } try {
                    Thread.sleep(500);
                } catch (Exception e){
                }
            }
            LedThread ledThread3 = (LedThread) SlaveConnection.get(SlaveType.Led, 3);
            if (ledThread3 != null) {
                ErrMsg errMsg1 = new ErrMsg();
                errMsg1.setErrMsg("测试测试测试测试测试测试测试测试测试测试测试测试测试:"+3);
                errMsg1.setArea("1");
                MessageQueue.offer(SlaveType.Led, 3, new Task(5, errMsg1));
            } try {
                Thread.sleep(500);
            } catch (Exception e){
            }
        } catch (Exception e){
        }
    }
    public synchronized Integer jarGetStartStaNo(Integer staNo) {
        try {
            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(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);
            }};
@@ -8753,7 +8837,7 @@
                if (jarProtocol.modeType != JarModeType.AUTO){
                    continue;
                }
                if (jarProtocol.statusType .equals(JarStatusType.SOS)){
                if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                    continue;
                }
                if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -8784,7 +8868,7 @@
                    DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 2);
                    StaProtocol staProtocolEnt = devpThread.getStation().get(staNoEnt);
                    if (staProtocolEnt == null || (staProtocolEnt.isLoading() && staProtocolEnt.getWorkNo()==0)){
                        log.error("站点异常,计数加一,站点号:"+staNoEnt);
//                        log.error("站点异常,计数加一,站点号:"+staNoEnt);
                        count++;
                    } else if (staProtocolEnt != null && staProtocolEnt.getWorkNo()!=0 && !wrkNoList.contains(staProtocolEnt.getWorkNo())){
                        if (staProtocolEnt.getStaNo().equals(basJar.getEntStaNo$())){