#
luxiaotao1123
2024-12-23 68ed198ddc082ef02f85f6d946af4cd7be0d0ed1
zy-acs-manager/src/main/java/com/zy/acs/manager/core/DemoController.java
@@ -19,6 +19,7 @@
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -141,4 +142,24 @@
        }
        return R.ok().add(result);
    }
    @Autowired
    private MapService mapService;
    @Autowired
    private SegmentService segmentService;
    @GetMapping("/astarDemo") // astar spend time: 3866, count:3855
    public R astarDemo() {
        long startTime = System.currentTimeMillis();
        List<String> path = mapService.checkoutPath("18"
                , codeService.selectByData("00001318")
                , codeService.selectByData("00003447")
                , true
                , new ArrayList<>()
                , segmentService.getById(1390));
        System.out.println("demo spend time: " + (System.currentTimeMillis() - startTime));
        return R.ok().add(path);
    }
}