From 3ee1e956019390abd433dc53bc26176fff0cf87c Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期三, 31 八月 2022 15:57:29 +0800 Subject: [PATCH] 产品bom新增,zip解析 --- src/main/java/com/whyc/controller/ProductController.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whyc/controller/ProductController.java b/src/main/java/com/whyc/controller/ProductController.java index 5aabf92..78c2bd1 100644 --- a/src/main/java/com/whyc/controller/ProductController.java +++ b/src/main/java/com/whyc/controller/ProductController.java @@ -4,14 +4,14 @@ import com.whyc.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; @Api(tags = "浜у搧绠$悊") @RestController @@ -70,4 +70,10 @@ public void downloadProductHistory(HttpServletRequest req, HttpServletResponse resp, @RequestParam int productId, @RequestParam int version){ bomHistoryService.downloadProductHistory(req,resp,productId,version); } + + @PostMapping("zipParse") + @ApiOperation("zip瑙f瀽") + public Response zipParse(@RequestParam("file") MultipartFile file) throws IOException, InvalidFormatException { + return service.zipParse(file); + } } -- Gitblit v1.9.1