|
@@ -1,35 +1,34 @@
|
|
|
package cn.iocoder.yudao.module.report.controller.admin.ureport;
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-import javax.annotation.Resource;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
-import io.swagger.v3.oas.annotations.Parameter;
|
|
|
-import io.swagger.v3.oas.annotations.Operation;
|
|
|
-
|
|
|
-import javax.validation.constraints.*;
|
|
|
-import javax.validation.*;
|
|
|
-import javax.servlet.http.*;
|
|
|
-import java.util.*;
|
|
|
-import java.io.IOException;
|
|
|
-
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
-
|
|
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
|
-
|
|
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
|
|
-import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
|
|
-
|
|
|
-import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.*;
|
|
|
+import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UreportFilePageReqVO;
|
|
|
+import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UreportFileRespVO;
|
|
|
+import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UreportFileSaveReqVO;
|
|
|
import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UreportFileDO;
|
|
|
import cn.iocoder.yudao.module.report.service.ureport.UreportFileService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
+import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
|
|
|
|
|
-@Tag(name = "管理后台 - Ureport2报表")
|
|
|
+// TODO @赤焰: Ureport 改成 UReport
|
|
|
+@Tag(name = "管理后台 - UReport2 报表")
|
|
|
@RestController
|
|
|
@RequestMapping("/report/ureport-file")
|
|
|
@Validated
|
|
@@ -39,14 +38,14 @@ public class UreportFileController {
|
|
|
private UreportFileService ureportFileService;
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
- @Operation(summary = "创建Ureport2报表")
|
|
|
+ @Operation(summary = "创建 UReport2 报表")
|
|
|
@PreAuthorize("@ss.hasPermission('report:ureport-file:create')")
|
|
|
public CommonResult<Long> createUreportFile(@Valid @RequestBody UreportFileSaveReqVO createReqVO) {
|
|
|
return success(ureportFileService.createUreportFile(createReqVO));
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
- @Operation(summary = "更新Ureport2报表")
|
|
|
+ @Operation(summary = "更新 UReport2 报表")
|
|
|
@PreAuthorize("@ss.hasPermission('report:ureport-file:update')")
|
|
|
public CommonResult<Boolean> updateUreportFile(@Valid @RequestBody UreportFileSaveReqVO updateReqVO) {
|
|
|
ureportFileService.updateUreportFile(updateReqVO);
|
|
@@ -54,7 +53,7 @@ public class UreportFileController {
|
|
|
}
|
|
|
|
|
|
@DeleteMapping("/delete")
|
|
|
- @Operation(summary = "删除Ureport2报表")
|
|
|
+ @Operation(summary = "删除 UReport2 报表")
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
@PreAuthorize("@ss.hasPermission('report:ureport-file:delete')")
|
|
|
public CommonResult<Boolean> deleteUreportFile(@RequestParam("id") Long id) {
|
|
@@ -63,7 +62,7 @@ public class UreportFileController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/get")
|
|
|
- @Operation(summary = "获得Ureport2报表")
|
|
|
+ @Operation(summary = "获得 UReport2 报表")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
@PreAuthorize("@ss.hasPermission('report:ureport-file:query')")
|
|
|
public CommonResult<UreportFileRespVO> getUreportFile(@RequestParam("id") Long id) {
|
|
@@ -72,15 +71,16 @@ public class UreportFileController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
- @Operation(summary = "获得Ureport2报表分页")
|
|
|
+ @Operation(summary = "获得 UReport2 报表分页")
|
|
|
@PreAuthorize("@ss.hasPermission('report:ureport-file:query')")
|
|
|
public CommonResult<PageResult<UreportFileRespVO>> getUreportFilePage(@Valid UreportFilePageReqVO pageReqVO) {
|
|
|
PageResult<UreportFileDO> pageResult = ureportFileService.getUreportFilePage(pageReqVO);
|
|
|
return success(BeanUtils.toBean(pageResult, UreportFileRespVO.class));
|
|
|
}
|
|
|
|
|
|
+ // TODO @赤焰:导出是必须的么?没用可以删除哈
|
|
|
@GetMapping("/export-excel")
|
|
|
- @Operation(summary = "导出Ureport2报表 Excel")
|
|
|
+ @Operation(summary = "导出 UReport2 报表 Excel")
|
|
|
@PreAuthorize("@ss.hasPermission('report:ureport-file:export')")
|
|
|
@OperateLog(type = EXPORT)
|
|
|
public void exportUreportFileExcel(@Valid UreportFilePageReqVO pageReqVO,
|