From 581c7b2b2e7d631ecf3ab3276639f51f6745f784 Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期六, 03 九月 2022 14:29:01 +0800 Subject: [PATCH] 产品bom提交更新 --- src/main/java/com/whyc/controller/ProductController.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/whyc/controller/ProductController.java b/src/main/java/com/whyc/controller/ProductController.java index 9a0108f..ece3850 100644 --- a/src/main/java/com/whyc/controller/ProductController.java +++ b/src/main/java/com/whyc/controller/ProductController.java @@ -3,6 +3,7 @@ import com.whyc.dto.Response; import com.whyc.pojo.Product; import com.whyc.service.*; +import com.whyc.util.ActionUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -86,8 +87,10 @@ } @PostMapping("zipParse") @ApiOperation("zip瑙f瀽") - public Response zipParse(@RequestParam("file") MultipartFile file) throws IOException, InvalidFormatException { - return service.zipParse(file); + public Response zipParse(@RequestParam("file") MultipartFile file,@RequestParam(required = false) String baseStr) throws IOException, InvalidFormatException { + //瑕佸仛瀵规瘮鐨勪骇鍝�,浼犲叆浜嗙墿鏂�(parent_code)鍜屽畾鍒惰〃鍗曞彿(custom_code) + Product baseProduct = (baseStr==null?null:ActionUtil.getGson().fromJson(baseStr, Product.class)); + return service.zipParse(file,baseProduct); } @PostMapping -- Gitblit v1.9.1