package cn.flightfeather.supervision.lightshare.web
|
|
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
|
import io.swagger.annotations.ApiParam
|
import org.springframework.web.bind.annotation.*
|
import springfox.documentation.annotations.ApiIgnore
|
import javax.servlet.http.HttpServletResponse
|
|
/**
|
* 数据产品相关API接口
|
* @date 2024/10/18
|
* @author feiyu02
|
*/
|
@Api(tags = ["数据产品相关API接口"], description = "数据产品相关API接口")
|
@RestController
|
@RequestMapping("/dataProduct")
|
class DataProductController(private val dataProductService: DataProductService) {
|
|
@ApiOperation(value = "下载数据产品报告")
|
@PostMapping("/download")
|
fun downloadProduct(
|
@ApiParam("区域条件信息") @RequestBody areaVo: AreaVo,
|
@ApiParam("报告类型", allowableValues = "1:问题与整改汇总分析与动态跟踪清单;2:规范性评估与分析清单;3:问题与整改分布分析清单;")
|
@RequestParam type: Int,
|
@ApiParam("是否强制生成新的报告") @RequestParam forceUpdate: Boolean,
|
@ApiIgnore response: HttpServletResponse,
|
) = dataProductService.downloadProduct(areaVo, type, forceUpdate, response)
|
|
@ApiOperation(value = "获取问题整改清单")
|
@PostMapping("/problemChange")
|
fun problemChangeList(
|
@ApiParam("查询条件") @RequestBody option: DataProdOption,
|
) = dataProductService.problemChangeList(option)
|
|
@ApiOperation(value = "获取问题复发情况")
|
@PostMapping("/problemRecurrence")
|
fun problemRecurrence(
|
@ApiParam("查询条件") @RequestBody option: DataProdOption,
|
) = 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()
|
}
|