lxw
2022-08-19 71caf9fda00d0f1d73393d7f15e557240caf63e4
src/main/java/com/whyc/controller/ProductController.java
@@ -2,6 +2,8 @@
import com.whyc.dto.Response;
import com.whyc.pojo.ProductHistory;
import com.whyc.service.MaterialService;
import com.whyc.service.ProductBomService;
import com.whyc.service.ProductHistoryService;
import com.whyc.service.ProductService;
import io.swagger.annotations.Api;
@@ -22,10 +24,16 @@
    @Autowired
    private ProductHistoryService historyService;
    @ApiOperation(tags = "物料管理",value = "根据物料编码查询所有包含该物料的产品信息",notes = "8.17修改后使用")
    @GetMapping("getProductByMaterial")
    public Response getProductByMaterial(@RequestParam String subCode){
        return service.getProductByMaterial(subCode);
    @Autowired
    private ProductBomService bomService;
    @Autowired
    private MaterialService meterService;
    @ApiOperation(value = "建立关联时查询所有的物料(不分页)",notes = "8.17修改后使用")
    @GetMapping("getAllMaterialNoLimit")
    public Response getAllMaterialNoLimit(){
        return meterService.getAllMaterialNoLimit();
    }
    @ApiOperation(value = "查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号>)",notes = "8.17修改后使用")
@@ -39,5 +47,9 @@
    public Response getProductVersion( @RequestParam String parentModel, String customCode){
        return historyService.getProductVersion(parentModel,customCode);
    }
    @ApiOperation(value = "根据产品id查询子件及其关联的物料信息",notes = "8.17修改后使用")
    @GetMapping("getBomAndMaterial")
    public Response getBomAndMaterial( @RequestParam int productId){
        return bomService.getBomAndMaterial(productId);
    }
}