| | |
| | | |
| | | @PostMapping("/preview") |
| | | @Operation(summary = "预览报告(只渲染,不落库、不消耗报告编号)") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:instance:query')") |
| | | public CommonResult<QcReportInstancePreviewRespVO> preview(@Valid @RequestBody QcReportInstanceGenerateReqVO reqVO) { |
| | | RenderOutcome outcome = instanceService.preview(reqVO); |
| | | QcReportInstancePreviewRespVO respVO = new QcReportInstancePreviewRespVO(); |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得报告实例(含渲染产物 HTML,不含数据快照)") |
| | | @Parameter(name = "id", description = "实例编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:instance:query')") |
| | | public CommonResult<QcReportInstanceRespVO> getInstance(@RequestParam("id") Long id) { |
| | | QcReportInstanceDO instance = instanceService.getInstance(id); |
| | | return success(BeanUtils.toBean(instance, QcReportInstanceRespVO.class)); |
| | |
| | | @GetMapping("/snapshot") |
| | | @Operation(summary = "获得报告实例冻结的数据快照") |
| | | @Parameter(name = "id", description = "实例编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:instance:query')") |
| | | public CommonResult<Map<String, Object>> getSnapshot(@RequestParam("id") Long id) { |
| | | return success(instanceService.getSnapshot(id)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得报告实例分页") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:instance:query')") |
| | | public CommonResult<PageResult<QcReportInstanceRespVO>> getInstancePage( |
| | | @Valid QcReportInstancePageReqVO pageReqVO) { |
| | | PageResult<QcReportInstanceDO> pageResult = instanceService.getInstancePage(pageReqVO); |