whycxzp
2022-08-26 eb63ad5d6a206557590de9dcf619464518f2360d
src/main/java/com/whyc/service/ProductBomService.java
@@ -368,8 +368,8 @@
        }
    }
    //查询所有产品中没有与指定散装件关联的子件
    public Response getAllSubWithOutMaterial(int MaterialId) {
        List<ProductBom> list=mapper.getAllSubWithOutMaterial(MaterialId);
    public Response getAllSubWithOutMaterial(int materialId) {
        List<ProductBom> list=mapper.getAllSubWithOutMaterial(materialId);
        return new Response().setII(1,list.size()>0?true:false,list,"返回数据");
    }
   //根据母料型号查询子件信息及有最新版本关联的散装件信息
@@ -422,4 +422,14 @@
        bom.setCreateDate(m.getCreateDate());
        return  bom;
    }
    public void insertBatch(List<ProductBom> productBomList) {
        mapper.insertBatchSomeColumn(productBomList);
    }
    public List<ProductBom> getBomByProductId(Integer productId) {
        QueryWrapper<ProductBom> query = Wrappers.query();
        query.eq("product_id",productId);
        return mapper.selectList(query);
    }
}