Crunchy
2024-04-23 4f986140a10e71c07c7001ccbcda6e93e17736b1
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?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.StructureItemParameterMapper">
    <select id="selectItemParameterList" resultType="com.yuanchu.mom.pojo.StructureItemParameter">
        select id,
        inspection_item,
        inspection_item_en,
        inspection_item_classify,
        inspection_item_subclass,
        inspection_item_subclass_en,
        laboratory,
        unit,
        price,
        man_hour,
        man_hour_group,
        inspection_item_type,
        device_group,
        checkout_number,
        section,
        value_type,
        create_user,
        update_user,
        create_time,
        update_time,
        method,
        man_day,
        bsm,
        sample,
        inspection_value_type,
        dic,
        template_id,
        son_laboratory,
        ask,
        ask_tell
        from structure_item_parameter
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </select>
 
    <resultMap id="getInsProductions" type="map">
        <result property="name" column="inspection_item"/>
        <collection property="children" resultMap="seProInsListByIdmaps" javaType="List"/>
    </resultMap>
    <resultMap id="seProInsListByIdmaps" type="map">
        <id property="id" column="id"/>
        <result property="name" column="subclass"/>
    </resultMap>
    <select id="getInsProduction" resultMap="getInsProductions">
        select id, inspection_item,
               case when inspection_item_subclass='' then inspection_item
            else inspection_item_subclass end  as subclass
        from structure_item_parameter
    </select>
</mapper>