zf
2023-08-30 9ca0dc6e7833715b875cc9b6b91d5c497b2bae8b
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
<?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.gk.hotwork.Mapper.InspectionExpertGroupMapper" >
 
    <select id="selectPages" resultType="com.gk.hotwork.Domain.InspectionExpertGroup">
        SELECT
            g.*
        FROM
            inspection_expert_group g
            left join safety_self_inspection s on s.id = g.self_inspection_id
            left join company as co on g.checked_company_id = co.id
        WHERE
            g.valid_flag =1
            and s.valid_flag = 1
        <if test="params.inspectionName != null  and params.inspectionName != ''">
            and g.inspection_name like concat("%",#{params.inspectionName},"%")
        </if>
        <if test="params.checkedCompanyName != null and params.checkedCompanyName != ''">
            and g.checked_company_name like concat("%",#{params.checkedCompanyName},"%")
        </if>
        <if test="params.flag != null  and params.flag != '' ">
            and s.flag = #{params.flag}
        </if>
        <if test="params.inspectionStartTime != null and params.inspectionStartTime != ''" >
            and g.inspection_time <![CDATA[ >= ]]> #{params.inspectionStartTime}
        </if>
        <if test="params.inspectionEndTime != null and params.inspectionEndTime != ''" >
            and g.inspection_time <![CDATA[ <= ]]> #{params.inspectionEndTime}
        </if>
        <if test="params.province != null and params.province != ''" >
            and co.province = #{params.province}
        </if>
        <if test="params.city != null and params.city != ''" >
            and co.city = #{params.city}
        </if>
        <if test="params.area != null and params.area != ''" >
            and co.area = #{params.area}
        </if>
        ORDER BY g.create_time
    </select>
 
 
</mapper>