<?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.mosty.yjzl.mapper.TbZlJqMapper">

    <resultMap type="com.mosty.base.model.entity.yjzl.TbZlJq" id="TbZlJq">
        <result property="id" column="id" jdbcType="VARCHAR"/>
        <result property="zlId" column="zlId" jdbcType="VARCHAR"/>
        <result property="jqId" column="jqId" jdbcType="VARCHAR"/>
        <result property="jjdbh" column="jjdbh" jdbcType="VARCHAR"/>
        <result property="gljjdbh" column="gljjdbh" jdbcType="VARCHAR"/>
        <result property="bjsj" column="bjsj" jdbcType="TIMESTAMP"/>
        <result property="jjsj" column="jjsj" jdbcType="TIMESTAMP"/>
        <result property="jqfskssj" column="jqfskssj" jdbcType="TIMESTAMP"/>
        <result property="jqfsjssj" column="jqfsjssj" jdbcType="TIMESTAMP"/>
        <result property="bjdh" column="bjdh" jdbcType="VARCHAR"/>
        <result property="bjdhYhxm" column="bjdhYhxm" jdbcType="VARCHAR"/>
        <result property="bjdhYhdz" column="bjdhYhdz" jdbcType="VARCHAR"/>
        <result property="bjrSfzh" column="bjrSfzh" jdbcType="VARCHAR"/>
        <result property="bjrXm" column="bjrXm" jdbcType="VARCHAR"/>
        <result property="bjrXb" column="bjrXb" jdbcType="VARCHAR"/>
        <result property="bjrLxdh" column="bjrLxdh" jdbcType="VARCHAR"/>
        <result property="bjrZzdw" column="bjrZzdw" jdbcType="VARCHAR"/>
        <result property="sfdzxzqh" column="sfdzxzqh" jdbcType="VARCHAR"/>
        <result property="sfdz" column="sfdz" jdbcType="VARCHAR"/>
        <result property="ldgbh" column="ldgbh" jdbcType="VARCHAR"/>
        <result property="bjnr" column="bjnr" jdbcType="VARCHAR"/>
        <result property="jqjb" column="jqjb" jdbcType="VARCHAR"/>
        <result property="ay" column="ay" jdbcType="VARCHAR"/>
        <result property="bjlb" column="bjlb" jdbcType="VARCHAR"/>
        <result property="bjlbmc" column="bjlbmc" jdbcType="VARCHAR"/>
        <result property="bjlx" column="bjlx" jdbcType="VARCHAR"/>
        <result property="bjlxmc" column="bjlxmc" jdbcType="VARCHAR"/>
        <result property="bjxl" column="bjxl" jdbcType="VARCHAR"/>
        <result property="bjxlmc" column="bjxlmc" jdbcType="VARCHAR"/>
        <result property="bkrs" column="bkrs" jdbcType="NUMERIC"/>
        <result property="ssrs" column="ssrs" jdbcType="NUMERIC"/>
        <result property="swrs" column="swrs" jdbcType="NUMERIC"/>
        <result property="ywwxwz" column="ywwxwz" jdbcType="VARCHAR"/>
        <result property="ywbzxl" column="ywbzxl" jdbcType="VARCHAR"/>
        <result property="ywbkry" column="ywbkry" jdbcType="VARCHAR"/>
        <result property="sfsw" column="sfsw" jdbcType="VARCHAR"/>
        <result property="sfswybj" column="sfswybj" jdbcType="VARCHAR"/>
        <result property="sfzdjq" column="sfzdjq" jdbcType="VARCHAR"/>
        <result property="jd" column="jd" jdbcType="NUMERIC"/>
        <result property="wd" column="wd" jdbcType="NUMERIC"/>
        <result property="zb" column="zb" typeHandler="com.mosty.base.feign.handle.PointTypeHandler"/>
        <result property="zbhash" column="zbhash" jdbcType="VARCHAR"/>
        <result property="zdjqtjlx" column="zdjqtjlx" jdbcType="VARCHAR"/>
        <result property="zldj" column="zldj" jdbcType="VARCHAR"/>
        <result property="qszt" column="qszt" jdbcType="VARCHAR"/>
        <result property="qssj" column="qssj" jdbcType="TIMESTAMP"/>
        <result property="qsyxsj" column="qsyxsj" jdbcType="TIMESTAMP"/>
        <result property="ddxczt" column="ddxczt" jdbcType="VARCHAR"/>
        <result property="ddxcyxsj" column="ddxcyxsj" jdbcType="VARCHAR"/>
        <result property="ddxcsj" column="ddxcsj" jdbcType="TIMESTAMP"/>
        <result property="zlwjzt" column="zlwjzt" jdbcType="VARCHAR"/>
        <result property="zlwjyxsj" column="zlwjyxsj" jdbcType="TIMESTAMP"/>
        <result property="zlwjsj" column="zlwjsj" jdbcType="TIMESTAMP"/>
        <result property="zlwjsm" column="zlwjsm" jdbcType="VARCHAR"/>
        <result property="zlzxzt" column="zlzxzt" jdbcType="VARCHAR"/>
        <result property="czqk" column="czqk" jdbcType="VARCHAR"/>
        <result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
        <result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
        <result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
        <result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
        <result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
        <result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
        <result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
        <result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
        <result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
    </resultMap>

    <insert id="insertEntity" parameterType="com.mosty.base.model.entity.yjzl.TbZlJq">
    insert into tb_zl_jq(id,zl_id,jq_id,jjdbh,gljjdbh,bjsj,jjsj,jqfskssj,jqfsjssj,bjdh,bjdh_yhxm,bjdh_yhdz,bjr_sfzh,bjr_xm,
                        qsyxsj,ddxcyxsj,zlwjyxsj,
                        bjr_xb,bjr_lxdh,bjr_zzdw,sfdzxzqh,sfdz,ldgbh,bjnr,jqjb,ay,bjlb,bjlbmc,bjlx,bjlxmc,bjxl,bjxlmc,bkrs,
                        ssrs,swrs,ywwxwz,ywbzxl,ywbkry,sfsw,sfswybj,sfzdjq,jd,wd,zb,zbhash,zdjqtjlx,zldj,qszt,qssj,ddxczt,
                        ddxcsj,zlwjzt,zlwjsj,zlwjsm,zlzxzt,czqk,ssbm,ssbmdm,ssbmid,ssxgaj,ssxgajdm,ssxgajid,sssgaj,sssgajdm,
                        sssgajid,xt_sjly, xt_sjzt, xt_scbz, xt_cjip, xt_cjsj, xt_cjr_id,xt_cjr, xt_cjbmdm, xt_cjbmmc,
                        xt_zhgxip, xt_zhgxsj, xt_zhgxrid,xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
    )values (
                    #{id},#{zlId},#{jqId},#{jjdbh},#{gljjdbh},#{bjsj},#{jjsj},#{jqfskssj},#{jqfsjssj},#{bjdh},
                    #{bjdhYhxm},#{bjdhYhdz},#{bjrSfzh},#{bjrXm},#{qsyxsj},#{ddxcyxsj},#{zlwjyxsj},
                    #{bjrXb},#{bjrLxdh},#{bjrZzdw},#{sfdzxzqh},
                    #{sfdz},#{ldgbh},#{bjnr},#{jqjb},#{ay},#{bjlb},#{bjlbmc},#{bjlx},#{bjlxmc},#{bjxl},#{bjxlmc},#{bkrs},
                    #{ssrs},#{swrs},#{ywwxwz},#{ywbzxl},#{ywbkry},#{sfsw},#{sfswybj},#{sfzdjq},#{jd},#{wd},
                    ST_GEOMFROMTEXT(#{zb,typeHandler = com.mosty.base.feign.handle.PolygonTypeHandler}),
                    ${zbhash},${zdjqtjlx},${zldj},${qszt},${qssj},${ddxczt},${ddxcsj},${zlwjzt},${zlwjsj},${zlwjsm},${zlzxzt},
                    ${czqk},${ssbm},${ssbmdm},${ssbmid},${ssxgaj},${ssxgajdm},${ssxgajid},${sssgaj},${sssgajdm},
                    ${sssgajid},${xtXjly},${xtSjzt},${xtScbz},${xtCjip},${xtCjsj},${xtCjrId},${xtCjr},${xtCjbmdm},${xtCjbmmc},
                    ${xtZhgxip},${xtZhgxsj},${xtZhgxrid},${xtZhgxr},${xtZhgxbmdm},${xtZhgxbm},${bz}

                )
    </insert>

    <update id="updateEntity" parameterType="com.mosty.base.model.entity.yjzl.TbZlJq">
        update tb_zl_jq
        <set>
            <if test="zlId != null and zlId != ''">
                zl_id = #{zlId},
            </if>
            <if test="jqId != null and jqId != ''">
                jq_id = #{jqId},
            </if>
            <if test="jjdbh != null and jjdbh != ''">
                jjdbh = #{jjdbh},
            </if>
            <if test="gljjdbh != null and gljjdbh != ''">
                gljjdbh = #{gljjdbh},
            </if>
            <if test="bjsj != null">
                bjsj = #{bjsj},
            </if>
            <if test="jjsj != null">
                jjsj = #{jjsj},
            </if>
            <if test="jqfskssj != null">
                jqfskssj = #{jqfskssj},
            </if>
            <if test="jqfsjssj != null">
                jqfsjssj = #{jqfsjssj},
            </if>
            <if test="bjdh != null and bjdh != ''">
                bjdh = #{bjdh},
            </if>
            <if test="bjdhYhxm != null and bjdhYhxm != ''">
                bjdh_yhxm = #{bjdhYhxm},
            </if>
            <if test="bjdhYhdz != null and bjdhYhdz != ''">
                bjdh_yhdz = #{bjdhYhdz},
            </if>
            <if test="bjrSfzh != null and bjrSfzh != ''">
                bjr_sfzh = #{bjrSfzh},
            </if>
            <if test="bjrXm != null and bjrXm != ''">
                bjr_xm = #{bjrXm},
            </if>
            <if test="bjrXb != null and bjrXb != ''">
                bjr_xb = #{bjrXb},
            </if>
            <if test="bjrLxdh != null and bjrLxdh != ''">
                bjr_lxdh = #{bjrLxdh},
            </if>
            <if test="bjrZzdw != null and bjrZzdw != ''">
                bjr_zzdw = #{bjrZzdw},
            </if>

            <if test="sfdzxzqh != null and sfdzxzqh != ''">
                sfdzxzqh = #{sfdzxzqh},
            </if>
            <if test="sfdz != null and sfdz != ''">
                sfdz = #{sfdz},
            </if>
            <if test="ldgbh != null and ldgbh != ''">
                ldgbh = #{ldgbh},
            </if>
            <if test="bjnr != null and bjnr != ''">
                bjnr = #{bjnr},
            </if>
            <if test="jqjb != null and jqjb != ''">
                jqjb = #{jqjb},
            </if>
            <if test="ay != null and ay != ''">
                ay = #{ay},
            </if>
            <if test="bjlb != null and bjlb != ''">
                bjlb = #{bjlb},
            </if>
            <if test="bjlbmc != null and bjlbmc != ''">
                bjlbmc = #{bjlbmc},
            </if>

            <if test="bjlx != null and bjlx != ''">
                bjlx = #{bjlx},
            </if>
            <if test="bjlxmc != null and bjlxmc != ''">
                bjlxmc = #{bjlxmc},
            </if>
            <if test="bjxl != null and bjxl != ''">
                bjxl = #{bjxl},
            </if>
            <if test="bjxlmc != null and bjxlmc != ''">
                bjxlmc = #{bjxlmc},
            </if>
            <if test="bkrs != null">
                bkrs = #{bkrs},
            </if>
            <if test="ssrs != null">
                ssrs = #{ssrs},
            </if>
            <if test="swrs != null">
                swrs = #{swrs},
            </if>
            <if test="ywwxwz != null and ywwxwz != ''">
                ywwxwz = #{ywwxwz},
            </if>
            <if test="ywbzxl != null and ywbzxl != ''">
                ywbzxl = #{ywbzxl},
            </if>
            <if test="ywbkry != null and ywbkry != ''">
                ywbkry = #{ywbkry},
            </if>
            <if test="sfsw != null and sfsw != ''">
                sfsw = #{sfsw},
            </if>
            <if test="sfswybj != null and sfswybj != ''">
                sfswybj = #{sfswybj},
            </if>
            <if test="sfzdjq != null and sfzdjq != ''">
                sfzdjq = #{sfzdjq},
            </if>
            <if test="jd != null">
                jd = #{jd},
            </if>
            <if test="wd != null">
                wd = #{wd},
            </if>
            <if test="zb != null">
                zb =   zb = ST_GEOMFROMTEXT(#{zb,typeHandler=com.mosty.base.feign.handle.PointTypeHandler}),
            </if>
            <if test="zbhash != null and zbhash != ''">
                zbhash = #{zbhash},
            </if>
            <if test="zdjqtjlx != null and zdjqtjlx != ''">
                zdjqtjlx = #{zdjqtjlx},
            </if>
            <if test="zldj != null and zldj != ''">
                zldj = #{zldj},
            </if>
            <if test="qszt != null and qszt != ''">
                qszt = #{qszt},
            </if>
            <if test="qssj != null">
                qssj = #{qssj},
            </if>
            <if test="qsyxsj != null">
                qsyxsj = #{qsyxsj},
            </if>
            <if test="ddxcyxsj != null">
                ddxcyxsj = #{ddxcyxsj},
            </if>
            <if test="zlwjyxsj != null">
                zlwjyxsj = #{zlwjyxsj},
            </if>
            <if test="ddxczt != null and ddxczt != ''">
                ddxczt = #{ddxczt},
            </if>
            <if test="ddxcsj != null">
                ddxcsj = #{ddxcsj},
            </if>
            <if test="zlwjzt != null and zlwjzt != ''">
                zlwjzt = #{zlwjzt},
            </if>
            <if test="zlwjsj != null">
                zlwjsj = #{zlwjsj},
            </if>
            <if test="zlwjsm != null and zlwjsm != ''">
                zlwjsm = #{zlwjsm},
            </if>
            <if test="zlzxzt != null and zlzxzt != ''">
                zlzxzt = #{zlzxzt},
            </if>
            <if test="czqk != null and czqk != ''">
                czqk = #{czqk},
            </if>
            <if test="ssbm != null and ssbm != ''">
                ssbm = #{ssbm},
            </if>
            <if test="ssbmdm != null and ssbmdm != ''">
                ssbmdm = #{ssbmdm},
            </if>
            <if test="ssbmid != null and ssbmid != ''">
                ssbmid = #{ssbmid},
            </if>
            <if test="ssxgaj != null and ssxgaj != ''">
                ssxgaj = #{ssxgaj},
            </if>
            <if test="ssxgajdm != null and ssxgajdm != ''">
                ssxgajdm = #{ssxgajdm},
            </if>
            <if test="ssxgajid != null and ssxgajid != ''">
                ssxgajid = #{ssxgajid},
            </if>
            <if test="sssgaj != null and sssgaj != ''">
                sssgaj = #{sssgaj},
            </if>
            <if test="sssgajdm != null and sssgajdm != ''">
                sssgajdm = #{sssgajdm},
            </if>
            <if test="sssgajid != null and sssgajid != ''">
                sssgajid = #{sssgajid},
            </if>

            <if test="xtSjly != null and xtSjly != ''">
                xt_sjly = #{xtSjly},
            </if>
            <if test="xtSjzt != null and xtSjzt != ''">
                xt_sjzt = #{xtSjzt},
            </if>
            <if test="xtScbz != null and xtScbz != ''">
                xt_scbz = #{xtScbz},
            </if>
            <if test="xtCjip != null and xtCjip != ''">
                xt_cjip = #{xtCjip},
            </if>
            <if test="xtCjsj != null">
                xt_cjsj = #{xtCjsj},
            </if>
            <if test="xtCjrId != null and xtCjrId != ''">
                xt_cjr_id = #{xtCjrId},
            </if>
            <if test="xtCjr != null and xtCjr != ''">
                xt_cjr = #{xtCjr},
            </if>
            <if test="xtCjbmdm != null and xtCjbmdm != ''">
                xt_cjbmdm = #{xtCjbmdm},
            </if>
            <if test="xtCjbmmc != null and xtCjbmmc != ''">
                xt_cjbmmc = #{xtCjbmmc},
            </if>
            <if test="xtZhgxip != null and xtZhgxip != ''">
                xt_zhgxip = #{xtZhgxip},
            </if>
            <if test="xtZhgxsj != null">
                xt_zhgxsj = #{xtZhgxsj},
            </if>
            <if test="xtZhgxrid != null and xtZhgxrid != ''">
                xt_zhgxrid = #{xtZhgxrid},
            </if>
            <if test="xtZhgxr != null and xtZhgxr != ''">
                xt_zhgxr = #{xtZhgxr},
            </if>
            <if test="xtZhgxbmdm != null and xtZhgxbmdm != ''">
                xt_zhgxbmdm = #{xtZhgxbmdm},
            </if>
            <if test="xtZhgxbm != null and xtZhgxbm != ''">
                xt_zhgxbm = #{xtZhgxbm},
            </if>
            <if test="bz != null and bz != ''">
                bz = #{bz}
            </if>
        </set>
        where id = #{id}
    </update>

</mapper>
