#fs
lsh
2024-09-10 f641bad60c3c50f2bf66845252e73fa28ecaab67
src/main/java/com/zy/asrs/controller/RgvController.java
@@ -337,5 +337,26 @@
        }
        return R.ok().add(result);
    }
    @PostMapping("/ring/through/rgv/position/data")
    @ManagerAuth(memo = "环穿位置信息")
    public R ringThrough(){
        List<Map> result = new ArrayList<>();
        for (RgvSlave rgv : slaveProperties.getRgv()) {
            // 获取RGV信息
            RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgv.getId());
            if (rgvThread == null) {
                throw new CoolException("RGV不在线");
            }
            RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
            if (rgvProtocol == null) {
                throw new CoolException("RGV不在线");
            }
            Map<String, Object> rgvMap = new HashMap<>();
            rgvMap.put("title", rgvProtocol.getRgvPosI());
            rgvMap.put("id", rgvProtocol.getRgvNo());
            result.add(rgvMap);
        }
        return R.ok().add(result);
    }
}