| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得报告模板") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:template:query')") |
| | | public CommonResult<QcReportTemplateRespVO> getTemplate(@RequestParam("id") Long id) { |
| | | QcReportTemplateDO template = templateService.getTemplate(id); |
| | | return success(BeanUtils.toBean(template, QcReportTemplateRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得报告模板分页") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:template:query')") |
| | | public CommonResult<PageResult<QcReportTemplateRespVO>> getTemplatePage(@Valid QcReportTemplatePageReqVO pageReqVO) { |
| | | PageResult<QcReportTemplateDO> pageResult = templateService.getTemplatePage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, QcReportTemplateRespVO.class)); |
| | |
| | | description = "三个条件同时满足才会返回:报告类型一致、模板已启用、当前版本已发布且画布有可渲染的内容。" |
| | | + "最后一条挡的是「打开过设计器但没放组件」的版本——它渲染出来是一张白纸且不报错。") |
| | | @Parameter(name = "reportType", description = "报告类型,即 mes_qc_type 的数值字符串", required = true, example = "1") |
| | | @PreAuthorize("@ss.hasPermission('qc-report:template:query')") |
| | | public CommonResult<List<QcReportTemplateRespVO>> getSelectableTemplateList( |
| | | @RequestParam("reportType") String reportType) { |
| | | List<QcReportTemplateDO> list = templateService.getSelectableTemplates(reportType); |