<?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.ObjHazMwMapper">
    <resultMap type="com.goldenwater.slaj.hazard.domain.ObjHazMw" id="ObjHazMwResult">
        <result property="guid" column="guid"/>
        <result property="hazCode" column="haz_code"/>
        <result property="hazName" column="haz_name"/>
        <result property="orgGuid" column="org_guid"/>
        <result property="engGuid" column="eng_guid"/>
        <result property="tendGuid" column="tend_guid"/>
        <result property="hiddGrad" column="hidd_grad"/>
        <result property="proPart" column="pro_part"/>
        <result property="partLong" column="part_long"/>
        <result property="partLat" column="part_lat"/>
        <result property="harmRisk" column="harm_risk"/>
        <result property="moniPrec" column="moni_prec"/>
        <result property="offiTel" column="offi_tel"/>
        <result property="patPers" column="pat_pers"/>
        <result property="supPers" column="sup_pers"/>
        <result property="ifLiceNoti" column="if_lice_noti"/>
        <result property="note" column="note"/>
        <result property="collTime" column="coll_time"/>
        <result property="updTime" column="upd_time"/>
        <result property="recPers" column="rec_pers"/>
        <result property="supPersDept" column="sup_pers_dept"/>
        <result property="safePrec" column="safe_prec"/>
        <result property="emerPrec" column="emer_prec"/>
        <result property="riskGrad" column="risk_grad"/>
        <result property="monitorMeans" column="monitor_means"/>
        <result property="monitorMeasure" column="monitor_measure"/>
        <result property="riskGuid" column="risk_guid"/>
        <result property="organizingPrec" column="organizing_prec"/>
        <result property="techniquePrec" column="technique_prec"/>
        <result property="systemPrec" column="system_prec"/>
        <result property="toDate" column="to_date"/>
        <result property="hazExplain" column="haz_explain"/>
        <result property="writCollTime" column="writ_coll_time"/>
        <result property="orgPers" column="org_pers"/>
        <result property="orgpersTel" column="orgpers_tel"/>
        <result property="onsitePers" column="onsite_pers"/>
        <result property="onsitepersTel" column="onsitepers_tel"/>
        <result property="hazStat" column="haz_stat"/>
        <result property="supTime" column="sup_time"/>
        <result property="supOrg" column="sup_org"/>
        <result property="regTime" column="reg_time"/>
    </resultMap>
    <sql id="selectObjHazMwVo">
        select guid, haz_code, haz_name, org_guid, eng_guid, tend_guid, hidd_grad, pro_part, part_long, part_lat, harm_risk, moni_prec, offi_tel, pat_pers, sup_pers, if_lice_noti, note, coll_time, upd_time, rec_pers, sup_pers_dept, safe_prec, emer_prec, risk_grad, monitor_means, monitor_measure, risk_guid, organizing_prec, technique_prec, system_prec, to_date, haz_explain, writ_coll_time, org_pers, orgpers_tel, onsite_pers, onsitepers_tel, haz_stat, sup_time, sup_org, reg_time
        from obj_haz_mw
    </sql>
    <select id="selectObjHazMwByGuid" parameterType="String" resultMap="ObjHazMwResult">
        <include refid="selectObjHazMwVo"/>
        where guid = #{guid}
    </select>
    <select id="selectObjHazMwList" parameterType="com.goldenwater.slaj.hazard.domain.ObjHazMw" resultMap="ObjHazMwResult">
        <include refid="selectObjHazMwVo"/>
        <where>
            <if test="orgGuid != null and orgGuid != ''">AND org_guid = #{orgGuid}</if>
            <if test="engGuid != null and engGuid != ''">AND eng_guid = #{engGuid}</if>
            <if test="hazStat != null and hazStat != ''">AND haz_stat = #{hazStat}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertObjHazMw" parameterType="com.goldenwater.slaj.hazard.domain.ObjHazMw">
        insert into obj_haz_mw (
            guid, haz_code, haz_name, org_guid, eng_guid, tend_guid, hidd_grad, pro_part, part_long, part_lat, harm_risk, moni_prec, offi_tel, pat_pers, sup_pers, if_lice_noti, note, coll_time, upd_time, rec_pers, sup_pers_dept, safe_prec, emer_prec, risk_grad, monitor_means, monitor_measure, risk_guid, organizing_prec, technique_prec, system_prec, to_date, haz_explain, writ_coll_time, org_pers, orgpers_tel, onsite_pers, onsitepers_tel, haz_stat, sup_time, sup_org, reg_time
        ) 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="updateObjHazMw" parameterType="com.goldenwater.slaj.hazard.domain.ObjHazMw">
        update obj_haz_mw
        <set>
            <if test="hazCode != null">haz_code = #{hazCode},</if>
            <if test="hazName != null">haz_name = #{hazName},</if>
            <if test="orgGuid != null">org_guid = #{orgGuid},</if>
            <if test="engGuid != null">eng_guid = #{engGuid},</if>
            <if test="tendGuid != null">tend_guid = #{tendGuid},</if>
            <if test="hiddGrad != null">hidd_grad = #{hiddGrad},</if>
            <if test="proPart != null">pro_part = #{proPart},</if>
            <if test="partLong != null">part_long = #{partLong},</if>
            <if test="partLat != null">part_lat = #{partLat},</if>
            <if test="harmRisk != null">harm_risk = #{harmRisk},</if>
            <if test="moniPrec != null">moni_prec = #{moniPrec},</if>
            <if test="offiTel != null">offi_tel = #{offiTel},</if>
            <if test="patPers != null">pat_pers = #{patPers},</if>
            <if test="supPers != null">sup_pers = #{supPers},</if>
            <if test="ifLiceNoti != null">if_lice_noti = #{ifLiceNoti},</if>
            <if test="note != null">note = #{note},</if>
            <if test="collTime != null">coll_time = #{collTime},</if>
            <if test="updTime != null">upd_time = #{updTime},</if>
            <if test="recPers != null">rec_pers = #{recPers},</if>
            <if test="supPersDept != null">sup_pers_dept = #{supPersDept},</if>
            <if test="safePrec != null">safe_prec = #{safePrec},</if>
            <if test="emerPrec != null">emer_prec = #{emerPrec},</if>
            <if test="riskGrad != null">risk_grad = #{riskGrad},</if>
            <if test="monitorMeans != null">monitor_means = #{monitorMeans},</if>
            <if test="monitorMeasure != null">monitor_measure = #{monitorMeasure},</if>
            <if test="riskGuid != null">risk_guid = #{riskGuid},</if>
            <if test="organizingPrec != null">organizing_prec = #{organizingPrec},</if>
            <if test="techniquePrec != null">technique_prec = #{techniquePrec},</if>
            <if test="systemPrec != null">system_prec = #{systemPrec},</if>
            <if test="toDate != null">to_date = #{toDate},</if>
            <if test="hazExplain != null">haz_explain = #{hazExplain},</if>
            <if test="writCollTime != null">writ_coll_time = #{writCollTime},</if>
            <if test="orgPers != null">org_pers = #{orgPers},</if>
            <if test="orgpersTel != null">orgpers_tel = #{orgpersTel},</if>
            <if test="onsitePers != null">onsite_pers = #{onsitePers},</if>
            <if test="onsitepersTel != null">onsitepers_tel = #{onsitepersTel},</if>
            <if test="hazStat != null">haz_stat = #{hazStat},</if>
            <if test="supTime != null">sup_time = #{supTime},</if>
            <if test="supOrg != null">sup_org = #{supOrg},</if>
            <if test="regTime != null">reg_time = #{regTime},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteObjHazMwByGuid" parameterType="String">
        delete from obj_haz_mw where guid = #{guid}
    </delete>
    <delete id="deleteObjHazMwByGuids" parameterType="String">
        delete from obj_haz_mw where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>