package com.fd.controller; import com.fd.server.WfsServer; import com.fd.util.R; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * Created by Owen on 2020/1/2 0002 10:27 * * 要素查询,针对矢量数据 * manage:是不需要登录的 */ //@CrossOrigin(origins = "*", maxAge = 3600) @Api(tags = "要素模块") @RequestMapping("manage/wfs") @RestController public class WfsController { @Autowired private WfsServer wfsServer; @ApiOperation("获取图层字段名称, fileId:图层id") @GetMapping("getField/{fileId}/") public R getField(@PathVariable("fileId") Long fileId){ return wfsServer.getField(fileId); } @ApiOperation("精准查询, fieldName:字段名,value:字段值") @GetMapping("accurate/{fileId}/{fieldName}/{value}/") public R wfsAccurate(@PathVariable("fieldName") String fieldName, @PathVariable("value") String value, @PathVariable("fileId") Long fileId){ return wfsServer.wfsAccurate(fileId, fieldName, value); } @ApiOperation("模糊查询, fieldName:字段名,value:字段值") @GetMapping("like/{fileId}/{fieldName}/{value}/") public R wfsLike(@PathVariable("fieldName") String fieldName, @PathVariable("value") String value, @PathVariable("fileId") Long fileId){ return wfsServer.wfsLike(fileId, fieldName, value); } // @xMin @yMin @xMax @yMax @ApiOperation("范围查询, xMin,yMin:最小值,xMax,yMax:最大值") @GetMapping("scope/{fileId}/{xMin}/{yMin}/{xMax}/{yMax}/") public R wfsScope(@PathVariable("fileId") Long fileId, @PathVariable("xMin") String xMin, @PathVariable("yMin") String yMin, @PathVariable("xMax") String xMax, @PathVariable("yMax") String yMax){ return wfsServer.wfsScope(fileId, xMin, yMin, xMax, yMax); } }