zss
2023-09-01 6a19365f5dea396622b32afe28b3e4b9b067e0e1
standard-server/src/main/resources/mapper/MbomMapper.xml
@@ -46,4 +46,37 @@
            and m.name like concat('%',#{message},'%')
        </if>
    </select>
    <!--根据型号id查询该型号下所有工艺需要的物料清单-->
    <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Mbom">
        select *
        from mom_ocean.mbom
        where state = 1
          and version = #{version}
          and technology_id in (select id
                                from mom_ocean.technology
                                where technology.state = 1
                                  and specifications_id = #{specificationsId})
    </select>
    <!--根据工艺路线id删除物料清单-->
    <update id="delMbomByTecId">
        update mom_ocean.mbom
        set state=0
        where technology_id = #{id}
    </update>
    <!--根据工艺路线id批量删除-->
    <update id="delAllByTecId">
        update mom_ocean.mbom
        set state=0
        where technology_id in (${ids})
    </update>
    <!--根据物料清单id批量删除-->
    <update id="delAllMbom">
        update mom_ocean.mbom
        set state=0
        where id in (${ids})
    </update>
</mapper>