From fc6b946b1020ddff4fe2b01c9e439680cbda6b47 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期三, 04 十二月 2024 09:32:53 +0800 Subject: [PATCH] 分角色展示项目计划,实现不同角色的功能 --- business/src/main/java/com/ycl/controller/ProjectInfoController.java | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/business/src/main/java/com/ycl/controller/ProjectInfoController.java b/business/src/main/java/com/ycl/controller/ProjectInfoController.java index 768ed26..b082e4d 100644 --- a/business/src/main/java/com/ycl/controller/ProjectInfoController.java +++ b/business/src/main/java/com/ycl/controller/ProjectInfoController.java @@ -8,6 +8,7 @@ import com.ycl.domain.excel.ProjectExcelTemplate; import com.ycl.domain.form.DocumentInfoForm; import com.ycl.domain.form.ProjectInfoForm; +import com.ycl.domain.query.ProjectExportQuery; import com.ycl.domain.query.ProjectInfoQuery; import com.ycl.service.ProjectInfoService; import io.swagger.annotations.Api; @@ -19,6 +20,7 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotEmpty; import java.io.IOException; +import java.util.ArrayList; import java.util.List; /** @@ -58,7 +60,7 @@ @DeleteMapping("/{id}") @ApiOperation(value = "ID鍒犻櫎", notes = "ID鍒犻櫎") // @PreAuthorize("hasAuthority('projectInfo:del')") - public Result removeById(@PathVariable("id") String id) { + public Result removeById(@PathVariable("id") Long id) { return projectInfoService.removeById(id); } @@ -115,10 +117,18 @@ * @return */ @PostMapping("/export/template") - public void exportTemplate(HttpServletResponse response, - @RequestBody List<String> fieldList - ) throws IOException { + public void exportTemplate(HttpServletResponse response) throws IOException { + List<String> fieldList = new ArrayList<>(); OutputExcelUtils.export(response, "瀵煎叆妯℃澘", "椤圭洰淇℃伅", null, ProjectExcelTemplate.class ,fieldList); } + /** + * 椤圭洰瀵煎嚭 + * @param response + * @throws IOException + */ + @PostMapping("/export") + public void export(HttpServletResponse response, ProjectExportQuery query) throws IOException { + projectInfoService.export(response, query); + } } -- Gitblit v1.8.0