From f2eac03ce6cf78fa68618381f04adb17ddec3f6f Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期五, 29 十一月 2024 23:49:08 +0800
Subject: [PATCH] 首页待办
---
business/src/main/java/com/ycl/controller/ProjectInfoController.java | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 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..b082e4d 100644
--- a/business/src/main/java/com/ycl/controller/ProjectInfoController.java
+++ b/business/src/main/java/com/ycl/controller/ProjectInfoController.java
@@ -4,8 +4,11 @@
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.ProjectExportQuery;
import com.ycl.domain.query.ProjectInfoQuery;
import com.ycl.service.ProjectInfoService;
import io.swagger.annotations.Api;
@@ -14,7 +17,10 @@
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.ArrayList;
import java.util.List;
/**
@@ -54,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);
}
@@ -99,4 +105,30 @@
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) 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