#
TQS
2022-11-22 13c2b426704d4ec12e4c263d054cec2f1416be39
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -920,6 +920,7 @@
                        || Utils.getLev(wrkMast.getSourceLocNo()) != Utils.getLev(one.getLocNo()))){
                    continue;
                }
                log.info("");
            }
            //出库库位不是最外层库位,判断浅库位组是否都为空,或存在库位移转任务
@@ -1068,6 +1069,12 @@
                            SteProtocol steProtocol = steThread.getSteProtocol();
                            if (steProtocol == null) { continue; }
                            if (steProtocol.isIdle()) {
                                //小车只能绑定一笔作业中任务
                                WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
                                if(wrkMast1 != null){
                                    continue;
                                }
                                // 命令下发区 --------------------------------------------------------------------------
                                SteCommand steCommand = new SteCommand();
@@ -1260,6 +1267,12 @@
                    SteProtocol steProtocol = steThread.getSteProtocol();
                    if (steProtocol == null) { return; }
                    if (steProtocol.isIdle()) {
                        //小车只能绑定一笔作业中任务
                        WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
                        if(wrkMast1 != null){
                            return;
                        }
                        // 命令下发区 --------------------------------------------------------------------------
                        SteCommand steCommand = new SteCommand();
@@ -1688,6 +1701,12 @@
                    if (steProtocol == null) { return; }
                    if (steProtocol.isIdle()) {
                        //小车只能绑定一笔作业中任务
                        WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
                        if(wrkMast1 != null){
                            return;
                        }
                        // 命令下发区 --------------------------------------------------------------------------
                        SteCommand steCommand = new SteCommand();
                        steCommand.setSteNo(steNo); // 穿梭车编号
@@ -1883,6 +1902,12 @@
        if (steProtocol == null) { return; }
        if (steProtocol.isIdle()) {
            //小车只能绑定一笔作业中任务
            WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
            if(wrkMast1 != null){
                return;
            }
            // 命令下发区 --------------------------------------------------------------------------
            SteCommand steCommand = new SteCommand();
            steCommand.setSteNo(steNo); // 穿梭车编号
@@ -1896,6 +1921,7 @@
            if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) {
                log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand));
            } else {
                log.error("穿梭车命令下发成功让小车从 远点 ====>> 待机位,绑定穿梭车,IoType={}, 穿梭车号={},任务数据={}", wrkMast.getIoType(), steNo, JSON.toJSON(steCommand));
                // 修改工作档状态 绑定穿梭车
                wrkMast.setSteNo(steNo);
                wrkMast.setModiTime(new Date());
@@ -1914,6 +1940,12 @@
        if (!basSteService.updatePakMk(steNo, "Y")) {
            log.error("修改穿梭车作业状态 失败!!,穿梭车={}", steNo);
            return;
        }
        //小车只能绑定一笔作业中任务
        WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
        if(wrkMast1 != null){
            return;
        }
@@ -1950,6 +1982,12 @@
        if (steProtocol == null) { return; }
        if (steProtocol.isIdle()) {
            //小车只能绑定一笔作业中任务
            WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
            if(wrkMast1 != null){
                return;
            }
            // 命令下发区 --------------------------------------------------------------------------
            SteCommand steCommand = new SteCommand();
            steCommand.setSteNo(steNo); // 穿梭车编号
@@ -1964,7 +2002,7 @@
            if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) {
                log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand));
            } else {
                log.info("穿梭车命令下发成功(让小车从远点==>>移动到近点),穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand));
                log.info("穿梭车命令下发成功(让小车从远点==>>移动到近点),IoType={}, 穿梭车号={},任务数据={}", wrkMast.getIoType(), steNo, JSON.toJSON(steCommand));
                // 修改工作档状态 绑定穿梭车
                wrkMast.setSteNo(steNo);
                wrkMast.setModiTime(new Date());
@@ -1986,6 +2024,12 @@
        if (steProtocol == null) { return; }
        if (steProtocol.isIdle()) {
            //小车只能绑定一笔作业中任务
            WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo);
            if(wrkMast1 != null){
                return;
            }
            // 命令下发区 --------------------------------------------------------------------------
            SteCommand steCommand = new SteCommand();
            steCommand.setSteNo(steNo); // 穿梭车编号