<?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.goldenwater.slaj.hazard.mapper.TBusiHazEvainMapper">
    <resultMap type="com.goldenwater.slaj.hazard.domain.TBusiHazEvain" id="TBusiHazEvainResult">
        <result property="guid" column="guid"/>
        <result property="orgGuid" column="org_guid"/>
        <result property="engNum" column="eng_num"/>
        <result property="ybHaz" column="yb_haz"/>
        <result property="zdHaz" column="zd_haz"/>
        <result property="yxYbHaz" column="yx_yb_haz"/>
        <result property="yxZdHaz" column="yx_zd_haz"/>
        <result property="yxYbGk" column="yx_yb_gk"/>
        <result property="yxZdGk" column="yx_zd_gk"/>
        <result property="hazBsl" column="haz_bsl"/>
        <result property="hazYbGkl" column="haz_yb_gkl"/>
        <result property="hazZdGkl" column="haz_zd_gkl"/>
        <result property="zhGkl" column="zh_gkl"/>
        <result property="bslQz" column="bsl_qz"/>
        <result property="gkQz" column="gk_qz"/>
        <result property="bsFx" column="bs_fx"/>
        <result property="gkFx" column="gk_fx"/>
        <result property="hazFx" column="haz_fx"/>
        <result property="createTime" column="create_time"/>
        <result property="startDate" column="start_date"/>
        <result property="endDate" column="end_date"/>
        <result property="ybBsl" column="yb_bsl"/>
        <result property="zdBsl" column="zd_bsl"/>
        <result property="ybsNum" column="ybs_num"/>
        <result property="ybYbs" column="yb_ybs"/>
        <result property="dxEng" column="dx_eng"/>
        <result property="zxEng" column="zx_eng"/>
        <result property="lbl" column="lbl"/>
        <result property="bslXs" column="bsl_xs"/>
        <result property="gklXs" column="gkl_xs"/>
        <result property="zdYbs" column="zd_ybs"/>
        <result property="dateYear" column="date_year"/>
        <result property="dateQuarter" column="date_quarter"/>
        <result property="dateType" column="date_type"/>
        <result property="ybGkHaz" column="yb_gk_haz"/>
        <result property="zdGkHaz" column="zd_gk_haz"/>
        <result property="ybTotGkl" column="yb_tot_gkl"/>
        <result property="zdTotGkl" column="zd_tot_gkl"/>
        <result property="totGkl" column="tot_gkl"/>
        <result property="proTotal" column="pro_total"/>
    </resultMap>
    <sql id="selectTBusiHazEvainVo">
        select guid, org_guid, eng_num, yb_haz, zd_haz, yx_yb_haz, yx_zd_haz, yx_yb_gk, yx_zd_gk, haz_bsl, haz_yb_gkl, haz_zd_gkl, zh_gkl, bsl_qz, gk_qz, bs_fx, gk_fx, haz_fx, create_time, start_date, end_date, yb_bsl, zd_bsl, ybs_num, yb_ybs, dx_eng, zx_eng, lbl, bsl_xs, gkl_xs, zd_ybs, date_year, date_quarter, date_type, yb_gk_haz, zd_gk_haz, yb_tot_gkl, zd_tot_gkl, tot_gkl, pro_total
        from t_busi_haz_evain
    </sql>
    <select id="selectTBusiHazEvainByGuid" parameterType="String" resultMap="TBusiHazEvainResult">
        <include refid="selectTBusiHazEvainVo"/>
        where guid = #{guid}
    </select>
    <select id="selectTBusiHazEvainList" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazEvain" resultMap="TBusiHazEvainResult">
        <include refid="selectTBusiHazEvainVo"/>
        <where>
            <if test="orgGuid != null and orgGuid != ''">AND org_guid = #{orgGuid}</if>
            <if test="dateYear != null and dateYear != ''">AND date_year = #{dateYear}</if>
            <if test="dateQuarter != null and dateQuarter != ''">AND date_quarter = #{dateQuarter}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertTBusiHazEvain" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazEvain">
        insert into t_busi_haz_evain (
            guid, org_guid, eng_num, yb_haz, zd_haz, yx_yb_haz, yx_zd_haz, yx_yb_gk, yx_zd_gk, haz_bsl, haz_yb_gkl, haz_zd_gkl, zh_gkl, bsl_qz, gk_qz, bs_fx, gk_fx, haz_fx, create_time, start_date, end_date, yb_bsl, zd_bsl, ybs_num, yb_ybs, dx_eng, zx_eng, lbl, bsl_xs, gkl_xs, zd_ybs, date_year, date_quarter, date_type, yb_gk_haz, zd_gk_haz, yb_tot_gkl, zd_tot_gkl, tot_gkl, pro_total
        ) values (
            #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}
        )
    </insert>
    <update id="updateTBusiHazEvain" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazEvain">
        update t_busi_haz_evain
        <set>
            <if test="orgGuid != null">org_guid = #{orgGuid},</if>
            <if test="engNum != null">eng_num = #{engNum},</if>
            <if test="ybHaz != null">yb_haz = #{ybHaz},</if>
            <if test="zdHaz != null">zd_haz = #{zdHaz},</if>
            <if test="yxYbHaz != null">yx_yb_haz = #{yxYbHaz},</if>
            <if test="yxZdHaz != null">yx_zd_haz = #{yxZdHaz},</if>
            <if test="yxYbGk != null">yx_yb_gk = #{yxYbGk},</if>
            <if test="yxZdGk != null">yx_zd_gk = #{yxZdGk},</if>
            <if test="hazBsl != null">haz_bsl = #{hazBsl},</if>
            <if test="hazYbGkl != null">haz_yb_gkl = #{hazYbGkl},</if>
            <if test="hazZdGkl != null">haz_zd_gkl = #{hazZdGkl},</if>
            <if test="zhGkl != null">zh_gkl = #{zhGkl},</if>
            <if test="bslQz != null">bsl_qz = #{bslQz},</if>
            <if test="gkQz != null">gk_qz = #{gkQz},</if>
            <if test="bsFx != null">bs_fx = #{bsFx},</if>
            <if test="gkFx != null">gk_fx = #{gkFx},</if>
            <if test="hazFx != null">haz_fx = #{hazFx},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="startDate != null">start_date = #{startDate},</if>
            <if test="endDate != null">end_date = #{endDate},</if>
            <if test="ybBsl != null">yb_bsl = #{ybBsl},</if>
            <if test="zdBsl != null">zd_bsl = #{zdBsl},</if>
            <if test="ybsNum != null">ybs_num = #{ybsNum},</if>
            <if test="ybYbs != null">yb_ybs = #{ybYbs},</if>
            <if test="dxEng != null">dx_eng = #{dxEng},</if>
            <if test="zxEng != null">zx_eng = #{zxEng},</if>
            <if test="lbl != null">lbl = #{lbl},</if>
            <if test="bslXs != null">bsl_xs = #{bslXs},</if>
            <if test="gklXs != null">gkl_xs = #{gklXs},</if>
            <if test="zdYbs != null">zd_ybs = #{zdYbs},</if>
            <if test="dateYear != null">date_year = #{dateYear},</if>
            <if test="dateQuarter != null">date_quarter = #{dateQuarter},</if>
            <if test="dateType != null">date_type = #{dateType},</if>
            <if test="ybGkHaz != null">yb_gk_haz = #{ybGkHaz},</if>
            <if test="zdGkHaz != null">zd_gk_haz = #{zdGkHaz},</if>
            <if test="ybTotGkl != null">yb_tot_gkl = #{ybTotGkl},</if>
            <if test="zdTotGkl != null">zd_tot_gkl = #{zdTotGkl},</if>
            <if test="totGkl != null">tot_gkl = #{totGkl},</if>
            <if test="proTotal != null">pro_total = #{proTotal},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteTBusiHazEvainByGuid" parameterType="String">
        delete from t_busi_haz_evain where guid = #{guid}
    </delete>
    <delete id="deleteTBusiHazEvainByGuids" parameterType="String">
        delete from t_busi_haz_evain where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>