whycxzp
2022-10-17 78159d8e95eb4945a67b1264ab9be9203700b42c
修复问题
1个文件已修改
27 ■■■■ 已修改文件
src/main/resources/mapper/ProductBomHistoryMapper.xml 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ProductBomHistoryMapper.xml
@@ -6,19 +6,19 @@
        <result property="productId" column="product_id" />
        <result property="materialId" column="material_id" />
        <result property="quantity" column="quantity"/>
        <result property="category" column="category"/>
        <result property="producer" column="producer"/>
        <result property="material" column="material"/>
        <result property="thickness" column="thickness"/>
        <result property="surfaceDetail" column="surface_detail"/>
        <result property="notes" column="notes"/>
        <association property="materialObj" javaType="com.whyc.pojo.Material">
            <id property="id" column="id" />
            <result property="type" column="type" />
            <result property="category" column="category"/>
            <result property="subCode" column="sub_code"/>
            <result property="subName" column="sub_name"/>
            <result property="subModel" column="sub_model"/>
            <result property="unit" column="unit"/>
            <result property="producer" column="producer"/>
            <result property="material" column="material"/>
            <result property="thickness" column="thickness"/>
            <result property="surfaceDetail" column="surface_detail"/>
            <result property="notes" column="notes"/>
            <result property="pictureUrl" column="picture_url"/>
            <result property="fileUrl" column="file_url"/>
            <result property="dwgUrl" column="dwg_url"/>
@@ -29,6 +29,18 @@
    <update id="updateVersionBatch">
        <foreach collection="list" item="his" separator=";">
            update tb_product_bom_history set e_version = #{his.eVersion} where id = #{his.id}
        </foreach>
    </update>
    <update id="updateMaterialField2BomHistoryBatch">
        <foreach collection="list" item="his" separator=";">
            update tb_product_bom_history set
            category = #{his.category},
            producer = #{his.producer},
            material = #{his.material},
            thickness = #{his.thickness},
            surface_detail = #{his.surfaceDetail},
            notes = #{his.notes}
            where id = #{his.id}
        </foreach>
    </update>
@@ -111,5 +123,8 @@
        and sub_e_version &gt;= #{subVersion}
        and  h.material_id = m.id
    </select>
    <select id="selectListWithMaterialField" resultType="com.whyc.pojo.ProductBomHistory">
        select h.id,m.* from tb_product_bom_history h,tb_material m where h.material_id = m.id;
    </select>
</mapper>