| | |
| | | import cn.flightfeather.supervision.lightshare.service.DataProductService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo |
| | | import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt |
| | | import cn.flightfeather.supervision.model.dataproduct.DataProdOption |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | |
| | | * @date 2024/10/18 |
| | | * @author feiyu02 |
| | | */ |
| | | @Api(tags = ["DataProductController"], description = "数据产品相关API接口") |
| | | @Api(tags = ["数据产品相关API接口"], description = "数据产品相关API接口") |
| | | @RestController |
| | | @RequestMapping("/dataProduct") |
| | | class DataProductController(private val dataProductService: DataProductService) { |
| | |
| | | @RequestParam type: Int, |
| | | @ApiParam("是否强制生成新的报告") @RequestParam forceUpdate: Boolean, |
| | | @ApiIgnore response: HttpServletResponse, |
| | | ) = resPack { dataProductService.downloadProduct(areaVo, type, forceUpdate, response) } |
| | | ) = dataProductService.downloadProduct(areaVo, type, forceUpdate, response) |
| | | |
| | | @ApiOperation(value = "获取问题整改清单") |
| | | @PostMapping("/problemChange") |
| | | fun problemChangeList( |
| | | @ApiParam("查询条件") @RequestBody option: DataProdOption, |
| | | ) = resPack { dataProductService.problemChangeList(option) } |
| | | ) = dataProductService.problemChangeList(option) |
| | | |
| | | @ApiOperation(value = "获取问题复发情况") |
| | | @PostMapping("/problemRecurrence") |
| | | fun problemRecurrence( |
| | | @ApiParam("查询条件") @RequestBody option: DataProdOption, |
| | | ) = resPack { dataProductService.problemRecurrence(option) } |
| | | ) = dataProductService.problemRecurrence(option) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "查询数据产品项及对应的统计状态") |
| | | @GetMapping("/type/query") |
| | | fun findProductType( |
| | | @ApiParam("产品类型", allowableValues = "base, middle, final", format = "base") @RequestParam types: String, |
| | | ) { |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "查询数据产品记录") |
| | | @PostMapping("/record/query") |
| | | fun findProduct( |
| | | @ApiParam("查询条件") @RequestBody queryOpt: QueryOpt, |
| | | @ApiParam("页码") @RequestParam(value = "page", required = false, defaultValue = "1") page: Int?, |
| | | @ApiParam("单页数据量") @RequestParam(value = "perPage", required = false, defaultValue = "30") perPage: Int?, |
| | | ) { |
| | | // 根据产品类型编号、区域、时段、场景类型、配置id查询 |
| | | return dataProductService.findProduct(queryOpt, page ?: 1, perPage ?: 30) |
| | | } |
| | | |
| | | // @ApiOperation(value = "生成数据产品") |
| | | // @PostMapping("/generate") |
| | | // fun generateProduct() = dataProductService.generateProduct() |
| | | } |