#
Junjie
2025-08-16 b579fe0be3bd02ec39d612a62b23901fb852c173
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -742,6 +742,12 @@
//                continue;
//            }
            //堆垛机回原点任务中
            Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK);
            if (object != null) {
                continue;
            }
            // 只有当堆垛机空闲 并且 无任务时才继续执行
            if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO
                    && crnProtocol.getLoaded() == 0 && crnProtocol.getForkPos() == 0) {
@@ -841,7 +847,7 @@
                    News.error("堆垛机移动命令下发失败,堆垛机号={},任务数据={}", crnProtocol.getCrnNo(), JSON.toJSON(crnCommand));
                }
                crnThread.setBackHpFlag(true);
                redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 60);
                redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 10);
                try {
                    Thread.sleep(500);
                } catch (Exception e) {
@@ -913,7 +919,7 @@
                    News.error("堆垛机移动命令下发失败,堆垛机号={},任务数据={}", crnProtocol.getCrnNo(), JSON.toJSON(crnCommand));
                }
                crnThread.setBackHpFlag(true);
                redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 60);
                redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 10);
                try {
                    Thread.sleep(500);
                } catch (Exception e) {
@@ -1201,8 +1207,7 @@
//                    continue;
                }
                // 判断堆垛机出库站状态
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                        && staProtocol.getWorkNo() == 0) {
                if (staProtocol.isAutoing()  && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) {
                    //根据参数判断是否校验可出信号
                    String crnOutVerifyOut = "Y";
@@ -1214,6 +1219,14 @@
                    if (crnOutVerifyOut.equals("Y")) {
                        if (!staProtocol.isOutEnable()) {
                            continue;
                        }
                        if (staProtocol.isLoading()) {
                            continue;
                        }
                        if (staProtocol.getWorkNo() > 0) {
                            continue;
                        }
                    }
@@ -1529,7 +1542,7 @@
            if (wrkMastMapper.updateById(wrkMast) == 0) {
                News.error("" + mark + " - 3" + " - 5" + " - 【库位移转】 修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", wrkMast.getWrkNo());
            }
            crnProtocol.setLastIo("O");
            crnProtocol.setLastIo("I");
        }
        News.infoNoLog("" + mark + " - 3" + " - 0" + " - 堆垛机入出库作业下发:库位移转完成");
@@ -2004,7 +2017,7 @@
                    wrkMast1.setIoType(3); // 入出库状态:3.站到站
                    wrkMast1.setIoPri(13D); // 优先级
                    wrkMast1.setSourceStaNo(emptyInSta.getStaNo());
                    wrkMast1.setStaNo(1007);
                    wrkMast1.setStaNo(1004);
                    wrkMast1.setBarcode(barcode);
                    // 操作人员数据
                    wrkMast1.setAppeTime(new Date());