<?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>
|