XiaoRuby
2023-09-01 3b7f72ee9c450955ecef1897d10d27e547f20476
standard-server/src/main/resources/mapper/TechnologyMapper.xml
@@ -12,7 +12,7 @@
    <!--右侧数据展示 工艺路线-->
    <resultMap id="selectAllTecMap" type="map">
        <id property="father" column="father"/>
        <id property="name" column="father"/>
        <collection property="children" resultMap="selectAllTecMaps" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTecMaps" type="map">
@@ -35,4 +35,37 @@
            and father like concat('%',#{message},'%')
        </if>
    </select>
    <!--右上角新增-工艺路线-选择工序-->
    <select id="chooseFather" resultType="java.util.Map">
        select distinct father
        from mom_ocean.technology
        where state = 1
          and specifications_id = #{specificationsId}
    </select>
    <!--右上角新增-技术指标-选择工序,工艺-->
    <resultMap id="chooseTechMap" type="map">
        <id property="name" column="father"/>
        <collection property="children" resultMap="chooseTechMaps" javaType="List"/>
    </resultMap>
    <resultMap id="chooseTechMaps" type="map">
        <id property="id" column="id"/>
        <result property="name" column="name"/>
    </resultMap>
    <select id="chooseTech" resultMap="chooseTechMap">
        select id,
               name,
               father
        from mom_ocean.technology
        where state = 1
          and specifications_id = #{specificationsId}
    </select>
    <!--批量删除-->
    <update id="delAllTech">
        update mom_ocean.technology
        set state=0
        where id in (${ids})
    </update>
</mapper>