From 5041e1691397344f4bd8d79b34c74df512b69881 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期五, 29 十一月 2024 12:57:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- business/src/main/java/com/ycl/controller/ProjectInfoController.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/business/src/main/java/com/ycl/controller/ProjectInfoController.java b/business/src/main/java/com/ycl/controller/ProjectInfoController.java index 22c73e9..2eea7dc 100644 --- a/business/src/main/java/com/ycl/controller/ProjectInfoController.java +++ b/business/src/main/java/com/ycl/controller/ProjectInfoController.java @@ -4,6 +4,8 @@ import com.ycl.common.group.Add; import com.ycl.common.group.Update; import com.ycl.common.utils.ProjectCodeGenerator; +import com.ycl.common.utils.excel.OutputExcelUtils; +import com.ycl.domain.excel.ProjectExcelTemplate; import com.ycl.domain.form.DocumentInfoForm; import com.ycl.domain.form.ProjectInfoForm; import com.ycl.domain.query.ProjectInfoQuery; @@ -14,7 +16,9 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotEmpty; +import java.io.IOException; import java.util.List; /** @@ -54,7 +58,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); } @@ -99,4 +103,22 @@ public Result generateProjectCode() { return Result.ok().data(ProjectCodeGenerator.generateProjectCode()); }; + + @GetMapping("/getManagerFlag/{recordId}") + public Result getManagerFlag(@PathVariable("recordId") Integer recordId) { + return projectInfoService.getManagerFlag(recordId); + } + + /** + * 瀵煎嚭妯℃澘 + * @param response + * @return + */ + @PostMapping("/export/template") + public void exportTemplate(HttpServletResponse response, + @RequestBody List<String> fieldList + ) throws IOException { + OutputExcelUtils.export(response, "瀵煎叆妯℃澘", "椤圭洰淇℃伅", null, ProjectExcelTemplate.class ,fieldList); + } + } -- Gitblit v1.8.0