Junjie
2026-04-13 b5cefd0727da0040ad7130c72f18df07643490cd
#站点运行优化
2个文件已修改
15 ■■■■ 已修改文件
src/main/java/com/zy/core/plugin/GslProcess.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/plugin/GslProcess.java
@@ -212,8 +212,7 @@
            return false;
        }
        String lockKey = RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId();
        Object lock = redisUtil.get(lockKey);
        Object lock = redisUtil.get(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId());
        if (lock != null) {
            return false;
        }
@@ -228,7 +227,7 @@
        }
        stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "station-back");
        News.info("{}扫码站异常,已退回至{},条码站状态:{}", stationProtocol.getTaskNo(), backStation.getStationId(), JSON.toJSONString(stationProtocol));
        redisUtil.set(lockKey, "lock", 60 * 60);
        redisUtil.set(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId(), "lock", 60 * 60);
        return false;
    }
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -143,8 +143,8 @@
            return;
        }
        Integer backStationId = stationObjModel.getBarcodeStation() == null ? null : stationObjModel.getBarcodeStation().getStationId();
        if (backStationId == null) {
        Integer barcodeStationId = stationObjModel.getBarcodeStation() == null ? null : stationObjModel.getBarcodeStation().getStationId();
        if (barcodeStationId == null) {
            return;
        }
@@ -152,12 +152,14 @@
                StationCommandType.MOVE,
                commonService.getWorkNo(WrkIoType.ENABLE_IN.id),
                stationId,
                backStationId,
                barcodeStationId,
                0
        );
        stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, STATION_COMMAND_SOURCE, "enable-in");
        Utils.precomputeInTaskEnableRow(backStationId);
        Utils.precomputeInTaskEnableRow(barcodeStationId);
        redisUtil.set(RedisKeyType.GENERATE_ENABLE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 15);
        // 启动入库时删除退回控制key,允许后续异常时再次生成退回命令
        redisUtil.del(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + barcodeStationId);
        News.info("{}站点启动入库成功,数据包:{}", stationId, JSON.toJSONString(command));
    }