#
whycq
2025-05-28 78489da7e2185f53faaec9356fa1a8997cedab70
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -50,6 +50,7 @@
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -154,10 +155,7 @@
                    back = true;
                }
                //拣料、盘点任务,不进入新板入库方法,直接跳出
                if(staProtocol.getWorkNo()>=3001 && staProtocol.getWorkNo()<=6000){
                    continue;
                }
                // 退回
                if (back) {
@@ -180,7 +178,10 @@
                    MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                    MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg));
                }
                //拣料、盘点任务,不进入新板入库方法,直接跳出
                if(staProtocol.getWorkNo()>=3001 && staProtocol.getWorkNo()<=6000){
                    continue;
                }
                // 判断是否满足入库条件
                if (staProtocol.isAutoing()
                        && staProtocol.isLoading()
@@ -225,7 +226,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 {
@@ -249,6 +250,7 @@
                        param.setLocType1(locTypeDto.getLocType1());
                        String response = new HttpHandler.Builder()
                                .setUri(wmsUrl)
                                .setTimeout(30, TimeUnit.SECONDS)
                                .setPath("/rpc/pakin/loc/v1")
                                .setJson(JSON.toJSONString(param))
                                .build()
@@ -450,9 +452,16 @@
                //任务号如果在工作档中存在,就不用去判断条码
                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 ("NG".endsWith(barcode) || "NoRead".equals(barcode)  && staProtocol.isPakMk()) {
                            if (!staProtocol.isLoading()) {
                                continue;
                            }
@@ -507,6 +516,9 @@
                            || Cools.isEmpty(wrkMast.getStaNo()) || Cools.isEmpty(wrkMast.getSourceStaNo())) {
                        continue;
                    }
                    LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo()));
                    // 拣、盘、并 作业站转换
//                    int stnNo = 0;
@@ -1199,6 +1211,7 @@
//                    continue;
                }
                // 判断堆垛机出库站状态
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                        && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                    // 命令下发区 --------------------------------------------------------------------------
@@ -1725,6 +1738,7 @@
                        param.setLocType1(locTypeDto.getLocType1());
                        String response = new HttpHandler.Builder()
                                .setUri(wmsUrl)
                                .setTimeout(30, TimeUnit.SECONDS)
                                .setPath("/rpc/pakin/loc/v1")
                                .setJson(JSON.toJSONString(param))
                                .build()
@@ -1899,6 +1913,8 @@
                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) {
                    News.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort());
                    continue;
                } else {
//                    News.info("{}号LED命令下发成功!!![ip:{}] [port:{}] [port:{}]", led.getId(), led.getIp(), led.getPort(),commands);
                }
            }
@@ -1955,6 +1971,7 @@
            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId());
            // led显示默认内容
            if (reset) {
                //News.info("{}号LED命令重置!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort());
                if (ledThread == null) {
                    continue;
                }
@@ -2421,6 +2438,7 @@
            try {
                String response = new HttpHandler.Builder()
                        .setUri(wmsUrl)
                        .setTimeout(30, TimeUnit.SECONDS)
                        .setPath("/rpc/auto/emptyOut/v1")
                        .build()
                        .doPost();
@@ -2459,6 +2477,7 @@
                String response = new HttpHandler.Builder()
                        .setUri(wmsUrl)
                        .setTimeout(30, TimeUnit.SECONDS)
                        .setPath("/rpc/auto/emptyIn/v1")
                        .setJson(JSON.toJSONString(locTypeDto))
                        .build()