|
|
@@ -0,0 +1,133 @@
|
|
|
+<?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.GjShijiShouchuMapper">
|
|
|
+
|
|
|
+ <resultMap id="gjShijiShouchuMap" type="com.siwei.apply.domain.GjShijiShouchu">
|
|
|
+ <id column="gid" property="gid"/>
|
|
|
+ <result column="yqsdw" property="yqsdw"/>
|
|
|
+ <result column="scmj" property="scmj"/>
|
|
|
+ <result column="scjg" property="scjg"/>
|
|
|
+ <result column="scwh" property="scwh"/>
|
|
|
+ <result column="scsj" property="scsj"/>
|
|
|
+ <result column="mj" property="mj"/>
|
|
|
+ <result column="scfs" property="scfs"/>
|
|
|
+ <result column="scnd" property="scnd"/>
|
|
|
+ <result column="tdzl" property="tdzl"/>
|
|
|
+ <result column="ytdyt" property="ytdyt"/>
|
|
|
+ <result column="ytdsyqxz" property="ytdsyqxz"/>
|
|
|
+ <result column="wzfbck" property="wzfbck"/>
|
|
|
+ <result column="bz" property="bz"/>
|
|
|
+ <result column="bsm" property="bsm"/>
|
|
|
+ <result column="xzq" property="xzq"/>
|
|
|
+ <result column="dabh" property="dabh"/>
|
|
|
+ <result column="shape_leng" property="shapeLeng"/>
|
|
|
+ <result column="shape_area" property="shapeArea"/>
|
|
|
+ <result column="项目名" property="xmmc"/>
|
|
|
+ <result column="sccb" property="sccb"/>
|
|
|
+ <result column="面积_亩" property="mjMu"/>
|
|
|
+ <result column="geom" property="geom"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="add" parameterType="com.siwei.apply.domain.GjShijiShouchu">
|
|
|
+ INSERT INTO vector.gj_shiji_shouchu (yqsdw, scmj, scjg, scwh, scsj, mj, scfs, scnd, tdzl, ytdyt, ytdsyqxz, wzfbck, bz, bsm, xzq, dabh, shape_leng, shape_area, "项目名", sccb, "面积_亩", geom)
|
|
|
+ VALUES (#{yqsdw}, #{scmj}, #{scjg}, #{scwh}, #{scsj}, #{mj}, #{scfs}, #{scnd}, #{tdzl}, #{ytdyt}, #{ytdsyqxz}, #{wzfbck}, #{bz}, #{bsm}, #{xzq}, #{dabh}, #{shapeLeng}, #{shapeArea}, #{xmmc}, #{sccb}, #{mjMu}, ST_GeomFromEWKT(#{geom}))
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="get" resultMap="gjShijiShouchuMap">
|
|
|
+ SELECT gid, yqsdw, scmj, scjg, scwh, scsj, mj, scfs, scnd, tdzl, ytdyt, ytdsyqxz, wzfbck, bz, bsm, xzq, dabh, shape_leng, shape_area, "项目名", sccb, "面积_亩", ST_AsEWKT(geom) as geom
|
|
|
+ FROM vector.gj_shiji_shouchu
|
|
|
+ WHERE gid = #{gid}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getList" parameterType="com.siwei.apply.domain.vo.GjShijiShouchuFilterVo" resultMap="gjShijiShouchuMap">
|
|
|
+ SELECT gid, yqsdw, scmj, scjg, scwh, scsj, mj, scfs, scnd, tdzl, ytdyt, ytdsyqxz, wzfbck, bz, bsm, xzq, dabh, shape_leng, shape_area, "项目名", sccb, "面积_亩", ST_AsEWKT(geom) as geom
|
|
|
+ FROM vector.gj_shiji_shouchu
|
|
|
+ <where>
|
|
|
+ <if test="xmmc != null and xmmc != ''">
|
|
|
+ AND "项目名" LIKE CONCAT('%', #{xmmc}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="xzq != null and xzq != ''">
|
|
|
+ AND xzq = #{xzq}
|
|
|
+ </if>
|
|
|
+ <if test="scfs != null and scfs != ''">
|
|
|
+ AND scfs = #{scfs}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ AND scsj >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ AND scsj <= #{endDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY gid DESC
|
|
|
+ LIMIT #{pageSize} OFFSET #{offset}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCount" parameterType="com.siwei.apply.domain.vo.GjShijiShouchuFilterVo" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM vector.gj_shiji_shouchu
|
|
|
+ <where>
|
|
|
+ <if test="xmmc != null and xmmc != ''">
|
|
|
+ AND "项目名" LIKE CONCAT('%', #{xmmc}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="xzq != null and xzq != ''">
|
|
|
+ AND xzq = #{xzq}
|
|
|
+ </if>
|
|
|
+ <if test="scfs != null and scfs != ''">
|
|
|
+ AND scfs = #{scfs}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ AND scsj >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ AND scsj <= #{endDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.siwei.apply.domain.GjShijiShouchu">
|
|
|
+ UPDATE vector.gj_shiji_shouchu
|
|
|
+ <set>
|
|
|
+ <if test="yqsdw != null">yqsdw = #{yqsdw},</if>
|
|
|
+ <if test="scmj != null">scmj = #{scmj},</if>
|
|
|
+ <if test="scjg != null">scjg = #{scjg},</if>
|
|
|
+ <if test="scwh != null">scwh = #{scwh},</if>
|
|
|
+ <if test="scsj != null">scsj = #{scsj},</if>
|
|
|
+ <if test="mj != null">mj = #{mj},</if>
|
|
|
+ <if test="scfs != null">scfs = #{scfs},</if>
|
|
|
+ <if test="scnd != null">scnd = #{scnd},</if>
|
|
|
+ <if test="tdzl != null">tdzl = #{tdzl},</if>
|
|
|
+ <if test="ytdyt != null">ytdyt = #{ytdyt},</if>
|
|
|
+ <if test="ytdsyqxz != null">ytdsyqxz = #{ytdsyqxz},</if>
|
|
|
+ <if test="wzfbck != null">wzfbck = #{wzfbck},</if>
|
|
|
+ <if test="bz != null">bz = #{bz},</if>
|
|
|
+ <if test="bsm != null">bsm = #{bsm},</if>
|
|
|
+ <if test="xzq != null">xzq = #{xzq},</if>
|
|
|
+ <if test="dabh != null">dabh = #{dabh},</if>
|
|
|
+ <if test="shapeLeng != null">shape_leng = #{shapeLeng},</if>
|
|
|
+ <if test="shapeArea != null">shape_area = #{shapeArea},</if>
|
|
|
+ <if test="xmmc != null">"项目名" = #{xmmc},</if>
|
|
|
+ <if test="sccb != null">sccb = #{sccb},</if>
|
|
|
+ <if test="mjMu != null">"面积_亩" = #{mjMu},</if>
|
|
|
+ <if test="geom != null">geom = ST_GeomFromEWKT(#{geom}),</if>
|
|
|
+ </set>
|
|
|
+ WHERE gid = #{gid}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="batchDelete">
|
|
|
+ DELETE FROM vector.gj_shiji_shouchu
|
|
|
+ WHERE gid IN
|
|
|
+ <foreach collection="gids" item="gid" open="(" separator="," close=")">
|
|
|
+ #{gid}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <select id="getByGeomIntersects" resultMap="gjShijiShouchuMap">
|
|
|
+ SELECT gid, yqsdw, scmj, scjg, scwh, scsj, mj, scfs, scnd, tdzl, ytdyt, ytdsyqxz, wzfbck, bz, bsm, xzq, dabh, shape_leng, shape_area, "项目名", sccb, "面积_亩", ST_AsEWKT(geom) as geom
|
|
|
+ FROM vector.gj_shiji_shouchu
|
|
|
+ WHERE public.ST_Intersects(geom, public.ST_GeomFromEWKT(#{ewkt}))
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|