| | |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | 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); |
| | | } |
| | | |
| | | } |