From 93bfb9dc2bc52801132fdbc024e2bf5cb4e96316 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期二, 18 七月 2023 16:23:52 +0800 Subject: [PATCH] 1 --- src/main/java/com/yssh/service/SuYuanService.java | 5 +++-- src/main/java/com/yssh/controller/SuYuanController.java | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/yssh/controller/SuYuanController.java b/src/main/java/com/yssh/controller/SuYuanController.java index 6437ea8..45fa9de 100644 --- a/src/main/java/com/yssh/controller/SuYuanController.java +++ b/src/main/java/com/yssh/controller/SuYuanController.java @@ -153,40 +153,40 @@ return Result.OK(list); } - @ApiOperation(value = "鏍规嵁X锛孻鍊兼煡璇㈠湴鍧�", notes = "鏍规嵁X锛孻鍊兼煡璇㈠湴鍧�") - @ApiOperationSupport(order = 12) - @GetMapping("/selectCoords") - public Result selectVocByTime(@RequestParam(value = "x", required = false) Integer x, @RequestParam(value = "y", required = false) Integer y) { - return Result.OK(vocValsService.selectCoords(x, y)); - } - - @ApiOperation(value = "鏍规嵁X銆乊鍊兼煡璇㈢煩褰㈡", notes = "鏍规嵁X銆乊鍊兼煡璇㈢煩褰㈡") - @ApiOperationSupport(order = 13) - @GetMapping("/selectRects") - public Result selectRects(@RequestParam(value = "x[]", required = true) Double[] x, @RequestParam(value = "y[]", required = true) Double[] y) { - if (null == x || null == y || x.length == 0 || x.length != y.length) return Result.OK(null); - - return Result.OK(suYuanService.selectRects(x, y)); - } - - @ApiOperation(value = "鏍规嵁ID鍜屾棩鏈熸煡璇㈡函婧�700琛�", notes = "鏍规嵁ID鍜屾棩鏈熸煡璇㈡函婧�700琛�") - @ApiOperationSupport(order = 14) - @GetMapping("/selectSuYuan700ById") - public Result selectSuYuan700ById(@RequestParam(value = "id", required = true) String id, @RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) { - return Result.OK(suYuanService.selectSuYuan700ById(id, date)); - } - @ApiOperation(value = "鏍规嵁ID鍜屾棩鏈熸煡璇㈡函婧�46琛�", notes = "鏍规嵁ID鍜屾棩鏈熸煡璇㈡函婧�46琛�") - @ApiOperationSupport(order = 15) + @ApiOperationSupport(order = 12) @GetMapping("/selectSuYuan46ById") public Result selectSuYuan46ById(@RequestParam(value = "id", required = true) String id, @RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) { return Result.OK(suYuanService.selectSuYuan46ById(id, date)); } + @ApiOperation(value = "鏍规嵁ID鍜屾棩鏈熸煡璇㈡函婧�700琛�", notes = "鏍规嵁ID鍜屾棩鏈熸煡璇㈡函婧�700琛�") + @ApiOperationSupport(order = 13) + @GetMapping("/selectSuYuan700ById") + public Result selectSuYuan700ById(@RequestParam(value = "id", required = true) String id, @RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) { + return Result.OK(suYuanService.selectSuYuan700ById(id, date)); + } + + @ApiOperation(value = "鏍规嵁X锛孻鍊兼煡璇㈠湴鍧�", notes = "鏍规嵁X锛孻鍊兼煡璇㈠湴鍧�") + @ApiOperationSupport(order = 14) + @GetMapping("/selectCoords") + public Result selectVocByTime(@RequestParam(value = "x", required = false) Integer x, @RequestParam(value = "y", required = false) Integer y) { + return Result.OK(vocValsService.selectCoords(x / 10, y / 10)); + } + @ApiOperation(value = "鏍规嵁缁忕含搴︽煡璇㈠湴鍚�", notes = "鏍规嵁缁忕含搴︽煡璇㈠湴鍚�") - @ApiOperationSupport(order = 16) + @ApiOperationSupport(order = 15) @GetMapping("/selectAddrByXY") public Result selectAddrByXY(@RequestParam(value = "x", required = true) double x, @RequestParam(value = "y", required = true) double y) { return Result.OK(suYuanService.selectAddrByXY(x, y)); } + + @ApiOperation(value = "鏍规嵁X銆乊鍊兼煡璇㈢煩褰㈡", notes = "鏍规嵁X銆乊鍊兼煡璇㈢煩褰㈡") + @ApiOperationSupport(order = 16) + @GetMapping("/selectRects") + public Result selectRects(@RequestParam(value = "x[]", required = true) Double[] x, @RequestParam(value = "y[]", required = true) Double[] y) { + if (null == x || null == y || x.length == 0 || x.length != y.length) return Result.OK(null); + + return Result.OK(suYuanService.selectRects(x, y)); + } } diff --git a/src/main/java/com/yssh/service/SuYuanService.java b/src/main/java/com/yssh/service/SuYuanService.java index 146376e..d6630de 100644 --- a/src/main/java/com/yssh/service/SuYuanService.java +++ b/src/main/java/com/yssh/service/SuYuanService.java @@ -306,15 +306,16 @@ } public String selectAddrByXY(double x, double y) { + // 1绫�=0.0000089932 List<Location> locations = locationMapper.selectByXY(x, y); if (null != locations && locations.size() > 0) { return locations.get(0).getName(); } - locations = locService.selectVocAddrs(x, y); + /*locations = locService.selectVocAddrs(x, y); if (null != locations && locations.size() > 0) { return locations.get(0).getName(); - } + }*/ return null; } -- Gitblit v1.9.3