#
luxiaotao1123
2020-08-13 0af65ec13ae4f3c880253586feb99b238df84d66
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -138,8 +138,8 @@
                    // 更新站点信息 且 下发plc命令
                    barcodeThread.setBarcode("");
                    staProtocol.setWorkNo(workNo);
                    staProtocol.setStaNo(startupDto.getStaNo());
                    staProtocol.setWorkNo((short) workNo);
                    staProtocol.setStaNo(startupDto.getStaNo().shortValue());
                    staProtocol.setPakMk(false);
                    staProtocol.setInreq1(false);
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(4, staProtocol));
@@ -169,7 +169,7 @@
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInreq1()
                    && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()){
                    WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo());
                    WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo().intValue());
                    if (wrkMast == null) {
                        // 无拣料数据
                        continue;
@@ -217,8 +217,8 @@
                    }
                    // 更新站点信息 且 下发plc命令
                    staProtocol.setWorkNo(wrkMast.getWrkNo());
                    staProtocol.setStaNo(wrkMast.getStaNo());
                    staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue());
                    staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
                    staProtocol.setPakMk(false);
                    staProtocol.setInreq1(false);
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(4, staProtocol));
@@ -281,8 +281,8 @@
                    }
                    // 2.下发站点信息
                    staProtocol.setWorkNo(wrkMast.getWrkNo());
                    staProtocol.setStaNo(wrkMast.getStaNo());
                    staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue());
                    staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
                    if (!MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(4, staProtocol))) {
                        throw new CoolException("更新plc站点信息失败");
                    }
@@ -354,7 +354,7 @@
                continue;
            }
            // 获取工作状态为2(设备上走)的入库工作档
            WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo());
            WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue());
            if(null == wrkMast) {
                log.error("查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
                continue;