| | |
| | | |
| | | |
| | | import com.whyc.pojo.ProductBomHistory; |
| | | import com.whyc.pojo.ProductSoftware; |
| | | import com.whyc.pojo.Software; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | //读取指定版本产品的子件和关联的物料信息 |
| | | List<ProductBomHistory> getBomHistoryAndMaterial(int productId, int subVersionMax); |
| | | //查询产品的软件 |
| | | List<ProductSoftware> selectSoftware(int productId); |
| | | List<Software> selectSoftware(String parentCode); |
| | | |
| | | List<ProductBomHistory> getBomListByProductIdAndSubVersion(int productId, Integer subVersion); |
| | | |
| | |
| | | |
| | | List<ProductBomHistory> list=mapper.getBomHistoryAndMaterial(productId,pHistory.getSubVersionMax()); |
| | | //查询产品的软件 |
| | | List<ProductSoftware> listsoft=mapper.selectSoftware(productId); |
| | | List<Software> listsoft=mapper.selectSoftware(pHistory.getParentCode()); |
| | | //将没有管理BOM的dwg文件 |
| | | String withOutDwg="doc_file/product"+File.separator+pHistory.getParentModel(); |
| | | if(pHistory.getCustomCode()!=null&&!pHistory.getCustomCode().isEmpty()){ |
| | |
| | | //根据subcode查询软件列表 |
| | | public Response getSoftBySubCode(String subCode) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("sub_code",subCode); |
| | | wrapper.eq("apply_material_code",subCode); |
| | | wrapper.orderByAsc("version"); |
| | | List list=mapper.selectList(wrapper); |
| | | return new Response().setII(1,list.size()>0,list,"软件信息返回"); |
| | |
| | | and tb_material_product_history.s_version<=#{version} |
| | | and tb_material_product_history.e_version>=#{version} |
| | | </select> |
| | | <select id="selectSoftware" resultType="com.whyc.pojo.ProductSoftware"> |
| | | select DISTINCT tb_product_software.* FROM db_doc.tb_product_software,tb_product_history |
| | | where tb_product_software.parent_model=tb_product_history.parent_model |
| | | and tb_product_history.id=#{productId} |
| | | <select id="selectSoftware" resultType="com.whyc.pojo.Software"> |
| | | select DISTINCT tb_software.* FROM db_doc.tb_software |
| | | where apply_material_code=#{parentCode} |
| | | </select> |
| | | <select id="getBomListByProductIdAndSubVersion" resultMap="Map_ProductBomHistory"> |
| | | SELECT h.product_id,h.material_id,h.quantity,m.* |