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

    <resultMap type="cn.cecep.talroad.domain.BMainHazardousSolidWasteCr" id="BMainHazardousSolidWasteCrResult">
        <result property="id"    column="id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="solidWasteType"    column="solid_waste_type"    />
        <result property="controlRequirements"    column="control_requirements"    />
    </resultMap>


    <sql id="selectBMainHazardousSolidWasteCrVo">
        select id, factory_id, solid_waste_type, control_requirements from b_main_hazardous_solid_waste_cr
    </sql>

    <select id="selectBMainHazardousSolidWasteCrList" parameterType="cn.cecep.talroad.domain.BMainHazardousSolidWasteCr" resultMap="BMainHazardousSolidWasteCrResult">
        <include refid="selectBMainHazardousSolidWasteCrVo"/>
        <where>
            <if test="factoryId != null  and factoryId != ''"> and factory_id = #{factoryId}</if>
            <if test="solidWasteType != null  and solidWasteType != ''"> and solid_waste_type = #{solidWasteType}</if>
            <if test="controlRequirements != null  and controlRequirements != ''"> and control_requirements = #{controlRequirements}</if>
        </where>
    </select>

</mapper>
