whycxzp
2022-09-03 24ffd7762ead9354264b29a3374ee46cae07ad45
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;
@@ -44,10 +45,17 @@
            ,  @RequestParam(required = false) String customCode, @RequestParam int pageCurr, @RequestParam int pageSize){
        return service.getAllProduct(parentCode,parentName,parentModel,customCode,pageCurr,pageSize);
    }
    @ApiOperation(value = "查询出所有的产品无参不分页(产品上传的是用)",notes = "9.2修改后使用")
    @GetMapping("getUpBomUseProduct")
    public Response getUpBomUseProduct(){
        return service.getUpBomUseProduct();
    }
    @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")
@@ -81,4 +89,10 @@
    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);
    }
}