lyh
昨天 d61b21c50e62298f185ecafa8e0b22f7ee8c4973
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
<?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="org.jeecg.modules.eam.mapper.EamReportAccidentsRegisterMapper">
 
    <select id="queryPageList" resultType="org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery">
        SELECT
            aar.*,
            e.equipment_code,
            e.equipment_name,
            e.equipment_model,
            e.installation_position,
            wmo.scrap_part_number,
            wmo.scrap_part_quantity,
            wmo.scrap_part_value
        FROM eam_report_accidents_register aar
                 LEFT JOIN eam_report_repair wmo
                           ON aar.report_id = wmo.id
                               AND wmo.del_flag = 0
                 INNER JOIN eam_equipment e
                            ON wmo.equipment_id = e.id
                                AND e.del_flag = 0
            ${ew.customSqlSegment}
    </select>
    <select id="queryList" resultType="org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto">
        SELECT
            aar.*,
            e.equipment_code,
            e.equipment_name,
            e.equipment_model,
            e.installation_position,
            wmo.scrap_part_number,
            wmo.scrap_part_quantity,
            wmo.scrap_part_value ,
            f.factory_name
        FROM eam_report_accidents_register aar
                 LEFT JOIN eam_report_repair wmo
                           ON aar.report_id = wmo.id
                               AND wmo.del_flag = 0
                 INNER JOIN eam_equipment e
                            ON wmo.equipment_id = e.id
                                AND e.del_flag = 0
                 LEFT JOIN eam_base_factory f ON f.org_code = SUBSTRING ( e.factory_org_code , 1, 6 )
            ${ew.customSqlSegment}
    </select>
</mapper>