zss
2023-09-21 2dbc49184bd74845c8da694c20d6fd03d7ac87e0
base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -6,22 +6,49 @@
        set state=0
        where id in (${ids})
    </update>
    <!--查询工艺路线列表  左边二级展示-->
    <select id="selectAllTechTem" resultType="java.util.Map">
        select distinct
        father
        from mom_ocean.technology_template t
        where t.state = 1
        and type=#{type}
        <if test="message!=null and message!=''">
            and father like concat('%',#{message},'%')
        </if>
    </select>
    <!--查询工艺路线列表 右边展示工艺和设备-->
    <select id="selectAllTechNam" resultType="java.util.Map">
        select id,
        name,
        father,
        element,
        device_group
               name,
               device_group
        from mom_ocean.technology_template
        where state=1
        <if test="type!=null">
            and type=#{type}
        </if>
        <if test="name!=null and name!=''">
            and name like concat('%',#{name},'%')
        </if>
        <if test="father!=null and father!=''">
            and father like concat('%',#{father},'%')
        </if>
        where state = 1
          and father = #{father}
    </select>
    <!--新增工艺路线 选择工序-->
    <select id="chooseTech" resultType="java.lang.String">
        select distinct father
        from mom_ocean.technology_template
        where state = 1
          and type = #{type}
    </select>
    <!--根据id查看详情-->
    <select id="selecTechById" resultType="java.util.Map">
        select *
        from mom_ocean.technology_template
        where state = 1
          and id = #{id}
    </select>
    <!--新增工艺路线-选择类型-->
    <select id="chooseType" resultType="java.lang.String">
        select distinct type
        from mom_ocean.technology_template
        where state = 1
    </select>
</mapper>