<?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="cn.cecep.talroad.mapper.analysis.SRaActionReportsAuditMapper">

    <resultMap type="cn.cecep.talroad.domain.analysis.SRaActionReportsAudit" id="SRaActionReportsAuditResult">
        <result property="id"    column="id"    />
        <result property="reportType"    column="report_type"    />
        <result property="reportTime"    column="report_time"    />
        <result property="totalEnterprises"    column="total_enterprises"    />
        <result property="submittedEnterprises"    column="submitted_enterprises"    />
        <result property="submissionRate"    column="submission_rate"    />
        <result property="nonSubmittedEnterprisesUrl"    column="non_submitted_enterprises_url"    />
        <result property="auditStatus"    column="audit_status"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="updateBy"    column="update_by"    />
    </resultMap>


    <sql id="selectSRaActionReportsAuditVo">
        select id, report_type, report_time, total_enterprises, submitted_enterprises, submission_rate, non_submitted_enterprises_url, audit_status, update_time, create_time, create_by, update_by from s_ra_action_reports_audit
    </sql>

    <select id="selectSRaActionReportsAuditList" parameterType="cn.cecep.talroad.domain.analysis.SRaActionReportsAudit" resultMap="SRaActionReportsAuditResult">
        <include refid="selectSRaActionReportsAuditVo"/>
        <where>
            <if test="reportType != null  and reportType != ''"> and report_type = #{reportType}</if>
            <if test="reportTime != null  and reportTime != ''"> and report_time = #{reportTime}</if>
            <if test="totalEnterprises != null "> and total_enterprises = #{totalEnterprises}</if>
            <if test="submittedEnterprises != null "> and submitted_enterprises = #{submittedEnterprises}</if>
            <if test="submissionRate != null "> and submission_rate = #{submissionRate}</if>
            <if test="nonSubmittedEnterprisesUrl != null  and nonSubmittedEnterprisesUrl != ''"> and non_submitted_enterprises_url = #{nonSubmittedEnterprisesUrl}</if>
            <if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
        </where>
    </select>

</mapper>
