| | |
| | | List<ProductBom> deleteList = new LinkedList<>(); |
| | | |
| | | //查找到基准产品 |
| | | if(baseProduct == null){ //查找上传的产品最新标准版本 |
| | | if(baseProduct == null){ //查找上传的现有产品表内未锁定的版本 |
| | | baseProductBomList = bomService.getEnabledBomListByParentCodeAndCustomCode(product.getParentCode(),""); |
| | | }else{ //根据baseProduct的code和custom_code |
| | | baseProductBomList = bomService.getEnabledBomListByParentCodeAndCustomCode(baseProduct.getParentCode(),baseProduct.getCustomCode()); |
| | |
| | | where p.id = b.product_id |
| | | and b.material_id = m.id |
| | | and p.parent_code = #{parentCode} and p.custom_code = #{customCode} |
| | | and p.version!=-1 |
| | | </select> |
| | | <insert id="insertBomSelectBomH"> |
| | | insert into db_doc.tb_product_bom(product_id,material_id,sub_version,quantity) |