From bd3abf9b8101a31e745de1ec76f6d98317b2de2e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 04 十二月 2024 13:50:45 +0800
Subject: [PATCH] 首页流程待办查询接口支持部门
---
business/src/main/java/com/ycl/controller/ProjectInfoController.java | 49 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/business/src/main/java/com/ycl/controller/ProjectInfoController.java b/business/src/main/java/com/ycl/controller/ProjectInfoController.java
index cac7115..b082e4d 100644
--- a/business/src/main/java/com/ycl/controller/ProjectInfoController.java
+++ b/business/src/main/java/com/ycl/controller/ProjectInfoController.java
@@ -4,7 +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;
@@ -13,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;
/**
@@ -37,7 +44,12 @@
public Result add(@RequestBody @Validated(Add.class) ProjectInfoForm form) {
return projectInfoService.add(form);
}
-
+ @PostMapping("/document")
+ @ApiOperation(value = "娣诲姞鐩稿叧鏂囦欢", notes = "娣诲姞鐩稿叧鏂囦欢")
+// @PreAuthorize("hasAuthority('projectInfo:add')")
+ public Result addDoc(@RequestBody @Validated(Add.class) DocumentInfoForm form) {
+ return projectInfoService.addDoc(form);
+ }
@PutMapping
@ApiOperation(value = "淇敼", notes = "淇敼")
// @PreAuthorize("hasAuthority('projectInfo:edit')")
@@ -48,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);
}
@@ -72,7 +84,12 @@
public Result detail(@PathVariable("id") Integer id) {
return projectInfoService.detail(id);
}
-
+ @GetMapping("/document/{id}")
+ @ApiOperation(value = "鐩稿叧鏂囦欢璇︽儏", notes = "鐩稿叧鏂囦欢璇︽儏")
+// @PreAuthorize("hasAuthority('projectInfo:detail')")
+ public Result docDetail(@PathVariable("id") Integer id) {
+ return projectInfoService.docDetail(id);
+ }
@GetMapping("/list")
// @PreAuthorize("hasAuthority('projectInfo:list')")
@ApiOperation(value = "鍒楄〃", notes = "鍒楄〃")
@@ -88,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