hyingbo
2025-06-19 ce8cb72035593058a572b905bedd327cad579f18
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
<?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.SpecialtyInspectionStandardMapper">
 
    <select id="getInspectionStandardList" parameterType="String" resultType="Map">
        SELECT
            t1.id,
            t1.num,
            t1.equipment_id as equipmentId,
            t1.version,
            t1.version_status as versionStatus,
            t4.item_text as versionStatusName,
            t2.num AS equipmentNum,
            t2.NAME AS equipmentName,
            t2.model as equipmentModel,
            t1.create_by as createBy,
            t1.create_time as createTime,
            t1.update_by as updateBy,
            t1.update_time as updateTime,
            t3.depart_name as useDepartName,
            t2.use_id as useId
        FROM
            mom_eam_specialty_inspection_standard t1
        LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id
        left join sys_depart t3 on t2.use_id = t3.id
        left join (select * from v_sys_dict where dict_code = 'version_status') t4 on t1.version_status = t4.item_value
        where t1.del_flag = 0
        <if test="num != 'null' and num != ''">
            and t1.num like concat('%',#{num},'%')
        </if>
        <if test="name != 'null' and name != ''">
            and t2.name like concat('%',#{name},'%')
        </if>
        <if test="versionStatus != 'null' and versionStatus != ''">
            and t1.version_status like concat('%',#{versionStatus},'%')
        </if>
        <if test="versionStatus == 'null' ">
            and t1.version_status='2'
        </if>
        ORDER BY t1.create_time desc
    </select>
</mapper>