#
whycq
2024-04-10 d0aaebf41f068cea51c9014dee53e2ca4aeb2bec
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -179,16 +179,22 @@
                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
                        News.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode);
                        //条码为空或者不符合,退库到172站点
//                        staProtocol.setWorkNo((short)9999);
//                        staProtocol.setStaNo((short)172);
//                        devpThread.setPakMk(staProtocol.getSiteId(), false);
//                        boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
//                        if (!result) {
//                            throw new CoolException("更新plc站点信息失败");
//                        }
                        staProtocol.setWorkNo(wrkNo);
                        staProtocol.setStaNo(inSta.getBackSta().shortValue());
                        wrkNo++;
                        devpThread.setPakMk(staProtocol.getSiteId(), false);
                        boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                        if (!result) {
                            throw new CoolException("更新plc站点信息失败");
                        }
                        continue;
                    }
                    //判断101和104是否是拣料、并板、盘点再入库   设备暂不支持101、104站盘点/拣料入库
                    WrkMast wrkMast1=wrkMastMapper.selectpj(inSta.getStaNo(),barcode);
                    if( !Cools.isEmpty(barcode)&&!Cools.isEmpty(wrkMast1)){
                        log.error("101或104拣料、并板、盘点再入库", wrkMast1.getWrkNo());
                        continue;
                    }
                    // 判断重复工作档
                    WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode);
                    if (wrkMast != null) {
@@ -421,7 +427,7 @@
                if (!Cools.isEmpty(barcode)) {
//                    log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode);
                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode) ) {
                        if (!staProtocol.isLoading()) {
                            continue;
                        }