zss
2023-08-31 fa40e09b66af9d17b6d2dda1a3d4687ad72bf668
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.TechnologyMapper">
    <!--根据型号id查询版本-->
    <select id="selectVerByTec" resultType="java.lang.Integer">
        select distinct version
        from mom_ocean.technology
        where state = 1
          and specifications_id = #{specificationsId}
        order by version desc
    </select>
 
    <!--右侧数据展示 工艺路线-->
    <resultMap id="selectAllTecMap" type="map">
        <id property="father" column="father"/>
        <collection property="children" resultMap="selectAllTecMaps" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTecMaps" type="map">
        <id property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="dg" column="dg"/>
        <result property="pq" column="pq"/>
    </resultMap>
    <select id="selectAllTec" resultMap="selectAllTecMap">
        select id,
        name,
        father,
        device_group dg,
        production_quota pq
        from mom_ocean.technology
        where state = 1
        and specifications_id = #{specificationsId}
        and version = #{version}
        <if test="message!=null and message!=''">
            and father like concat('%',#{message},'%')
        </if>
    </select>
</mapper>