Junjie
2026-04-10 358a65169e422bacfa8bd3134f7723e2eca32628
#出入库模式管控
2个文件已修改
35 ■■■■■ 已修改文件
src/main/java/com/zy/core/plugin/GslProcess.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/plugin/GslProcess.java
@@ -130,6 +130,10 @@
                        && stationProtocol.getTaskNo() == 0
                        && stationProtocol.isEnableIn()
                ) {
                    if (stationProtocol.getIoMode() != 1) {
                        continue;//不属于入库模式
                    }
                    StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, entity.getBarcodeStation().getStationId(), 0);
                    stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "enable-in");
                    if (entity.getBarcodeStation() != null && entity.getBarcodeStation().getStationId() != null) {
src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
@@ -391,6 +391,11 @@
            return false;
        }
        //检查是否为出库模式
        if(!checkOutTargetStationIoMode(wrkMast)) {
            return false;
        }
        for (StationObjModel stationObjModel : outStationList) {
            StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, stationObjModel.getDeviceNo());
            if (stationThread == null) {
@@ -622,6 +627,32 @@
        return false;
    }
    //检查是否为出库模式
    private boolean checkOutTargetStationIoMode(WrkMast wrkMast) {
        if (wrkMast == null || wrkMast.getStaNo() == null) {
            return false;
        }
        BasStation basStation = basStationService.getById(wrkMast.getStaNo());
        if (basStation == null) {
            return false;
        }
        StationThread targetStationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basStation.getDeviceNo());
        if (targetStationThread == null) {
            return false;
        }
        StationProtocol targetStationProtocol = targetStationThread.getStatusMap().get(wrkMast.getStaNo());
        if (targetStationProtocol == null) {
            return false;
        }
        if (targetStationProtocol.getIoMode() == 2) {
            return true;//出库模式
        }
        return false;
    }
    private int getSystemConfigInt(String code, int defaultValue) {
        Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
        if (systemConfigMapObj == null) {