潘志宝
2024-09-05 7fd198b8ebe97cd06b10f96b9179caebe679783c
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
<?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.iailab.module.model.mcs.pre.dao.MmItemOutputDao">
 
    <resultMap id="MmItemOutputVO" type="com.iailab.module.model.mdk.vo.MmItemOutputVO">
        <result property="id" column="ID"/>
        <result property="itemId" column="ITEMID"/>
        <result property="pointId" column="POINTID"/>
        <result property="resultTableName" column="TABLENAME"/>
        <result property="order" column="OUTPUTORDER"/>
    </resultMap>
 
    <select id="getOutPutById" resultMap="MmItemOutputVO">
        SELECT t1.id,
               t1.itemid,
               t1.pointid,
               t2.tablename,
               t1.outputorder
        FROM t_mm_item_output t1,
             t_mm_result_table t2
        WHERE t1.id = #{value}
          AND t1.resulttableid = t2.id
    </select>
    <select id="getOutPutByItemId" resultMap="MmItemOutputVO">
        SELECT t1.id,
               t1.itemid,
               t1.pointid,
               t2.tablename,
               t1.outputorder
        FROM t_mm_item_output t1,
             t_mm_result_table t2
        WHERE t1.itemid = #{value}
          AND t1.resulttableid = t2.id
        ORDER BY t1.outputorder
    </select>
    <select id="getOutPutByPointId" resultMap="MmItemOutputVO">
        SELECT t1.id,
               t1.itemid,
               t1.pointid,
               t2.tablename,
               t1.outputorder
        FROM t_mm_item_output t1,
             t_mm_result_table t2
        WHERE t1.pointid = #{value}
          AND t1.resulttableid = t2.id
        ORDER BY t1.outputorder
    </select>
</mapper>