#
yxFwq
2025-05-10 3b604eb218a3b167144cc6e5d9c86cd95e16157c
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1953,13 +1953,15 @@
                } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) {
                    // 此标记避免多次执行移库任务
                    if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
                        wrkMast.setUpdMk("Y");
                        wrkMast.setIoPri(14D);
                        wrkMastMapper.updateById(wrkMast);
                        // 生成工作档,将浅库位移转到新的库位中
                        moveLocForDeepLoc(slave, shallowLoc);
//                        boolean moveLocForDeepLoc = moveLocForDeepLoc(slave, shallowLoc);
                        // 生成工作档、改变浅库位的源库/目标库 库位状态、下发堆垛机命令(立马执行)
//                        moveLocForDeepLocPakin(slave, shallowLoc, wrkMast);
                        if (moveLocForDeepLoc(slave, shallowLoc)){
                            wrkMast.setUpdMk("Y");
                            wrkMast.setIoPri(14D);
                            wrkMastMapper.updateById(wrkMast);
                        }
                    }
                    continue;
                } else if (shallowLoc.getLocSts().equals("Q")) {
@@ -2125,11 +2127,16 @@
                } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) {
                    // 此标记避免多次执行移库任务
                    if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
                        wrkMast.setUpdMk("Y");
                        wrkMast.setIoPri(14D);
                        wrkMastMapper.updateById(wrkMast);
                        // 生成工作档,将浅库位移转到新的库位中
                        moveLocForDeepLoc(slave, shallowLoc);
                        if (moveLocForDeepLoc(slave, shallowLoc)){
                            wrkMast.setUpdMk("Y");
                            wrkMast.setIoPri(14D);
                            wrkMastMapper.updateById(wrkMast);
                        }
//                        wrkMast.setUpdMk("Y");
//                        wrkMast.setIoPri(14D);
//                        wrkMastMapper.updateById(wrkMast);
//                        // 生成工作档,将浅库位移转到新的库位中
//                        moveLocForDeepLoc(slave, shallowLoc);
                        // 生成工作档、改变浅库位的源库/目标库 库位状态、下发堆垛机命令(立马执行)
//                        moveLocForDeepLocPakin(slave, shallowLoc, wrkMast);
                    }
@@ -2577,11 +2584,16 @@
                } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) {
                    // 此标记避免多次执行移库任务
                    if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
                        wrkMast.setUpdMk("Y");
                        wrkMast.setIoPri(14D);
                        wrkMastMapper.updateById(wrkMast);
                        // 生成工作档,将浅库位移转到新的库位中
                        moveLocForDeepLoc(slave, shallowLoc);
                        if (moveLocForDeepLoc(slave, shallowLoc)){
                            wrkMast.setUpdMk("Y");
                            wrkMast.setIoPri(14D);
                            wrkMastMapper.updateById(wrkMast);
                        }
//                        wrkMast.setUpdMk("Y");
//                        wrkMast.setIoPri(14D);
//                        wrkMastMapper.updateById(wrkMast);
//                        // 生成工作档,将浅库位移转到新的库位中
//                        moveLocForDeepLoc(slave, shallowLoc);
                        // 生成工作档、改变浅库位的源库/目标库 库位状态、下发堆垛机命令(立马执行)
//                        moveLocForDeepLocPakin(slave, shallowLoc, wrkMast);
                    }
@@ -2708,10 +2720,15 @@
//                            if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
//                                || Cools.isEmpty(waitWrkMast)) {
                            if (Cools.isEmpty(waitWrkMast)) {
                                wrkMast.setUpdMk("Y");
                                wrkMastMapper.updateById(wrkMast);
                                // 生成工作档,将浅库位移转到新的库位中
                                moveLocForDeepLoc(slave, shallowLoc);
                                if (moveLocForDeepLoc(slave, shallowLoc)){
                                    wrkMast.setUpdMk("Y");
//                                    wrkMast.setIoPri(14D);
                                    wrkMastMapper.updateById(wrkMast);
                                }
//                                wrkMast.setUpdMk("Y");
//                                wrkMastMapper.updateById(wrkMast);
//                                // 生成工作档,将浅库位移转到新的库位中
//                                moveLocForDeepLoc(slave, shallowLoc);
                            }
                            log.error("{}任务出库失败,浅库位堵塞!浅库位号:{}", wrkMast.getWrkNo(), shallowLocNo);
                            continue;
