|
|
@@ -0,0 +1,225 @@
|
|
|
+<?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.siwei.apply.mapper.cadastre.ZrzMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.siwei.apply.domain.cadastre.Zrz">
|
|
|
+ <id column="bsm" property="bsm"/>
|
|
|
+ <result column="ysdm" property="ysdm"/>
|
|
|
+ <result column="bdcdyh" property="bdcdyh"/>
|
|
|
+ <result column="zddm" property="zddm"/>
|
|
|
+ <result column="xmbh" property="xmbh"/>
|
|
|
+ <result column="dclxtzm" property="dclxtzm"/>
|
|
|
+ <result column="glh" property="glh"/>
|
|
|
+ <result column="dzjgh" property="dzjgh"/>
|
|
|
+ <result column="zrzh" property="zrzh"/>
|
|
|
+ <result column="lzdm" property="lzdm"/>
|
|
|
+ <result column="lzzl" property="lzzl"/>
|
|
|
+ <result column="xmmc" property="xmmc"/>
|
|
|
+ <result column="jzwmc" property="jzwmc"/>
|
|
|
+ <result column="jgrq" property="jgrq"/>
|
|
|
+ <result column="jzwgd" property="jzwgd"/>
|
|
|
+ <result column="zzdmj" property="zzdmj"/>
|
|
|
+ <result column="zydmj" property="zydmj"/>
|
|
|
+ <result column="ycjzmj" property="ycjzmj"/>
|
|
|
+ <result column="scjzmj" property="scjzmj"/>
|
|
|
+ <result column="zcs" property="zcs"/>
|
|
|
+ <result column="dscs" property="dscs"/>
|
|
|
+ <result column="dxcs" property="dxcs"/>
|
|
|
+ <result column="dxsd" property="dxsd"/>
|
|
|
+ <result column="ghyt" property="ghyt"/>
|
|
|
+ <result column="ytmc" property="ytmc"/>
|
|
|
+ <result column="pzyt" property="pzyt"/>
|
|
|
+ <result column="sjyt" property="sjyt"/>
|
|
|
+ <result column="fwjg" property="fwjg"/>
|
|
|
+ <result column="zts" property="zts"/>
|
|
|
+ <result column="dah" property="dah"/>
|
|
|
+ <result column="bz" property="bz"/>
|
|
|
+ <result column="zt" property="zt"/>
|
|
|
+ <result column="djzt" property="djzt"/>
|
|
|
+ <result column="ybdcdyh" property="ybdcdyh"/>
|
|
|
+ <result column="jsxmmc" property="jsxmmc"/>
|
|
|
+ <result column="jsgcghxkzh" property="jsgcghxkzh"/>
|
|
|
+ <result column="jsgcghxkz" property="jsgcghxkz"/>
|
|
|
+ <result column="xcjsghxkzh" property="xcjsghxkzh"/>
|
|
|
+ <result column="xcjsghxkz" property="xcjsghxkz"/>
|
|
|
+ <result column="ghhsjgwj" property="ghhsjgwj"/>
|
|
|
+ <result column="qlrsjsyrlxm" property="qlrsjsyrlxm"/>
|
|
|
+ <result column="fwxz" property="fwxz"/>
|
|
|
+ <result column="gyjzmj" property="gyjzmj"/>
|
|
|
+ <result column="gyqk" property="gyqk"/>
|
|
|
+ <result column="zyjzmj" property="zyjzmj"/>
|
|
|
+ <result column="ftjzmj" property="ftjzmj"/>
|
|
|
+ <result column="fwcqly" property="fwcqly"/>
|
|
|
+ <result column="cqlyzmcl" property="cqlyzmcl"/>
|
|
|
+ <result column="fwqsjxsyt" property="fwqsjxsyt"/>
|
|
|
+ <result column="fct" property="fct"/>
|
|
|
+ <result column="fjsm" property="fjsm"/>
|
|
|
+ <result column="dcyj" property="dcyj"/>
|
|
|
+ <result column="dcy" property="dcy"/>
|
|
|
+ <result column="dcrq" property="dcrq"/>
|
|
|
+ <result column="shyj" property="shyj"/>
|
|
|
+ <result column="shy" property="shy"/>
|
|
|
+ <result column="shrq" property="shrq"/>
|
|
|
+ <result column="fwdcb" property="fwdcb"/>
|
|
|
+ <result column="fcct" property="fcct"/>
|
|
|
+ <result column="bdcdyb" property="bdcdyb"/>
|
|
|
+ <result column="dcdw" property="dcdw"/>
|
|
|
+ <result column="geom" property="geom"/>
|
|
|
+ <result column="valid_flag" property="validFlag"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="add" parameterType="com.siwei.apply.domain.cadastre.Zrz">
|
|
|
+ INSERT INTO vector.zrz (
|
|
|
+ bsm, ysdm, bdcdyh, zddm, xmbh, dclxtzm, glh, dzjgh, zrzh, lzdm,
|
|
|
+ lzzl, xmmc, jzwmc, jgrq, jzwgd, zzdmj, zydmj, ycjzmj, scjzmj, zcs,
|
|
|
+ dscs, dxcs, dxsd, ghyt, ytmc, pzyt, sjyt, fwjg, zts, dah, bz,
|
|
|
+ zt, djzt, ybdcdyh, jsxmmc, jsgcghxkzh, jsgcghxkz, xcjsghxkzh,
|
|
|
+ xcjsghxkz, ghhsjgwj, qlrsjsyrlxm, fwxz, gyjzmj, gyqk, zyjzmj,
|
|
|
+ ftjzmj, fwcqly, cqlyzmcl, fwqsjxsyt, fct, fjsm, dcyj, dcy, dcrq,
|
|
|
+ shyj, shy, shrq, fwdcb, fcct, bdcdyb, dcdw, geom, valid_flag
|
|
|
+ ) VALUES (
|
|
|
+ #{bsm}, #{ysdm}, #{bdcdyh}, #{zddm}, #{xmbh}, #{dclxtzm}, #{glh}, #{dzjgh}, #{zrzh}, #{lzdm},
|
|
|
+ #{lzzl}, #{xmmc}, #{jzwmc}, #{jgrq}, #{jzwgd}, #{zzdmj}, #{zydmj}, #{ycjzmj}, #{scjzmj}, #{zcs},
|
|
|
+ #{dscs}, #{dxcs}, #{dxsd}, #{ghyt}, #{ytmc}, #{pzyt}, #{sjyt}, #{fwjg}, #{zts}, #{dah}, #{bz},
|
|
|
+ #{zt}, #{djzt}, #{ybdcdyh}, #{jsxmmc}, #{jsgcghxkzh}, #{jsgcghxkz}, #{xcjsghxkzh},
|
|
|
+ #{xcjsghxkz}, #{ghhsjgwj}, #{qlrsjsyrlxm}, #{fwxz}, #{gyjzmj}, #{gyqk}, #{zyjzmj},
|
|
|
+ #{ftjzmj}, #{fwcqly}, #{cqlyzmcl}, #{fwqsjxsyt}, #{fct}, #{fjsm}, #{dcyj}, #{dcy}, #{dcrq},
|
|
|
+ #{shyj}, #{shy}, #{shrq}, #{fwdcb}, #{fcct}, #{bdcdyb}, #{dcdw}, #{geom}, #{validFlag}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="get" resultMap="BaseResultMap">
|
|
|
+ SELECT *, ST_AsEWKT(geom) as geom
|
|
|
+ FROM vector.zrz
|
|
|
+ WHERE bsm = #{bsm}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getListByDjzqdm" resultMap="BaseResultMap">
|
|
|
+ SELECT *, ST_AsEWKT(geom) as geom
|
|
|
+ FROM vector.zrz
|
|
|
+ <where>
|
|
|
+ <if test="djzqdm != null and djzqdm != ''">
|
|
|
+ and LEFT(zddm, 12) = #{djzqdm}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getList" resultMap="BaseResultMap">
|
|
|
+ SELECT *, ST_AsEWKT(geom) as geom
|
|
|
+ FROM vector.zrz
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.siwei.apply.domain.cadastre.Zrz">
|
|
|
+ UPDATE vector.zrz
|
|
|
+ <set>
|
|
|
+ <if test="ysdm != null">ysdm = #{ysdm},</if>
|
|
|
+ <if test="bdcdyh != null">bdcdyh = #{bdcdyh},</if>
|
|
|
+ <if test="zddm != null">zddm = #{zddm},</if>
|
|
|
+ <if test="xmbh != null">xmbh = #{xmbh},</if>
|
|
|
+ <if test="dclxtzm != null">dclxtzm = #{dclxtzm},</if>
|
|
|
+ <if test="glh != null">glh = #{glh},</if>
|
|
|
+ <if test="dzjgh != null">dzjgh = #{dzjgh},</if>
|
|
|
+ <if test="zrzh != null">zrzh = #{zrzh},</if>
|
|
|
+ <if test="lzdm != null">lzdm = #{lzdm},</if>
|
|
|
+ <if test="lzzl != null">lzzl = #{lzzl},</if>
|
|
|
+ <if test="xmmc != null">xmmc = #{xmmc},</if>
|
|
|
+ <if test="jzwmc != null">jzwmc = #{jzwmc},</if>
|
|
|
+ <if test="jgrq != null">jgrq = #{jgrq},</if>
|
|
|
+ <if test="jzwgd != null">jzwgd = #{jzwgd},</if>
|
|
|
+ <if test="zzdmj != null">zzdmj = #{zzdmj},</if>
|
|
|
+ <if test="zydmj != null">zydmj = #{zydmj},</if>
|
|
|
+ <if test="ycjzmj != null">ycjzmj = #{ycjzmj},</if>
|
|
|
+ <if test="scjzmj != null">scjzmj = #{scjzmj},</if>
|
|
|
+ <if test="zcs != null">zcs = #{zcs},</if>
|
|
|
+ <if test="dscs != null">dscs = #{dscs},</if>
|
|
|
+ <if test="dxcs != null">dxcs = #{dxcs},</if>
|
|
|
+ <if test="dxsd != null">dxsd = #{dxsd},</if>
|
|
|
+ <if test="ghyt != null">ghyt = #{ghyt},</if>
|
|
|
+ <if test="ytmc != null">ytmc = #{ytmc},</if>
|
|
|
+ <if test="pzyt != null">pzyt = #{pzyt},</if>
|
|
|
+ <if test="sjyt != null">sjyt = #{sjyt},</if>
|
|
|
+ <if test="fwjg != null">fwjg = #{fwjg},</if>
|
|
|
+ <if test="zts != null">zts = #{zts},</if>
|
|
|
+ <if test="dah != null">dah = #{dah},</if>
|
|
|
+ <if test="bz != null">bz = #{bz},</if>
|
|
|
+ <if test="zt != null">zt = #{zt},</if>
|
|
|
+ <if test="djzt != null">djzt = #{djzt},</if>
|
|
|
+ <if test="ybdcdyh != null">ybdcdyh = #{ybdcdyh},</if>
|
|
|
+ <if test="jsxmmc != null">jsxmmc = #{jsxmmc},</if>
|
|
|
+ <if test="jsgcghxkzh != null">jsgcghxkzh = #{jsgcghxkzh},</if>
|
|
|
+ <if test="jsgcghxkz != null">jsgcghxkz = #{jsgcghxkz},</if>
|
|
|
+ <if test="xcjsghxkzh != null">xcjsghxkzh = #{xcjsghxkzh},</if>
|
|
|
+ <if test="xcjsghxkz != null">xcjsghxkz = #{xcjsghxkz},</if>
|
|
|
+ <if test="ghhsjgwj != null">ghhsjgwj = #{ghhsjgwj},</if>
|
|
|
+ <if test="qlrsjsyrlxm != null">qlrsjsyrlxm = #{qlrsjsyrlxm},</if>
|
|
|
+ <if test="fwxz != null">fwxz = #{fwxz},</if>
|
|
|
+ <if test="gyjzmj != null">gyjzmj = #{gyjzmj},</if>
|
|
|
+ <if test="gyqk != null">gyqk = #{gyqk},</if>
|
|
|
+ <if test="zyjzmj != null">zyjzmj = #{zyjzmj},</if>
|
|
|
+ <if test="ftjzmj != null">ftjzmj = #{ftjzmj},</if>
|
|
|
+ <if test="fwcqly != null">fwcqly = #{fwcqly},</if>
|
|
|
+ <if test="cqlyzmcl != null">cqlyzmcl = #{cqlyzmcl},</if>
|
|
|
+ <if test="fwqsjxsyt != null">fwqsjxsyt = #{fwqsjxsyt},</if>
|
|
|
+ <if test="fct != null">fct = #{fct},</if>
|
|
|
+ <if test="fjsm != null">fjsm = #{fjsm},</if>
|
|
|
+ <if test="dcyj != null">dcyj = #{dcyj},</if>
|
|
|
+ <if test="dcy != null">dcy = #{dcy},</if>
|
|
|
+ <if test="dcrq != null">dcrq = #{dcrq},</if>
|
|
|
+ <if test="shyj != null">shyj = #{shyj},</if>
|
|
|
+ <if test="shy != null">shy = #{shy},</if>
|
|
|
+ <if test="shrq != null">shrq = #{shrq},</if>
|
|
|
+ <if test="fwdcb != null">fwdcb = #{fwdcb},</if>
|
|
|
+ <if test="fcct != null">fcct = #{fcct},</if>
|
|
|
+ <if test="bdcdyb != null">bdcdyb = #{bdcdyb},</if>
|
|
|
+ <if test="dcdw != null">dcdw = #{dcdw},</if>
|
|
|
+ <if test="geom != null">geom = #{geom},</if>
|
|
|
+ <if test="validFlag != null">valid_flag = #{validFlag},</if>
|
|
|
+ </set>
|
|
|
+ WHERE bsm = #{bsm}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="getStatisticsByGhyt" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ ghyt,
|
|
|
+ ytmc,
|
|
|
+ djzt,
|
|
|
+ COUNT(*) as count,
|
|
|
+ SUM(scjzmj) as total_scjzmj
|
|
|
+ FROM vector.zrz
|
|
|
+ GROUP BY ghyt, ytmc, djzt
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getZrzqlReportData" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ LEFT(zddm, 12) as djzqdm,
|
|
|
+ ghyt,
|
|
|
+ ytmc,
|
|
|
+ djzt,
|
|
|
+ SUM(scjzmj) as total_area
|
|
|
+ FROM vector.zrz
|
|
|
+ <where>
|
|
|
+ <if test="ghytCodes != null and ghytCodes.size() > 0">
|
|
|
+ AND ghyt IN
|
|
|
+ <foreach item="code" collection="ghytCodes" open="(" separator="," close=")">
|
|
|
+ #{code}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY LEFT(zddm, 12), ghyt, ytmc, djzt
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getDictByType" resultType="java.util.Map">
|
|
|
+ SELECT * FROM "vector"."public_dict"
|
|
|
+ <where>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ AND type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND name LIKE CONCAT('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|