qushaowei
2023-11-06 d40c3ccad0e5264fefd33264254564dead8c80df
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
<?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.MaintenanceStoveExemptMapper">
 
    <select id="getMaintenanceStoveExemptList"  parameterType="Map" resultType="Map">
        SELECT
            t1.id as id,
            t1.sort,
            t2.realname as repairDirectorUserName,
            t3.realname as maintenanceUserName,
            t4.realname as meterUserName,
            ISNULL( t1.result_1, 0 ) AS result_1,
            ISNULL( t1.result_2, 0 ) AS result_2,
            ISNULL( t1.result_3, 0 ) AS result_3,
            ISNULL( t1.result_4, 0 ) AS result_4,
            ISNULL( t1.result_5, 0 ) AS result_5,
            ISNULL( t1.result_6, 0 ) AS result_6,
            ISNULL( t1.result_7, 0 ) AS result_7,
            ISNULL( t1.result_8, 0 ) AS result_8,
            ISNULL( t1.result_9, 0 ) AS result_9,
            ISNULL( t1.result_10, 0 ) AS result_10,
            ISNULL( t1.result_11, 0 ) AS result_11,
            ISNULL( t1.result_12, 0 ) AS result_12,
            ISNULL( t1.result_13, 0 ) AS result_13,
            ISNULL( t1.result_14, 0 ) AS result_14,
            ISNULL( t1.result_15, 0 ) AS result_15,
            ISNULL( t1.result_16, 0 ) AS result_16,
            ISNULL( t1.result_17, 0 ) AS result_17,
            ISNULL( t1.result_18, 0 ) AS result_18,
            ISNULL( t1.result_19, 0 ) AS result_19,
            ISNULL( t1.result_20, 0 ) AS result_20,
            ISNULL( t1.result_21, 0 ) AS result_21,
            ISNULL( t1.result_22, 0 ) AS result_22,
            t1.receipts,
            t5.num as receiptsNum,
            t6.item_text as receiptsName,
            t1.update_time as updateTime
        FROM
            mom_eam_maintenance_stove_exempt t1
        LEFT JOIN sys_user t2 ON t1.repair_director_user = t2.id
        LEFT JOIN sys_user t3 ON t1.maintenance_user = t3.id
        LEFT JOIN sys_user t4 ON t1.meter_user = t4.id
        left join sys_file_name t5 on t1.receipts = t5.id
        left join (SELECT * FROM v_sys_dict WHERE dict_code = 'sys_file_name') t6 on t6.item_value = t5.name
        where t1.del_flag = '0' and t1.maintenance_order_id = #{maintenanceOrderId}
    </select>
</mapper>