<?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.sooka.system.mapper.TGuijiNaturalresourcesBdcdjzxxMapper">
    
    <resultMap type="TGuijiNaturalresourcesBdcdjzxx" id="TGuijiNaturalresourcesBdcdjzxxResult">
        <result property="id"    column="id"    />
        <result property="createTime"    column="create_time"    />
        <result property="cdTime"    column="cd_time"    />
        <result property="cdBatch"    column="cd_batch"    />
        <result property="cdOperation"    column="cd_operation"    />
        <result property="cdSource"    column="cd_source"    />
        <result property="djbh"    column="djbh"    />
        <result property="qlrmc"    column="qlrmc"    />
        <result property="gyfs"    column="gyfs"    />
        <result property="fwzl"    column="fwzl"    />
        <result property="bdcdyh"    column="bdcdyh"    />
        <result property="zsbh"    column="zsbh"    />
        <result property="yt"    column="yt"    />
        <result property="mj"    column="mj"    />
        <result property="qzh"    column="qzh"    />
        <result property="bz"    column="bz"    />
        <result property="tsdw"    column="tsdw"    />
        <result property="fwxz"    column="fwxz"    />
        <result property="dbsj"    column="dbsj"    />
        <result property="dyqr"    column="dyqr"    />
        <result property="dyr"    column="dyr"    />
        <result property="dyzts"    column="dyzts"    />
        <result property="cqje"    column="cqje"    />
        <result property="zwlxqs"    column="zwlxqs"    />
        <result property="zwlxqz"    column="zwlxqz"    />
        <result property="txqzh"    column="txqzh"    />
        <result property="dyygqlr"    column="dyygqlr"    />
        <result property="dyygywr"    column="dyygywr"    />
        <result property="dyygzmh"    column="dyygzmh"    />
        <result property="dyygdjlx"    column="dyygdjlx"    />
        <result property="ygqlr"    column="ygqlr"    />
        <result property="ygywr"    column="ygywr"    />
        <result property="ygzmh"    column="ygzmh"    />
        <result property="ygdjlx"    column="ygdjlx"    />
        <result property="cs"    column="cs"    />
        <result property="fwjg"    column="fwjg"    />
        <result property="hh"    column="hh"    />
        <result property="zcs"    column="zcs"    />
        <result property="szc"    column="szc"    />
        <result property="scjzmj"    column="scjzmj"    />
        <result property="sczyjzmj"    column="sczyjzmj"    />
        <result property="scftjzmj"    column="scftjzmj"    />
        <result property="xz"    column="xz"    />
        <result property="lx"    column="lx"    />
        <result property="tdyt"    column="tdyt"    />
        <result property="tdsyqxks"    column="tdsyqxks"    />
        <result property="tdsyqxjs"    column="tdsyqxjs"    />
        <result property="ywms"    column="ywms"    />
        <result property="zsmc"    column="zsmc"    />
    </resultMap>

    <sql id="selectTGuijiNaturalresourcesBdcdjzxxVo">
        select id, create_time, cd_time, cd_batch, cd_operation, cd_source, djbh, qlrmc, gyfs, fwzl, bdcdyh, zsbh, yt, mj, qzh, bz, tsdw, fwxz, dbsj, dyqr, dyr, dyzts, cqje, zwlxqs, zwlxqz, txqzh, dyygqlr, dyygywr, dyygzmh, dyygdjlx, ygqlr, ygywr, ygzmh, ygdjlx, cs, fwjg, hh, zcs, szc, scjzmj, sczyjzmj, scftjzmj, xz, lx, tdyt, tdsyqxks, tdsyqxjs, ywms, zsmc from t_guiji_naturalresources_bdcdjzxx
    </sql>

    <select id="selectTGuijiNaturalresourcesBdcdjzxxList" parameterType="TGuijiNaturalresourcesBdcdjzxx" resultMap="TGuijiNaturalresourcesBdcdjzxxResult">
        <include refid="selectTGuijiNaturalresourcesBdcdjzxxVo"/>
        <where>
            <if test="yt != null  and yt != ''"> and yt = #{yt}</if>
            <if test="djbh != null  and djbh != ''"> and djbh like concat('%', #{djbh}, '%')</if>
            <if test="qlrmc != null  and qlrmc != ''"> and qlrmc like concat('%', #{qlrmc}, '%')</if>
            <if test="fwzl != null  and fwzl != ''"> and fwzl like concat('%', #{fwzl}, '%')</if>
            <if test="zsbh != null  and zsbh != ''"> and zsbh = #{zsbh}</if>
            <if test="qzh != null  and qzh != ''"> and qzh = #{qzh}</if>
        </where>
        order by create_time desc
    </select>

    <select id="selectTGuijiNaturalresourcesBdcdjxxQtList" parameterType="TGuijiNaturalresourcesBdcdjzxx" resultMap="TGuijiNaturalresourcesBdcdjzxxResult">
        <include refid="selectTGuijiNaturalresourcesBdcdjzxxVo"/>
        <where>
            yt != '住宅' and yt != '办公' and yt != '商业服务'
            <if test="djbh != null  and djbh != ''"> and djbh like concat('%', #{djbh}, '%')</if>
            <if test="qlrmc != null  and qlrmc != ''"> and qlrmc like concat('%', #{qlrmc}, '%')</if>
            <if test="fwzl != null  and fwzl != ''"> and fwzl like concat('%', #{fwzl}, '%')</if>
            <if test="zsbh != null  and zsbh != ''"> and zsbh = #{zsbh}</if>
            <if test="qzh != null  and qzh != ''"> and qzh = #{qzh}</if>
        </where>
        order by create_time desc
    </select>
    
    <select id="selectTGuijiNaturalresourcesBdcdjzxxById" parameterType="String" resultMap="TGuijiNaturalresourcesBdcdjzxxResult">
        <include refid="selectTGuijiNaturalresourcesBdcdjzxxVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertTGuijiNaturalresourcesBdcdjzxx" parameterType="TGuijiNaturalresourcesBdcdjzxx">
        insert into t_guiji_naturalresources_bdcdjzxx
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="createTime != null">create_time,</if>
            <if test="cdTime != null">cd_time,</if>
            <if test="cdBatch != null">cd_batch,</if>
            <if test="cdOperation != null">cd_operation,</if>
            <if test="cdSource != null">cd_source,</if>
            <if test="djbh != null">djbh,</if>
            <if test="qlrmc != null">qlrmc,</if>
            <if test="gyfs != null">gyfs,</if>
            <if test="fwzl != null">fwzl,</if>
            <if test="bdcdyh != null">bdcdyh,</if>
            <if test="zsbh != null">zsbh,</if>
            <if test="yt != null">yt,</if>
            <if test="mj != null">mj,</if>
            <if test="qzh != null">qzh,</if>
            <if test="bz != null">bz,</if>
            <if test="tsdw != null">tsdw,</if>
            <if test="fwxz != null">fwxz,</if>
            <if test="dbsj != null">dbsj,</if>
            <if test="dyqr != null">dyqr,</if>
            <if test="dyr != null">dyr,</if>
            <if test="dyzts != null">dyzts,</if>
            <if test="cqje != null">cqje,</if>
            <if test="zwlxqs != null">zwlxqs,</if>
            <if test="zwlxqz != null">zwlxqz,</if>
            <if test="txqzh != null">txqzh,</if>
            <if test="dyygqlr != null">dyygqlr,</if>
            <if test="dyygywr != null">dyygywr,</if>
            <if test="dyygzmh != null">dyygzmh,</if>
            <if test="dyygdjlx != null">dyygdjlx,</if>
            <if test="ygqlr != null">ygqlr,</if>
            <if test="ygywr != null">ygywr,</if>
            <if test="ygzmh != null">ygzmh,</if>
            <if test="ygdjlx != null">ygdjlx,</if>
            <if test="cs != null">cs,</if>
            <if test="fwjg != null">fwjg,</if>
            <if test="hh != null">hh,</if>
            <if test="zcs != null">zcs,</if>
            <if test="szc != null">szc,</if>
            <if test="scjzmj != null">scjzmj,</if>
            <if test="sczyjzmj != null">sczyjzmj,</if>
            <if test="scftjzmj != null">scftjzmj,</if>
            <if test="xz != null">xz,</if>
            <if test="lx != null">lx,</if>
            <if test="tdyt != null">tdyt,</if>
            <if test="tdsyqxks != null">tdsyqxks,</if>
            <if test="tdsyqxjs != null">tdsyqxjs,</if>
            <if test="ywms != null">ywms,</if>
            <if test="zsmc != null">zsmc,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="cdTime != null">#{cdTime},</if>
            <if test="cdBatch != null">#{cdBatch},</if>
            <if test="cdOperation != null">#{cdOperation},</if>
            <if test="cdSource != null">#{cdSource},</if>
            <if test="djbh != null">#{djbh},</if>
            <if test="qlrmc != null">#{qlrmc},</if>
            <if test="gyfs != null">#{gyfs},</if>
            <if test="fwzl != null">#{fwzl},</if>
            <if test="bdcdyh != null">#{bdcdyh},</if>
            <if test="zsbh != null">#{zsbh},</if>
            <if test="yt != null">#{yt},</if>
            <if test="mj != null">#{mj},</if>
            <if test="qzh != null">#{qzh},</if>
            <if test="bz != null">#{bz},</if>
            <if test="tsdw != null">#{tsdw},</if>
            <if test="fwxz != null">#{fwxz},</if>
            <if test="dbsj != null">#{dbsj},</if>
            <if test="dyqr != null">#{dyqr},</if>
            <if test="dyr != null">#{dyr},</if>
            <if test="dyzts != null">#{dyzts},</if>
            <if test="cqje != null">#{cqje},</if>
            <if test="zwlxqs != null">#{zwlxqs},</if>
            <if test="zwlxqz != null">#{zwlxqz},</if>
            <if test="txqzh != null">#{txqzh},</if>
            <if test="dyygqlr != null">#{dyygqlr},</if>
            <if test="dyygywr != null">#{dyygywr},</if>
            <if test="dyygzmh != null">#{dyygzmh},</if>
            <if test="dyygdjlx != null">#{dyygdjlx},</if>
            <if test="ygqlr != null">#{ygqlr},</if>
            <if test="ygywr != null">#{ygywr},</if>
            <if test="ygzmh != null">#{ygzmh},</if>
            <if test="ygdjlx != null">#{ygdjlx},</if>
            <if test="cs != null">#{cs},</if>
            <if test="fwjg != null">#{fwjg},</if>
            <if test="hh != null">#{hh},</if>
            <if test="zcs != null">#{zcs},</if>
            <if test="szc != null">#{szc},</if>
            <if test="scjzmj != null">#{scjzmj},</if>
            <if test="sczyjzmj != null">#{sczyjzmj},</if>
            <if test="scftjzmj != null">#{scftjzmj},</if>
            <if test="xz != null">#{xz},</if>
            <if test="lx != null">#{lx},</if>
            <if test="tdyt != null">#{tdyt},</if>
            <if test="tdsyqxks != null">#{tdsyqxks},</if>
            <if test="tdsyqxjs != null">#{tdsyqxjs},</if>
            <if test="ywms != null">#{ywms},</if>
            <if test="zsmc != null">#{zsmc},</if>
         </trim>
    </insert>

    <update id="updateTGuijiNaturalresourcesBdcdjzxx" parameterType="TGuijiNaturalresourcesBdcdjzxx">
        update t_guiji_naturalresources_bdcdjzxx
        <trim prefix="SET" suffixOverrides=",">
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="cdTime != null">cd_time = #{cdTime},</if>
            <if test="cdBatch != null">cd_batch = #{cdBatch},</if>
            <if test="cdOperation != null">cd_operation = #{cdOperation},</if>
            <if test="cdSource != null">cd_source = #{cdSource},</if>
            <if test="djbh != null">djbh = #{djbh},</if>
            <if test="qlrmc != null">qlrmc = #{qlrmc},</if>
            <if test="gyfs != null">gyfs = #{gyfs},</if>
            <if test="fwzl != null">fwzl = #{fwzl},</if>
            <if test="bdcdyh != null">bdcdyh = #{bdcdyh},</if>
            <if test="zsbh != null">zsbh = #{zsbh},</if>
            <if test="yt != null">yt = #{yt},</if>
            <if test="mj != null">mj = #{mj},</if>
            <if test="qzh != null">qzh = #{qzh},</if>
            <if test="bz != null">bz = #{bz},</if>
            <if test="tsdw != null">tsdw = #{tsdw},</if>
            <if test="fwxz != null">fwxz = #{fwxz},</if>
            <if test="dbsj != null">dbsj = #{dbsj},</if>
            <if test="dyqr != null">dyqr = #{dyqr},</if>
            <if test="dyr != null">dyr = #{dyr},</if>
            <if test="dyzts != null">dyzts = #{dyzts},</if>
            <if test="cqje != null">cqje = #{cqje},</if>
            <if test="zwlxqs != null">zwlxqs = #{zwlxqs},</if>
            <if test="zwlxqz != null">zwlxqz = #{zwlxqz},</if>
            <if test="txqzh != null">txqzh = #{txqzh},</if>
            <if test="dyygqlr != null">dyygqlr = #{dyygqlr},</if>
            <if test="dyygywr != null">dyygywr = #{dyygywr},</if>
            <if test="dyygzmh != null">dyygzmh = #{dyygzmh},</if>
            <if test="dyygdjlx != null">dyygdjlx = #{dyygdjlx},</if>
            <if test="ygqlr != null">ygqlr = #{ygqlr},</if>
            <if test="ygywr != null">ygywr = #{ygywr},</if>
            <if test="ygzmh != null">ygzmh = #{ygzmh},</if>
            <if test="ygdjlx != null">ygdjlx = #{ygdjlx},</if>
            <if test="cs != null">cs = #{cs},</if>
            <if test="fwjg != null">fwjg = #{fwjg},</if>
            <if test="hh != null">hh = #{hh},</if>
            <if test="zcs != null">zcs = #{zcs},</if>
            <if test="szc != null">szc = #{szc},</if>
            <if test="scjzmj != null">scjzmj = #{scjzmj},</if>
            <if test="sczyjzmj != null">sczyjzmj = #{sczyjzmj},</if>
            <if test="scftjzmj != null">scftjzmj = #{scftjzmj},</if>
            <if test="xz != null">xz = #{xz},</if>
            <if test="lx != null">lx = #{lx},</if>
            <if test="tdyt != null">tdyt = #{tdyt},</if>
            <if test="tdsyqxks != null">tdsyqxks = #{tdsyqxks},</if>
            <if test="tdsyqxjs != null">tdsyqxjs = #{tdsyqxjs},</if>
            <if test="ywms != null">ywms = #{ywms},</if>
            <if test="zsmc != null">zsmc = #{zsmc},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteTGuijiNaturalresourcesBdcdjzxxById" parameterType="String">
        delete from t_guiji_naturalresources_bdcdjzxx where id = #{id}
    </delete>

    <delete id="deleteTGuijiNaturalresourcesBdcdjzxxByIds" parameterType="String">
        delete from t_guiji_naturalresources_bdcdjzxx where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>

</mapper>