管道基础大数据平台系统开发-【后端】-Server
13693261870
2023-01-30 d755ae47b01c107960500127c9b14f1473d13b03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.lf.server.controller.show;
 
import com.lf.server.annotation.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.service.all.BaseQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 综合展示
 * @author WWW
 */
@Api(tags = "综合展示\\综合展示")
@RestController
@RequestMapping("/comprehensive")
public class ComprehensiveController extends BaseController {
    @Autowired
    BaseQueryService baseQueryService;
 
    @SysLog()
    @ApiOperation(value = "查询路网")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "x1", value = "X1", dataType = "Double", paramType = "query", example = "116.78999"),
            @ApiImplicitParam(name = "y1", value = "Y1", dataType = "Double", paramType = "query", example = "39.9468"),
            @ApiImplicitParam(name = "x2", value = "X2", dataType = "Double", paramType = "query", example = "116.80458"),
            @ApiImplicitParam(name = "y2", value = "Y2", dataType = "Double", paramType = "query", example = "39.94758")
    })
    @GetMapping(value = "/selectRoute")
    public ResponseMsg<Object> selectRoute(double x1, double y1, double x2, double y2) {
        try {
            String route = baseQueryService.selectRoute(x1, y1, x2, y2);
 
            return success(route);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
}