| | |
| | | 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; |
| | |
| | | return historyService.setpHistoryEnable(parentCode, customCode, version, enabled); |
| | | } |
| | | @PostMapping("zipParse") |
| | | @ApiOperation("zip解析") |
| | | public Response zipParse(@RequestParam("file") MultipartFile file) throws IOException, InvalidFormatException { |
| | | return service.zipParse(file); |
| | | @ApiOperation(value = "zip解析",notes = "返回结果中,追加data3为对比结果,为key-value集合,key为diffList,addList,deleteList") |
| | | 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 |