@@ -2879,10 +2896,21 @@
//                            if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
//                                || Cools.isEmpty(waitWrkMast)) {
                        if (Cools.isEmpty(waitWrkMast)) {
                            wrkMast.setUpdMk("Y");
                            wrkMastMapper.updateById(wrkMast);
//                            wrkMast.setUpdMk("Y");
//                            wrkMastMapper.updateById(wrkMast);
                            // 生成工作档,将浅库位移转到新的库位中
                            moveLocForDeepLoc(slave, shallowLoc);
                            try{
                                if (moveLocForDeepLoc(slave, shallowLoc)){
                                    wrkMast.setUpdMk("Y");
//                                    wrkMast.setIoPri(14D);
                                    wrkMastMapper.updateById(wrkMast);
                                }
//                                moveLocForDeepLoc(slave, shallowLoc);
                            } catch (Exception e){
                                log.error("{}任务出库失败,浅库位堵塞!异常", wrkMast.getWrkNo(), e);
                                log.error("{}任务出库失败,浅库位堵塞!浅库位号:{}", wrkMast.getWrkNo(), shallowLocNo);
                                continue;
                            }
                        }
                        log.error("{}任务出库失败,浅库位堵塞!浅库位号:{}", wrkMast.getWrkNo(), shallowLocNo);
                        continue;
@@ -3096,6 +3124,13 @@
            }
            Integer turnBigInt = 0;
            if (wrkMast.booleanStaNoSign() && wrkMast.getIoPri()<99D){
                Date now = new Date();
                long differenceInSeconds =  now.getTime() - wrkMast.getModiTime().getTime();
                if (differenceInSeconds<=2000){
                    continue;
                }
            }
//            if (wrkMast.booleanStaNoSign()){
//                RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("LineUp"+wrkMast.getStaNo());
//                if (Cools.isEmpty(rgvOneSign)){
@@ -3231,10 +3266,15 @@
//                            if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
//                                || Cools.isEmpty(waitWrkMast)) {
                        if (Cools.isEmpty(waitWrkMast)) {
                            wrkMast.setUpdMk("Y");
                            wrkMastMapper.updateById(wrkMast);
                            // 生成工作档,将浅库位移转到新的库位中
                            moveLocForDeepLoc(slave, shallowLoc);
                            if (moveLocForDeepLoc(slave, shallowLoc)){
                                wrkMast.setUpdMk("Y");
//                                wrkMast.setIoPri(14D);
                                wrkMastMapper.updateById(wrkMast);
                            }
//                            wrkMast.setUpdMk("Y");
//                            wrkMastMapper.updateById(wrkMast);
//                            // 生成工作档,将浅库位移转到新的库位中
//                            moveLocForDeepLoc(slave, shallowLoc);
                        }
                        log.error("{}任务出库失败,浅库位堵塞!浅库位号:{}", wrkMast.getWrkNo(), shallowLocNo);
                        continue;
