|
@@ -0,0 +1,162 @@
|
|
|
+<?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.onemap.apply.mapper.gdbh.TGdbhJctbMapper">
|
|
|
+
|
|
|
+ <resultMap type="TGdbhJctb" id="TGdbhJctbResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="pcsj" column="pcsj"/>
|
|
|
+ <result property="geom" column="geom"/>
|
|
|
+ <result property="year" column="year"/>
|
|
|
+ <result property="issuedate" column="issuedate"/>
|
|
|
+ <result property="batchinfo" column="batchinfo"/>
|
|
|
+ <result property="regioncode" column="regioncode"/>
|
|
|
+ <result property="shengmc" column="shengmc"/>
|
|
|
+ <result property="shimc" column="shimc"/>
|
|
|
+ <result property="xmc" column="xmc"/>
|
|
|
+ <result property="jcbh" column="jcbh"/>
|
|
|
+ <result property="tblx" column="tblx"/>
|
|
|
+ <result property="qlx" column="qlx"/>
|
|
|
+ <result property="hlx" column="hlx"/>
|
|
|
+ <result property="hlb" column="hlb"/>
|
|
|
+ <result property="qsx" column="qsx"/>
|
|
|
+ <result property="hsx" column="hsx"/>
|
|
|
+ <result property="dqjh" column="dqjh"/>
|
|
|
+ <result property="lzb" column="lzb"/>
|
|
|
+ <result property="bzb" column="bzb"/>
|
|
|
+ <result property="cxbh" column="cxbh"/>
|
|
|
+ <result property="bz" column="bz"/>
|
|
|
+ <result property="jcmj" column="jcmj"/>
|
|
|
+ <result property="gdmj" column="gdmj"/>
|
|
|
+ <result property="nydmj" column="nydmj"/>
|
|
|
+ <result property="dlrdjsydmj" column="dlrdjsydmj"/>
|
|
|
+ <result property="yjjbntmj" column="yjjbntmj"/>
|
|
|
+ <result property="tbxzqdmmax" column="tbxzqdmmax"/>
|
|
|
+ <result property="tbxzqmcmax" column="tbxzqmcmax"/>
|
|
|
+ <result property="tbxzjxzqdm" column="tbxzjxzqdm"/>
|
|
|
+ <result property="tbxzjxzqmc" column="tbxzjxzqmc"/>
|
|
|
+ <result property="tbcjxzqdm" column="tbcjxzqdm"/>
|
|
|
+ <result property="tbcjxzqmc" column="tbcjxzqmc"/>
|
|
|
+ <result property="nzy2018" column="nzy2018"/>
|
|
|
+ <result property="sklx" column="sklx"/>
|
|
|
+ <result property="tskqmj" column="tskqmj"/>
|
|
|
+ <result property="yjkcmj" column="yjkcmj"/>
|
|
|
+ <result property="ysxgdmj" column="ysxgdmj"/>
|
|
|
+ <result property="ysxnydmj" column="ysxnydmj"/>
|
|
|
+ <result property="ysxjsydmj" column="ysxjsydmj"/>
|
|
|
+ <result property="ysxwlydmj" column="ysxwlydmj"/>
|
|
|
+ <result property="ysxjbntmj" column="ysxjbntmj"/>
|
|
|
+ <result property="wsxgdmj" column="wsxgdmj"/>
|
|
|
+ <result property="wsxstmj" column="wsxstmj"/>
|
|
|
+ <result property="wsxnydmj" column="wsxnydmj"/>
|
|
|
+ <result property="wsxjsydmj" column="wsxjsydmj"/>
|
|
|
+ <result property="wsxwlydmj" column="wsxwlydmj"/>
|
|
|
+ <result property="wsxjbntmj" column="wsxjbntmj"/>
|
|
|
+ <result property="sfsk" column="sfsk"/>
|
|
|
+ <result property="startTime" column="startTime"/>
|
|
|
+ <result property="endTime" column="endTime"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTGdbhJctbVo">
|
|
|
+ select id,
|
|
|
+ pcsj,
|
|
|
+ public.st_asewkt(geom) geom, year, issuedate, batchinfo, regioncode, shengmc, shimc, xmc, jcbh, tblx, qlx, hlx, hlb, qsx, hsx, dqjh, lzb, bzb, cxbh, bz, jcmj, gdmj, nydmj, dlrdjsydmj, yjjbntmj, tbxzqdmmax, tbxzqmcmax, tbxzjxzqdm, tbxzjxzqmc, tbcjxzqdm, tbcjxzqmc, nzy2018, sklx, tskqmj, yjkcmj, ysxgdmj, ysxnydmj, ysxjsydmj, ysxwlydmj, ysxjbntmj, wsxgdmj, wsxstmj, wsxnydmj, wsxjsydmj, wsxwlydmj, wsxjbntmj, sfsk
|
|
|
+ from t_gdbh_jctb
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTGdbhJctbList" parameterType="TGdbhJctb" resultMap="TGdbhJctbResult">
|
|
|
+ <include refid="selectTGdbhJctbVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="jcbh != null and jcbh != ''">and jcbh like concat('%',#{jcbh},'%')</if>
|
|
|
+ <if test="regioncode != null and regioncode != ''">and regioncode like concat(#{regioncode},'%')</if>
|
|
|
+ <if test="hlx != null and hlx != ''">and hlx = #{hlx}</if>
|
|
|
+ <if test="startTime != null ">and to_date(hsx , 'YYYYMMDD') >= #{startTime}</if>
|
|
|
+ <if test="endTime != null ">and to_date(hsx , 'YYYYMMDD') <= #{endTime}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTGdbhJctbById" parameterType="String" resultMap="TGdbhJctbResult">
|
|
|
+ <include refid="selectTGdbhJctbVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTGdbhJctb" parameterType="TGdbhJctb">
|
|
|
+ insert into t_gdbh_jctb
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="pcsj != null and pcsj != ''">pcsj,</if>
|
|
|
+ <if test="xzqhdm != null">xzqhdm,</if>
|
|
|
+ <if test="xmc != null">xmc,</if>
|
|
|
+ <if test="jcbh != null and jcbh != ''">jcbh,</if>
|
|
|
+ <if test="qlx != null">qlx,</if>
|
|
|
+ <if test="qlxmc != null">qlxmc,</if>
|
|
|
+ <if test="hlx != null">hlx,</if>
|
|
|
+ <if test="hlxmc != null">hlxmc,</if>
|
|
|
+ <if test="lzb != null">lzb,</if>
|
|
|
+ <if test="bzb != null">bzb,</if>
|
|
|
+ <if test="jcmj != null">jcmj,</if>
|
|
|
+ <if test="qsx != null">qsx,</if>
|
|
|
+ <if test="hsx != null">hsx,</if>
|
|
|
+ <if test="geom != null">geom,</if>
|
|
|
+ <if test="qsxtif != null">qsxtif,</if>
|
|
|
+ <if test="hsxtif != null">hsxtif,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="pcsj != null and pcsj != ''">#{pcsj},</if>
|
|
|
+ <if test="xzqhdm != null">#{xzqhdm},</if>
|
|
|
+ <if test="xmc != null">#{xmc},</if>
|
|
|
+ <if test="jcbh != null and jcbh != ''">#{jcbh},</if>
|
|
|
+ <if test="qlx != null">#{qlx},</if>
|
|
|
+ <if test="qlxmc != null">#{qlxmc},</if>
|
|
|
+ <if test="hlx != null">#{hlx},</if>
|
|
|
+ <if test="hlxmc != null">#{hlxmc},</if>
|
|
|
+ <if test="lzb != null">#{lzb},</if>
|
|
|
+ <if test="bzb != null">#{bzb},</if>
|
|
|
+ <if test="jcmj != null">#{jcmj},</if>
|
|
|
+ <if test="qsx != null">#{qsx},</if>
|
|
|
+ <if test="hsx != null">#{hsx},</if>
|
|
|
+ <if test="geom != null">public.st_transform(public.st_geomfromewkt(#{geom}), 4326),</if>
|
|
|
+ <if test="qsxtif != null">#{qsxtif},</if>
|
|
|
+ <if test="hsxtif != null">#{hsxtif},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTGdbhJctb" parameterType="TGdbhJctb">
|
|
|
+ update t_gdbh_jctb
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="pcsj != null and pcsj != ''">pcsj = #{pcsj},</if>
|
|
|
+ <if test="xzqhdm != null">xzqhdm = #{xzqhdm},</if>
|
|
|
+ <if test="xmc != null">xmc = #{xmc},</if>
|
|
|
+ <if test="jcbh != null and jcbh != ''">jcbh = #{jcbh},</if>
|
|
|
+ <if test="qlx != null">qlx = #{qlx},</if>
|
|
|
+ <if test="qlxmc != null">qlxmc = #{qlxmc},</if>
|
|
|
+ <if test="hlx != null">hlx = #{hlx},</if>
|
|
|
+ <if test="hlxmc != null">hlxmc = #{hlxmc},</if>
|
|
|
+ <if test="lzb != null">lzb = #{lzb},</if>
|
|
|
+ <if test="bzb != null">bzb = #{bzb},</if>
|
|
|
+ <if test="jcmj != null">jcmj = #{jcmj},</if>
|
|
|
+ <if test="qsx != null">qsx = #{qsx},</if>
|
|
|
+ <if test="hsx != null">hsx = #{hsx},</if>
|
|
|
+ <if test="geom != null">geom = #{geom},</if>
|
|
|
+ <if test="qsxtif != null">qsxtif = #{qsxtif},</if>
|
|
|
+ <if test="hsxtif != null">hsxtif = #{hsxtif},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTGdbhJctbById" parameterType="String">
|
|
|
+ delete
|
|
|
+ from t_gdbh_jctb
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTGdbhJctbByIds" parameterType="String">
|
|
|
+ delete from t_gdbh_jctb where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|