whycxzp
2022-09-06 9ecd670306b616918c4cbb193fb41bd300ff44c3
修复bug
2个文件已修改
9 ■■■■■ 已修改文件
src/main/java/com/whyc/service/ProductBomHistoryService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ProductBomMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductBomHistoryService.java
@@ -480,7 +480,7 @@
                    ProductBom diffBom = new ProductBom();
                    String diffQuantity =  "原数量:"+baseBom.getQuantity()+"/新数量:"+bom.getQuantity();
                    diffBom.setNotes(diffQuantity);
                    diffBom.setMaterialObj(bom.getMaterialObj());
                    diffBom.setMaterialObj(baseBom.getMaterialObj());
                    diffList.add(diffBom);
                }
            }
src/main/resources/mapper/ProductBomMapper.xml
@@ -2,8 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.whyc.mapper.ProductBomMapper">
    <resultMap id="Map_ProductBom" type="productBom">
        <result property="quantity" column="quantity"/>
    <resultMap id="Map_ProductBom" type="ProductBom">
        <result property="quantity" column="b_quantity"/>
        <result property="materialId" column="id"/>
        <association property="materialObj" javaType="com.whyc.pojo.Material">
            <id property="id" column="id" />
            <result property="type" column="type" />
@@ -193,7 +194,7 @@
    </select>
    <select id="getEnabledBomListByParentCodeAndCustomCode" resultMap="Map_ProductBom">
        SELECT
        b.quantity,m.*
        b.id b_id,b.quantity b_quantity,m.*
        FROM db_doc.tb_product p,db_doc.tb_product_bom b,db_doc.tb_material m
        where p.id = b.product_id
        and b.material_id = m.id