From cf9a5039e6db9d1d5963e3fe1a37d00169ec2ef7 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期三, 25 六月 2025 11:18:22 +0800 Subject: [PATCH] 验收报告修改 --- src/main/java/com/whyc/controller/WorksheetMainController.java | 45 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/whyc/controller/WorksheetMainController.java b/src/main/java/com/whyc/controller/WorksheetMainController.java index e53e4ff..045f4a1 100644 --- a/src/main/java/com/whyc/controller/WorksheetMainController.java +++ b/src/main/java/com/whyc/controller/WorksheetMainController.java @@ -1,10 +1,12 @@ package com.whyc.controller; import com.github.pagehelper.PageInfo; +import com.whyc.config.EnumWorksheetType; import com.whyc.dto.Response; import com.whyc.dto.WorksheetMainDTO; import com.whyc.dto.WorksheetMainDTO2; import com.whyc.pojo.DocUser; +import com.whyc.pojo.ProcedureDocApproving; import com.whyc.pojo.WorksheetMain; import com.whyc.service.WorksheetMainService; import com.whyc.util.ActionUtil; @@ -14,10 +16,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.validation.Valid; +import javax.mail.MessagingException; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.List; import java.util.Map; @RestController @@ -30,7 +31,7 @@ @PostMapping("submit") @ApiOperation("浜у搧鍥剧焊鍙奲om鎻愪氦") - public Response submit(@RequestBody WorksheetMain main){ + public Response submit(@RequestBody WorksheetMain main) throws IOException { DocUser user = ActionUtil.getUser(); boolean res = service.submit(main,user); if(res) { @@ -52,6 +53,7 @@ } } + /**鍓嶇鏈紶閫掕繃鏉ョ墿鏂欐枃浠舵墍鍦ㄨ矾寰�,瀛樺湪闂 TODO*/ @PostMapping("materialSubmit") @ApiOperation(value="鐗╂枡瀹℃壒鎻愪氦") public Response materialSubmit(@RequestBody WorksheetMain main){ @@ -126,14 +128,14 @@ } @GetMapping("handlingListPage") - @ApiOperation("鏌ョ湅鍒嗛〉-寰呭鐞�") + @ApiOperation(tags = "娴佺▼鍗″拰SOP",value = "鏌ョ湅鍒嗛〉-寰呭鐞�") public Response<PageInfo<WorksheetMain>> getHandlingListPage(@RequestParam int pageNum, @RequestParam int pageSize){ DocUser user = ActionUtil.getUser(); return service.getHandlingListPage(user,pageNum,pageSize); } @GetMapping("handledListPage") - @ApiOperation("鏌ョ湅鍒嗛〉-宸插鐞�") + @ApiOperation(tags = "娴佺▼鍗″拰SOP",value = "鏌ョ湅鍒嗛〉-宸插鐞�") public Response<PageInfo<WorksheetMain>> getHandledListPage(@RequestParam int pageNum, @RequestParam int pageSize){ DocUser user = ActionUtil.getUser(); return service.getHandledListPage(user,pageNum,pageSize); @@ -154,10 +156,39 @@ } @GetMapping("myListPage") - @ApiOperation("鎴戠殑宸ュ崟") + @ApiOperation(tags = "娴佺▼鍗″拰SOP",value = "鎴戠殑宸ュ崟") public Response<PageInfo<WorksheetMain>> getMyList(@RequestParam int pageNum,@RequestParam int pageSize){ DocUser user = ActionUtil.getUser(); return service.getMyList(pageNum,pageSize,user); } + /** + * {@link EnumWorksheetType#getType()} + * @param approving + * @return + * @throws IOException + * @throws MessagingException + */ + @PostMapping("productProcedureAndSOP") + @ApiOperation(tags = "娴佺▼鍗″拰SOP",value = "纭杩囩▼-浜у搧娴佺▼鍗″強SOP鎻愪氦",notes = "type:1-娴佺▼鍗�,2-SOP") + public Response addProductProcedureAndSOP(@RequestBody ProcedureDocApproving approving) throws IOException, MessagingException { + DocUser user = ActionUtil.getUser(); + return service.addProductProcedureAndSOP(approving,user); + } + + @GetMapping("procedurePreview") + @ApiOperation(tags = "娴佺▼鍗″拰SOP",value = "纭杩囩▼-棰勮pdf",notes = "") + public Response procedurePreview(HttpServletResponse response,@RequestParam int mainId) throws IOException { + return service.procedurePreview(response,mainId); + } + + /** + * 璇㈡墍鏈夌殑宸ュ崟,鎵�鏈変汉鍙 + */ + @PostMapping("getAllPage") + @ApiOperation(value = "璇㈡墍鏈夌殑宸ュ崟,鎵�鏈変汉鍙") + public Response getAllPage(@RequestBody WorksheetMain param) { + return service.getAllPage(param); + } + } -- Gitblit v1.9.1