| | |
| | | PageHelper.startPage(pageCurr,pageSize); |
| | | List list=mapper.searchCadDrawer(productBom); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0?true:false,pageInfo,"数据返回"); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"数据返回"); |
| | | } |
| | | /* //图纸文件下载 |
| | | public void downloadCadDrawer(HttpServletRequest req, HttpServletResponse resp, List<ProductBom> boms) { |
| | |
| | | wrapper.eq("sub_code",scode); |
| | | wrapper.last("limit 1"); |
| | | ProductBom productBom=mapper.selectOne(wrapper); |
| | | return new Response().setII(1,productBom!=null?true:false,productBom,"返回数据"); |
| | | return new Response().setII(1,productBom!=null,productBom,"返回数据"); |
| | | } |
| | | |
| | | /**获取产品的信息(不包含子料)*/ |
| | |
| | | } |
| | | List list=mapper.selectList(wrapper); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null?true:false,pageInfo,"返回数据"); |
| | | return new Response().setII(1,list!=null,pageInfo,"返回数据"); |
| | | }*/ |
| | | //产品下载(产品id和版本) |
| | | public void downloadProduct(HttpServletRequest req, HttpServletResponse resp, int productId , int version) { |
| | |
| | | //查询所有产品中没有与指定散装件关联的子件 |
| | | public Response getAllSubWithOutMaterial(int materialId) { |
| | | List<ProductBom> list=mapper.getAllSubWithOutMaterial(materialId); |
| | | return new Response().setII(1,list.size()>0?true:false,list,"返回数据"); |
| | | return new Response().setII(1,list.size()>0,list,"返回数据"); |
| | | } |
| | | //根据母料型号查询子件信息及有最新版本关联的散装件信息 |
| | | /*public Response getSubByMaterialProduct(String parentModel) { |
| | |
| | | } |
| | | ); |
| | | } |
| | | return new Response().setII(1,list.size()>0?true:false,list,"返回数据"); |
| | | return new Response().setII(1,list.size()>0,list,"返回数据"); |
| | | }*/ |
| | | //根据产品id查询子件及其关联的物料信息 |
| | | public Response getBomAndMaterial(int productId,int version) { |
| | | List<ProductBom> list=mapper.getBomAndMaterial(productId,version); |
| | | return new Response().setII(1,list.size()>0?true:false,list,"返回物料信息及关联物料"); |
| | | return new Response().setII(1,list.size()>0,list,"返回物料信息及关联物料"); |
| | | } |
| | | |
| | | //将物料存放为一个bom为下载做准备 |