李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?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.chinaztt.mes.quality.mapper.QualityLabelPrintLogMapper">
 
    <resultMap id="baseResultMap" type="com.chinaztt.mes.quality.entity.QualityLabelPrintLog">
        <id property="id" column="id"/>
        <result property="mid" column="mid"/>
        <result property="partBatchNo" column="part_batch_no"/>
        <result property="ifsBatchNo" column="ifs_batch_no"/>
        <result property="wdr" column="wdr"/>
        <result property="partNo" column="part_no"/>
        <result property="qty" column="qty"/>
        <result property="labelInfo" column="label_info"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="createUser" column="create_user"/>
        <result property="updateUser" column="update_user"/>
    </resultMap>
 
 
    <resultMap id="qualityLabelPrintLogDTOMap" type="com.chinaztt.mes.quality.dto.QualityLabelPrintLogDTO">
        <id property="id" column="id"/>
        <result property="mid" column="mid"/>
        <result property="partBatchNo" column="part_batch_no"/>
        <result property="ifsBatchNo" column="ifs_batch_no"/>
        <result property="wdr" column="wdr"/>
        <result property="partNo" column="part_no"/>
        <result property="qty" column="qty"/>
        <result property="labelInfo" column="label_info"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="createUser" column="create_user"/>
        <result property="updateUser" column="update_user"/>
        <result property="updateUser" column="update_user"/>
        <result property="updateUser" column="update_user"/>
        <result property="labelDesc" column="label_desc"/>
        <result property="labelSize" column="label_size"/>
    </resultMap>
 
 
 
 
 
    <select id="getPage" resultMap="qualityLabelPrintLogDTOMap">
        SELECT
        *
        FROM
        (SELECT
        qlpl.*,
        ql.label_desc,
        ql.label_size
        FROM
        quality_label_print_log qlpl
        LEFT JOIN quality_label ql ON qlpl.mid = ql.id
        ) TEMP
        <if test="ew.emptyOfWhere == false">
            ${ew.customSqlSegment}
        </if>
    </select>
 
 
    <select id="getByLogId" resultMap="qualityLabelPrintLogDTOMap">
        SELECT
        qlpl.*,
        ql.label_desc,
        ql.label_size
        FROM
        quality_label_print_log qlpl
        LEFT JOIN quality_label ql ON qlpl.mid = ql.id
        where qlpl.id = #{id}
    </select>
 
 
</mapper>