whycq
2024-11-21 c370397fe6c7552bb63f2580233c4b233f0ff56c
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -225,7 +225,7 @@
                    WrkMast checkPick = wrkMastService.selectOne(new EntityWrapper<WrkMast>()
                            .eq("barcode", barcode)
                            .in("io_type", 107,103,57,53));
                            .in("io_type", 107,103,104,57,53));
                    if (!Cools.isEmpty(checkPick)) {
                        continue;
                    } else {
@@ -450,7 +450,14 @@
                //任务号如果在工作档中存在,就不用去判断条码
                if(Cools.isEmpty(wrkMast1)) {
//                    WrkMast mast = wrkMastMapper.selectPickStep(barcode);
//                    if (Cools.isEmpty(mast)) {
//                        break;
//                    }
                    if (!Cools.isEmpty(barcode)) {
//                    log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode);
                        if ("NG".endsWith(barcode) || "NoRead".equals(barcode) && staProtocol.isPakMk()) {
                            if (!staProtocol.isLoading()) {
@@ -507,27 +514,31 @@
                            || Cools.isEmpty(wrkMast.getStaNo()) || Cools.isEmpty(wrkMast.getSourceStaNo())) {
                        continue;
                    }
                    LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("barcode", barcode));
                    if (Cools.isEmpty(locMast1)) {
                        continue;
                    } else {
                        if (locMast1.getLocType1().equals((short)2)) {
                            if (staProtocol.isWeight()) {
                                staProtocol.setWorkNo(wrkNo);
                                wrkNo++;
                                staProtocol.setStaNo(pickSta.getBackSta().shortValue());
                                devpThread.setPakMk(staProtocol.getSiteId(), false);
                                MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                                // led 异常显示
                                if (ledThread != null) {
                                    String errorMsg = "并板入库重量大于库位重量,请重新调整";
                                    News.error(methodName + ":并板入库重量大于库位重量,请重新调整");
                                    MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg));
//                    如果是并板入库
                    if (wrkMast.getIoType() == 104) {
                        LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("barcode", barcode));
                        if (Cools.isEmpty(locMast1)) {
                            continue;
                        } else {
                            if (locMast1.getLocType1().equals((short)2)) {
                                if (staProtocol.isWeight()) {
                                    staProtocol.setWorkNo(wrkNo);
                                    wrkNo++;
                                    staProtocol.setStaNo(pickSta.getBackSta().shortValue());
                                    devpThread.setPakMk(staProtocol.getSiteId(), false);
                                    MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                                    // led 异常显示
                                    if (ledThread != null) {
                                        String errorMsg = "并板入库重量大于库位重量,请重新调整";
                                        News.error(methodName + ":并板入库重量大于库位重量,请重新调整");
                                        MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg));
                                    }
                                    continue;
                                }
                                continue;
                            }
                        }
                    }
                    // 拣、盘、并 作业站转换
@@ -1221,6 +1232,7 @@
//                    continue;
                }
                // 判断堆垛机出库站状态
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                        && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                    // 命令下发区 --------------------------------------------------------------------------