<?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.nantian.cloud.dbcapp.mapper.record.TExceptionHandlingLogMapper">

    <select id="getPage" resultType="com.nantian.cloud.dbcapp.vo.TExceptionHandlingLogVo">
        select * from t_exception_handling_log
        <trim prefix="where" prefixOverrides="and">
            <if test="obj.epc!=null and obj.epc != ''" >
                and epc = #{obj.epc}
            </if>
            <if test="obj.collectItemName!=null and obj.collectItemName != ''" >
                and collect_item_name like  CONCAT('%',#{obj.collectItemName},'%')
            </if>
            <if test="obj.dataCode!=null and obj.dataCode != ''" >
                and data_code like  CONCAT('%',#{obj.dataCode},'%')
            </if>
            <if test="obj.statDate != null and obj.statDate != ''">
                and left(stat_date,10) &gt;= left(#{obj.statDate},10)
            </if>
            <if test="obj.endDate != null and obj.endDate != ''">
                and left(stat_date,10) &lt;= left(#{obj.endDate},10)
            </if>
            <if test="obj.state != null and obj.state != ''">
                and state = #{obj.state}
            </if>
        </trim>
    </select>
</mapper>