Junjie
2026-04-10 358a65169e422bacfa8bd3134f7723e2eca32628
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) {