| | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Scense |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Task |
| | | import cn.flightfeather.supervision.lightshare.service.ScenseService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.BaseResponse |
| | | import cn.flightfeather.supervision.lightshare.vo.SceneDetailStr |
| | | import io.swagger.annotations.Api |
| | | 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 |
| | |
| | | @RequestBody sceneDetailStr: SceneDetailStr |
| | | ) = scenseService.updateSceneDetail(typeId, sceneDetailStr) |
| | | |
| | | @PostMapping("/find") |
| | | fun searchScene( |
| | | @RequestBody areaVo: AreaVo, |
| | | @RequestParam("page", required = false) page: Int?, |
| | | @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) } |
| | | } |