lxw
2022-09-01 742f00e9798bda7f8e34f6879e580785e94dba70
src/main/java/com/whyc/controller/ProductController.java
@@ -1,6 +1,7 @@
package com.whyc.controller;
import com.whyc.dto.Response;
import com.whyc.pojo.Product;
import com.whyc.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -46,8 +47,8 @@
    }
    @ApiOperation(value = "产品详情查看版本信息",notes = "8.17修改后使用")
    @GetMapping("getProductVersion")
    public Response getProductVersion( @RequestParam String parentModel, String customCode){
        return historyService.getProductVersion(parentModel,customCode);
    public Response getProductVersion( @RequestParam String parentCode, String customCode){
        return historyService.getProductVersion(parentCode,customCode);
    }
    @ApiOperation(value = "根据产品id和版本查询子件及其关联的物料信息",notes = "8.17修改后使用")
    @GetMapping("getBomAndMaterial")
@@ -71,9 +72,20 @@
        bomHistoryService.downloadProductHistory(req,resp,productId,version);
    }
    @ApiOperation(value = "历史版本可用性设定",notes = "8.31修改后使用")
    @GetMapping("setpHistoryEnable")
    public Response setpHistoryEnable( @RequestParam String parentCode, @RequestParam String customCode, @RequestParam int version,@RequestParam int enabled) {
        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);
    }
    @PostMapping
    @ApiOperation(value = "新增",notes = "解析时返回的绝对路径,需要回传到字段fileUrl")
    public Response add(@RequestBody Product product){
        return service.add(product);
    }
}