@@ -4632,8 +4672,9 @@
     * 因双深库位阻塞,对浅库位进行移转(立即执行版)
     * tip:同步
     */
    private synchronized void moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc) {
    private synchronized boolean moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc) {
        try {
            log.info("移库:CrnSlave:{}、LocMast:{}",JSON.toJSON(crn),JSON.toJSON(shallowLoc));
            List<Integer> rows = locMastService.queryDistinctRow(crn.getId());
            LocMast loc = null;
            for (Integer row : rows) {
@@ -4676,74 +4717,80 @@
            if (null == loc) {
                log.error("双深库位 --- 浅库位阻塞异常! 待移转浅库位:" + shallowLoc.getLocNo());
                throw new CoolException("双深库位 --- 浅库位阻塞异常! 待移转浅库位:" + shallowLoc.getLocNo());
            }
            // 获取工作号
            int workNo = commonService.getWorkNo(0);
            // 保存工作档
            WrkMast wrkMast = new WrkMast();
            wrkMast.setWrkNo(workNo);
            wrkMast.setIoTime(new Date());
            wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID
            wrkMast.setIoType(11); // 入出库状态: 11.库格移载
            wrkMast.setIoPri(13D);
            wrkMast.setCrnNo(crn.getId());
            wrkMast.setSourceLocNo(shallowLoc.getLocNo()); // 源库位
            wrkMast.setLocNo(loc.getLocNo()); // 目标库位
            wrkMast.setFullPlt(shallowLoc.getFullPlt()); // 满板
            wrkMast.setPicking("N"); // 拣料
            wrkMast.setExitMk("N"); // 退出
            wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 空板
            wrkMast.setBarcode(shallowLoc.getBarcode()); // 托盘码
            wrkMast.setLinkMis("N");
            wrkMast.setAppeTime(new Date());
            wrkMast.setModiTime(new Date());
            int res = wrkMastMapper.insert(wrkMast);
            if (res == 0) {
                throw new CoolException("保存工作档失败");
            }
            // 工作档明细保存
            if (shallowLoc.getLocSts().equals("F")) {
                List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo()));
                for (LocDetl locDetl : locDetls) {
                    WrkDetl wrkDetl = new WrkDetl();
                    wrkDetl.setWrkNo(workNo);
                    wrkDetl.setIoTime(new Date());
                    wrkDetl.setAnfme(locDetl.getAnfme());
                    VersionUtils.setWrkDetl(wrkDetl, locDetl); // 版本控制
                    wrkDetl.setAppeTime(new Date());
                    wrkDetl.setModiTime(new Date());
                    if (!wrkDetlService.insert(wrkDetl)) {
                        throw new CoolException("保存工作档明细失败");
                return false;
//                throw new CoolException("双深库位 --- 浅库位阻塞异常! 待移转浅库位:" + shallowLoc.getLocNo());
            } else {
                try {
                    // 获取工作号
                    int workNo = commonService.getWorkNo(0);
                    // 保存工作档
                    WrkMast wrkMast = new WrkMast();
                    wrkMast.setWrkNo(workNo);
                    wrkMast.setIoTime(new Date());
                    wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID
                    wrkMast.setIoType(11); // 入出库状态: 11.库格移载
                    wrkMast.setIoPri(13D);
                    wrkMast.setCrnNo(crn.getId());
                    wrkMast.setSourceLocNo(shallowLoc.getLocNo()); // 源库位
                    wrkMast.setLocNo(loc.getLocNo()); // 目标库位
                    wrkMast.setFullPlt(shallowLoc.getLocSts().equals("D") ? "N" : "Y"); // 满板
                    wrkMast.setPicking("N"); // 拣料
                    wrkMast.setExitMk("N"); // 退出
                    wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 空板
                    wrkMast.setBarcode(shallowLoc.getBarcode()); // 托盘码
                    wrkMast.setLinkMis("N");
                    wrkMast.setAppeTime(new Date());
                    wrkMast.setModiTime(new Date());
                    int res = wrkMastMapper.insert(wrkMast);
                    if (res == 0) {
                        throw new CoolException("保存工作档失败");
                    }
                    // 工作档明细保存
                    if (shallowLoc.getLocSts().equals("F")) {
                        List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo()));
                        for (LocDetl locDetl : locDetls) {
                            WrkDetl wrkDetl = new WrkDetl();
                            wrkDetl.setWrkNo(workNo);
                            wrkDetl.setIoTime(new Date());
                            wrkDetl.setAnfme(locDetl.getAnfme());
                            VersionUtils.setWrkDetl(wrkDetl, locDetl); // 版本控制
                            wrkDetl.setAppeTime(new Date());
                            wrkDetl.setModiTime(new Date());
                            if (!wrkDetlService.insert(wrkDetl)) {
                                throw new CoolException("保存工作档明细失败");
                            }
                        }
                    }
                    // 修改源库位状态
                    if (shallowLoc.getLocSts().equals("D") || shallowLoc.getLocSts().equals("F")) {
                        shallowLoc.setLocSts("R"); // R.出库预约
                        shallowLoc.setModiTime(new Date());
                        if (!locMastService.updateById(shallowLoc)) {
                            throw new CoolException("更新源库位状态失败");
                        }
                    } else {
                        throw new CoolException("源库位出库失败");
                    }
                    // 修改目标库位状态
                    if (loc.getLocSts().equals("O")) {
                        loc.setLocSts("S"); // S.入库预约
                        loc.setModiTime(new Date());
                        if (!locMastService.updateById(loc)) {
                            throw new CoolException("更新目标库位状态失败");
                        }
                    } else {
                        throw new CoolException("移转失败");
                    }
                } catch (Exception e){
                    log.error("双深库位阻塞,对浅库位进行移转失败", e);
                }
            }
            // 修改源库位状态
            if (shallowLoc.getLocSts().equals("D") || shallowLoc.getLocSts().equals("F")) {
                shallowLoc.setLocSts("R"); // R.出库预约
                shallowLoc.setModiTime(new Date());
                if (!locMastService.updateById(shallowLoc)) {
                    throw new CoolException("更新源库位状态失败");
                }
            } else {
                throw new CoolException("源库位出库失败");
            }
            // 修改目标库位状态
            if (loc.getLocSts().equals("O")) {
                loc.setLocSts("S"); // S.入库预约
                loc.setModiTime(new Date());
                if (!locMastService.updateById(loc)) {
                    throw new CoolException("更新目标库位状态失败");
                }
            } else {
                throw new CoolException("移转失败");
            }
        } catch (Exception e) {
            log.error("双深库位阻塞,对浅库位进行移转失败", e);
            e.printStackTrace();
            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
//            e.printStackTrace();
//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
        }
        return true;
    }
    /**
@@ -5165,7 +5212,7 @@
                                break;
                            }
                            if (count>0){
                                if (jarOtherProtocol.getJarTemperature()<jarTemperature){
                                if (jarOtherProtocol.getJarTemperature()<jarTemperature && jarOtherProtocol.modeType == JarModeType.AUTO){
                                    break;
                                }
                            }
@@ -5176,7 +5223,7 @@
//                                    if (jarOtherProtocol == null) {
//                                        break;
//                                    }
                                    if (jarOtherProtocol.getJarTemperature()>jarTemperature){
                                    if (jarOtherProtocol.getJarTemperature()>jarTemperature || jarOtherProtocol.modeType != JarModeType.AUTO){
                                        log.info("{}号硫化罐查询设备温度过高,等待降温....先执行入罐任务!!!",jarOtherProtocol.getJarNo());
                                    } else {
                                        if (basJarMastService.getJarMastByJarIdCount(jarSlave.getId())>0){
@@ -5892,16 +5939,65 @@
            if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){
                return false;
            }
            List<BasJarMast> basJarMastList1 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
                add(0);add(1);add(2);add(3);
            }});
            if (!basJarMastList1.isEmpty()){
                return false;
            BasJar basJarOther11 = basJarMapper.selectById(jarSlave.getJarOtherId());
            if (!Cools.isEmpty(basJarOther11) && basJarOther11.getJarMode()==2){
                List<BasJarMast> basJarMastList1 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
                    add(0);add(1);add(2);add(3);
                }});
                if (!basJarMastList1.isEmpty()){
                    return false;
                }
                List<BasJarMast> basJarMastList2 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
                    add(8);add(9);add(10);add(11);add(12);
                }});
                if (!basJarMastList2.isEmpty() && basJarMastList2.size()!=basJarOther11.getJarCount()){
                    return false;
                }
            }
            List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
                add(8);
            }});
            if (basJarMastList.isEmpty()){
                return false;
            }
            StaProtocol staProtocolEnd = new StaProtocol();
            staProtocolEnd.setAutoing(false);
            for (DevpSlave devp : slaveProperties.getDevp()) {
                if (devp.getId() == 1){
                    continue;
                }
                // 遍历入库口
                for (DevpSlave.Sta inSta : devp.getOutJarInSta()) {
                    if (jarSlave.getId() == 1 || jarSlave.getId() == 2){
                        if (inSta.getStaNo() == 627){
                            SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
                            StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
                            if (staProtocol == null) {
                                break;
                            }
                            staProtocolEnd = staProtocol;
                            break;
                        }
                    } else if (jarSlave.getId() == 3 || jarSlave.getId() == 4){
                        if (inSta.getStaNo() == 628){
                            SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
                            StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
                            if (staProtocol == null) {
                                break;
                            }
                            staProtocolEnd = staProtocol;
                            break;
                        }
                    }
                }
            }
            if (!staProtocolEnd.isAutoing() || staProtocolEnd.isLoading()){
                return false;
            }
            List<BasJarMast> basJarMastList10 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
@@ -8018,6 +8114,40 @@
                            }
                            break;
                        }
                    } else if (staProtocol.isAutoing()
                            && !staProtocol.isLoading()
                            && staProtocol.getWorkNo() == 0
                            && staProtocol.isPakMk()) {
                        for (DevpSlave.Jar jar : inSta.getJarList()) {
                            SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, jar.getJarNo()<3? 1:2);
                            if (steThread == null) {
                                continue;
                            }
                            SteProtocol steProtocol = steThread.getSteProtocol();
                            if (steProtocol == null) {
                                continue;
                            }
                            if (!Cools.isEmpty(steProtocol.getLocaType()) && !steProtocol.getLocaType().equals(SteLocaType.NONE) && steProtocol.getStatusType().equals(SteStatusType.IDLE)) {
                                // 判断重复工作档
                                List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusListB(jar.getBurial(), new ArrayList<Integer>() {{
                                    add(9);
                                    add(11);
                                }});
                                if (basJarMastList.isEmpty()){
                                    continue;
                                }
                                BasJarMast jarMastByWrkNo = basJarMastList.get(0);
                                WrkMastExecute wrkMastExecute = wrkMastExecuteService.selectOne(new EntityWrapper<WrkMastExecute>().eq("wrk_no", jarMastByWrkNo.getWrkNo()));
                                if (Cools.isEmpty(wrkMastExecute)){
                                    jarMastByWrkNo.setStatus(jarMastByWrkNo.getStatusComplete(6));
                                    if (!basJarMastService.updateById(jarMastByWrkNo)){
                                        log.error("硫化区域分段任务完成异常,BasJarMast={},异常信息={}",JSON.toJSONString(jarMastByWrkNo),"更新basJarMast失败");
//                                    throw new CoolException("更新basJarMast失败");
                                    }
                                }
                                break;
                            }
                        }
                    }
                }
            }
@@ -8047,6 +8177,7 @@
//
//                    }
                    List<WrkMastExecute> wrkMastExecuteByWrkNoList = wrkMastExecuteService.getWrkMastExecuteByWrkNoList(steProtocol.getTaskNo().longValue());
                    steReturn:
                    for (WrkMastExecute wrkMastExecute : wrkMastExecuteByWrkNoList){
                        if (!Cools.isEmpty(wrkMastExecute)){
                            switch (wrkMastExecute.getIoType()){
@@ -8063,12 +8194,14 @@
                                                            wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                                }
//                                                Thread.sleep(500);
                                                return true;
//                                                return true;
                                                break steReturn;
                                            }
                                        }
                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(steProtocol),sign);
                                        return true;
//                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
//                                                wrkMastExecute.getSteId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(steProtocol),sign);
//                                      return true;
                                        break steReturn;
                                    }
                                case 5:
                                    if (wrkMastExecute.getWrkSts()==5){
@@ -8082,12 +8215,14 @@
                                                    log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                            wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                                }
                                                return true;
//                                              return true;
                                                break steReturn;
                                            }
                                        }
                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                        return true;
//                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
//                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
//                                      return true;
                                        break steReturn;
                                    }
                                    continue;
                                case 7:
@@ -8105,12 +8240,14 @@
                                                    log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                            wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                                }
                                                return true;
//                                              return true;
                                                break steReturn;
                                            }
                                        }
                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                        return true;
//                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
//                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
//                                      return true;
                                        break steReturn;
                                    }
                                    continue;
                                case 9:
@@ -8125,17 +8262,17 @@
                                                    log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                            wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                                }
                                                return true;
//                                              return true;
                                                break steReturn;
                                            }
                                        }
                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
//                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
//                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                        continue;
                                    }
                                default: continue;
                            }
                        }
                    }
                }
            }
@@ -8272,7 +8409,7 @@
                            log.error("硫化罐Jar命令下发失败,jar号={},任务数据={},硫化罐数据={},sign={}",
                                    execute.getJarId(), JSON.toJSON(execute), JSON.toJSON(jarProtocol),sign);
                        }
                        return true;
                        continue;
                    }
                    for (WrkMastExecute wrkMastExecute : wrkMastExecuteList){
                        if (wrkMastExecute.getIoType() == 2 || wrkMastExecute.getIoType() == 4){
@@ -8287,7 +8424,7 @@
                                        wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign);
                                return false;
                            }
                            return true;
                            continue;
                        }
                    }
                }
@@ -8863,6 +9000,9 @@
    public synchronized void stackingCompletionDriveTray2() {
        SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 2);
        StaProtocol staProtocol = devpThread.getStation().get(518);
        if (Cools.isEmpty(staProtocol)) {
            return;
        }
        String barcode = staProtocol.getBarcode();
        if (!Cools.isEmpty(barcode)) {
            if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {