| | |
| | | private MaterialService mService; |
| | | |
| | | //查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号> |
| | | public Response getAllProduct(String parentCode, String parentName, String parentModel, String customCode, int pageCurr, int pageSize) { |
| | | PageHelper.startPage(pageCurr,pageSize); |
| | | public Response getAllProduct(String subCode,String parentCode, String parentName, String parentModel, String customCode, int pageCurr, int pageSize) { |
| | | /*PageHelper.startPage(pageCurr,pageSize); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | if(parentCode!=null){ |
| | | wrapper.like("parent_code",parentCode); |
| | |
| | | } |
| | | } |
| | | wrapper.orderByAsc("id"); |
| | | List list=mapper.selectList(wrapper); |
| | | List list=mapper.selectList(wrapper);*/ |
| | | List list=mapper.getAllProduct(subCode,parentCode,parentName,parentModel,customCode); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"返回产品信息"); |
| | | } |
| | |
| | | && relatedProduct.getCustomCode().equals(product.getCustomCode()) |
| | | ) |
| | | ) { //属于是产品升级或基于标准产品定制 |
| | | List<MaterialProductHistory> mpList; |
| | | List<MaterialProductHistory> mpList = new LinkedList<>(); |
| | | if (latestProduct != null && enabledProduct != null) { //产品升级 |
| | | mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(parentCode, customCode, enabledProduct.getVersion()); |
| | | }else{ //基于标准产品定制 |
| | | int standardEnabledVersion = getVersion(parentCode, "").getVersion(); |
| | | mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(parentCode,"",standardEnabledVersion); |
| | | }else{ //基于标准产品定制/新添加标准产品 |
| | | Product version = getVersion(parentCode, ""); |
| | | if(version!=null) { //新添加标准产品 |
| | | int standardEnabledVersion = version.getVersion(); |
| | | mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(parentCode, "", standardEnabledVersion); |
| | | } |
| | | } |
| | | if (mpList.size() != 0) { //存在关联关系 |
| | | //当前的产品bom明细包含 继承的产品子件物料,继承关系保留 |