#
gtsxc
2024-12-10 f23549bc50ae4d489c37d68c0f3b1456b7156ea8
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/NavigateUtils.java
@@ -302,7 +302,17 @@
    public Double similarityPath(List<NavigateNode> firstPath, List<NavigateNode> secondPath) {
        try {
            ProcessBuilder processBuilder = new ProcessBuilder("python", pythonCalcSimilarity, JSON.toJSONString(firstPath), JSON.toJSONString(secondPath));
            List<int[]> first = new ArrayList<>();
            for (NavigateNode node : firstPath) {
                first.add(new int[]{node.getX(), node.getY()});
            }
            List<int[]> second = new ArrayList<>();
            for (NavigateNode node : secondPath) {
                second.add(new int[]{node.getX(), node.getY()});
            }
            ProcessBuilder processBuilder = new ProcessBuilder("python", pythonCalcSimilarity, JSON.toJSONString(first), JSON.toJSONString(second));
            processBuilder.redirectErrorStream(true);
            Process process = processBuilder.start();