<?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.SRaActionReportsActualEmissionsMapper">

    <resultMap type="cn.cecep.talroad.domain.analysis.SRaActionReportsActualEmissions" id="SRaActionReportsActualEmissionsResult">
        <result property="id"    column="id"    />
        <result property="reportType"    column="report_type"    />
        <result property="reportTime"    column="report_time"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="factoryName"    column="factory_name"    />
        <result property="outletType"    column="outlet_type"    />
        <result property="outletName"    column="outlet_name"    />
        <result property="outletCode"    column="outlet_code"    />
        <result property="pollutantName"    column="pollutant_name"    />
        <result property="pollutantCode"    column="pollutant_code"    />
        <result property="permittedEmissions"    column="permitted_emissions"    />
        <result property="actualEmissions"    column="actual_emissions"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="createBy"    column="create_by"    />
    </resultMap>


    <sql id="selectSRaActionReportsActualEmissionsVo">
        select srarae.id, report_type, report_time, factory_id, pf.factory_name, outlet_type, outlet_name, outlet_code, pollutant_name, pollutant_code, permitted_emissions, actual_emissions, update_time, update_by, create_time, create_by from s_ra_action_reports_actual_emissions srarae
    </sql>

    <select id="selectSRaActionReportsActualEmissionsList" parameterType="cn.cecep.talroad.domain.analysis.SRaActionReportsActualEmissions" resultMap="SRaActionReportsActualEmissionsResult">
        <include refid="selectSRaActionReportsActualEmissionsVo"/>
            left join pc_factory pf on srarae.factory_id = pf.id
        ${ew.customSqlSegment}
    </select>

    <select id="selectSRaActionReportsActualEmissionsPage" resultMap="SRaActionReportsActualEmissionsResult">
        <include refid="selectSRaActionReportsActualEmissionsVo"/>
        left join pc_factory pf on srarae.factory_id = pf.id
        ${ew.customSqlSegment}
    </select>

</mapper>
