| | |
| | | </update> |
| | | |
| | | <!--查询工艺路线列表 左边二级展示--> |
| | | <resultMap id="selectAllTechTemMap" type="map"> |
| | | <id property="name" column="elname"/> |
| | | <collection property="children" resultMap="selectAllTechTemTowMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="selectAllTechTemTowMap" type="map"> |
| | | <result property="name" column="father"/> |
| | | </resultMap> |
| | | <select id="selectAllTechTem" resultMap="selectAllTechTemMap"> |
| | | select e.name elname, |
| | | <select id="selectAllTechTem" resultType="java.util.Map"> |
| | | select distinct |
| | | father |
| | | from mom_ocean.technology_template t, |
| | | mom_ocean.element e, |
| | | mom_ocean.element_technology et |
| | | where e.id = et.element_id |
| | | and t.id = tech_tem_id |
| | | and t.state = 1 |
| | | and et.state=1 |
| | | from mom_ocean.technology_template t |
| | | where t.state = 1 |
| | | and type=#{type} |
| | | <if test="message!=null and message!=''"> |
| | | and father like concat('%',#{message},'%') |
| | |
| | | <select id="selectAllTechNam" resultType="java.util.Map"> |
| | | select id, |
| | | name, |
| | | element, |
| | | device_group |
| | | from mom_ocean.technology_template |
| | | where state = 1 |
| | |
| | | </select> |
| | | |
| | | <!--根据id查看详情--> |
| | | <resultMap id="selecTechByIdMap" type="map"> |
| | | <id property="type" column="type"/> |
| | | <result property="father" column="father"/> |
| | | <result property="name" column="name"/> |
| | | <result property="deviceGroup" column="device_group"/> |
| | | <collection property="children" resultMap="selecTechByIdsMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="selecTechByIdsMap" type="map"> |
| | | <id property="id" column="id"/> |
| | | </resultMap> |
| | | <select id="selecTechById" resultMap="selecTechByIdMap"> |
| | | select e.id, |
| | | father, |
| | | t.name, |
| | | type, |
| | | device_group |
| | | from mom_ocean.technology_template t, |
| | | mom_ocean.element e, |
| | | mom_ocean.element_technology et |
| | | where e.id = et.element_id |
| | | and t.id = tech_tem_id |
| | | and t.state = 1 |
| | | and t.id = #{id} |
| | | <select id="selecTechById" resultType="java.util.Map"> |
| | | select * from mom_ocean.technology_template where state=1 |
| | | </select> |
| | | |
| | | </mapper> |