| | |
| | | import io.swagger.annotations.ApiImplicitParam |
| | | import io.swagger.annotations.ApiOperation |
| | | import org.springframework.web.bind.annotation.* |
| | | import org.springframework.web.multipart.MultipartFile |
| | | |
| | | @Api(tags = ["ScenseController"], description = "监管场景API接口") |
| | | @RestController |
| | |
| | | @RequestParam("per_page", required = false) perPage: Int? |
| | | ) = scenseService.searchScene(areaVo, page, perPage) |
| | | |
| | | @ApiOperation(value = "根据圆心和半径找到范围内的场景") |
| | | @PostMapping("/find/coor") |
| | | fun searchByCoordinate( |
| | | @RequestParam("lng") lng: Double, |
| | | @RequestParam("lat") lat: Double, |
| | | @RequestParam("radius") radius: Double, |
| | | ) = resPack { scenseService.searchByCoordinate(lng, lat, radius) } |
| | | |
| | | @ApiOperation(value = "通过文件导入场景信息") |
| | | @PostMapping("/import") |
| | | fun importSceneInfo( |
| | | @RequestPart("file") file: MultipartFile, |
| | | ) = resPack { scenseService.importSceneInfo(file) } |
| | | |
| | | @ApiOperation(value = "创建场景信息") |
| | | @PutMapping("/create") |
| | | fun createScene( |
| | | @RequestBody scense: Scense |
| | | ) = resPack { scenseService.createScene(scense) } |
| | | } |