DESKTOP-2K9OVK9\siwei 3 сар өмнө
parent
commit
a92838f4a9
14 өөрчлөгдсөн 284 нэмэгдсэн , 456 устгасан
  1. 1 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/analyse/AnalyseUtilsDBController.java
  2. 1 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/analyse/CreateUtilsDBController.java
  3. 2 2
      onemap-modules/onemap-model/src/main/java/com/onemap/sanya/controller/spatial/JZDJAnalyseController.java
  4. 60 6
      onemap-modules/onemap-model/src/main/java/com/onemap/sanya/utils/SpatialOperate.java
  5. 30 39
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/BdcMapper.xml
  6. 21 46
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C12SfjbMapper.xml
  7. 21 46
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C22ZzjbMapper.xml
  8. 21 46
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C32GyjbMapper.xml
  9. 21 46
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C41GfjbMapper.xml
  10. 25 50
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/DltbMapper.xml
  11. 20 45
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/GhdkMapper.xml
  12. 20 43
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/GysyqMapper.xml
  13. 21 44
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/JtownerMapper.xml
  14. 20 43
      onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/JtuseMapper.xml

+ 1 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/analyse/AnalyseUtilsDBController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
+ * 只分析不创建数据
  * 基于pgsql里的POSTGIS做的分析数据组件
  */
 @RestController

+ 1 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/analyse/CreateUtilsDBController.java

@@ -15,6 +15,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
+ * 创建数据
  * 基于pgsql里的POST做的生成数据组件
  */
 @RestController

+ 2 - 2
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/controller/spatial/JZDJAnalyseController.java

@@ -101,7 +101,7 @@ public class JZDJAnalyseController extends BaseController {
             }
             GHDKInfo ghdkInfo = new GHDKInfo();
             ghdkInfo.setId(UUID.randomUUID().toString());
-            List<FldInfo> fldInfos = new ArrayList<>();
+            List<FldInfo> fldInfos = getFieldAnnotationJZDJ(ghdk);
             List<Data> dataList = new ArrayList<>();
             for (FldInfo fldInfo : fldInfos) {
                 Data data = new Data();
@@ -382,7 +382,7 @@ public class JZDJAnalyseController extends BaseController {
      * @throws Exception
      */
     public List<Data> combinationData(Object dataInfo) throws Exception {
-        List<FldInfo> fldInfos = new ArrayList<>();
+        List<FldInfo> fldInfos = getFieldAnnotationJZDJ(dataInfo);
         List<Data> dataList = new ArrayList<>();
         for (FldInfo fldInfo : fldInfos) {
             Data data = new Data();

+ 60 - 6
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/utils/SpatialOperate.java

@@ -155,6 +155,33 @@ public class SpatialOperate {
         return polygon;
     }
 
+    /**
+     * 经纬度转墨卡托   便于面积转换
+     *
+     * @param geom
+     * @return
+     */
+//    public static Geometry lonlat2WebMactor(Geometry geom) {
+//        try {
+//            //这里是以OGC WKT形式定义的是World Mercator投影,网页地图一般使用该投影
+//            CRSAuthorityFactory factory=CRS.getAuthorityFactory(true);
+//            Integer wkid=geom.getSRID();
+//            CoordinateReferenceSystem sourceTarget = factory.createCoordinateReferenceSystem("EPSG:"+4490);
+//
+////            MathTransform transform1 = CRS.findMathTransform(DefaultGeographicCRS.WGS84, sourceTarget);
+////            Geometry geometry1= JTS.transform(geom, transform1);
+//            // 投影转换
+//            CoordinateReferenceSystem crsTarget=factory.createCoordinateReferenceSystem("EPSG:"+4546);
+////            CoordinateReferenceSystem crsTarget = CRS.parseWKT(srid4546);
+//
+//            MathTransform transform2 = CRS.findMathTransform(sourceTarget, crsTarget, false);
+//            return JTS.transform(geom, transform2);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            return null;
+//        }
+//    }
+
     /**
      * 经纬度转墨卡托   便于面积转换
      *
@@ -164,25 +191,23 @@ public class SpatialOperate {
     public static Geometry lonlat2WebMactor(Geometry geom) {
         try {
             //这里是以OGC WKT形式定义的是World Mercator投影,网页地图一般使用该投影
-            CRSAuthorityFactory factory=CRS.getAuthorityFactory(true);
-            Integer wkid=geom.getSRID();
-            CoordinateReferenceSystem sourceTarget = factory.createCoordinateReferenceSystem("EPSG:"+4490);
+
+            CoordinateReferenceSystem sourceTarget = CRS.parseWKT(srid4490);
 
 //            MathTransform transform1 = CRS.findMathTransform(DefaultGeographicCRS.WGS84, sourceTarget);
 //            Geometry geometry1= JTS.transform(geom, transform1);
             // 投影转换
-            CoordinateReferenceSystem crsTarget=factory.createCoordinateReferenceSystem("EPSG:"+4546);
-//            CoordinateReferenceSystem crsTarget = CRS.parseWKT(srid4546);
+            CoordinateReferenceSystem crsTarget = CRS.parseWKT(srid4546);
 
             MathTransform transform2 = CRS.findMathTransform(sourceTarget, crsTarget, false);
             return JTS.transform(geom, transform2);
         } catch (Exception e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
             return null;
         }
     }
 
+
     /**
      * 获取面积(平方米)
      *
@@ -388,6 +413,35 @@ public class SpatialOperate {
         }
         return fldInfos;
     }
+
+    /**
+     * 根据类生成字段列表
+     *
+     * @param object
+     * @return
+     */
+    public static List<FldInfo> getFieldAnnotationJZDJ(Object object) {
+        Field[] fields = object.getClass().getDeclaredFields();
+        List<FldInfo> fldInfos = new ArrayList<>();
+        for (Field field : fields) {
+            // 是否引用ApiModelProperty注解
+            String name = field.getName();
+            String typeName = field.getType().getName();
+
+            boolean bool = field.isAnnotationPresent(Excel.class);
+            String cnName = "";
+            if (bool) {
+                cnName = field.getAnnotation(Excel.class).name();
+//                fldInfos.add(new FldInfo(value);
+                System.out.print(cnName);
+
+            }
+            if (cnName == "" || cnName == null)
+                cnName = name;
+            fldInfos.add(new FldInfo(name, cnName, typeName));
+        }
+        return fldInfos;
+    }
 //
 //    private GeometryFactory geometryFactory = new GeometryFactory();
 //    /**

+ 30 - 39
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/BdcMapper.xml

@@ -5,110 +5,101 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.BdcMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.Bdc" id="BdcResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="gid"    column="gid"    />
+        <result property="id"    column="id"    />
         <result property="height"    column="height"    />
         <result property="floor"    column="floor"    />
+        <result property="geom"    column="geom"    />
         <result property="cqr"    column="cqr"    />
         <result property="address"    column="address"    />
+        <result property="jg"    column="jg"    />
         <result property="grade"    column="grade"    />
         <result property="zdmj"    column="zdmj"    />
         <result property="jzmj"    column="jzmj"    />
-        <result property="jg"    column="jg"    />
     </resultMap>
 
     <sql id="selectBdcVo">
-        select smid, smuserid, smarea, smperimeter, st_asewkt(smgeometry) as smgeometry , height, floor, cqr, address, grade, zdmj, jzmj,jg from bdc
+        select gid, id, height, floor, st_astext(geom) as geom, cqr, address, jg, grade, zdmj, jzmj from "bdc"
     </sql>
 
     <select id="selectBdcList" parameterType="com.onemap.sanya.domain.spatial.Bdc" resultMap="BdcResult">
         <include refid="selectBdcVo"/>
-        <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+        <where>
             <if test="height != null "> and height = #{height}</if>
             <if test="floor != null "> and floor = #{floor}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="cqr != null  and cqr != ''"> and cqr = #{cqr}</if>
             <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="jg != null  and jg != ''"> and jg = #{jg}</if>
             <if test="grade != null "> and grade = #{grade}</if>
             <if test="zdmj != null "> and zdmj = #{zdmj}</if>
             <if test="jzmj != null "> and jzmj = #{jzmj}</if>
-            <if test="jg != null "> and jg = #{jg}</if>
         </where>
     </select>
     
-    <select id="selectBdcBySmid" parameterType="Integer" resultMap="BdcResult">
+    <select id="selectBdcByGid" parameterType="Integer" resultMap="BdcResult">
         <include refid="selectBdcVo"/>
-        where smid = #{smid}
+        where gid = #{gid}
     </select>
+
     <select id="selectBdcByPolygon" parameterType="String" resultMap="BdcResult">
         <include refid="selectBdcVo"/>
-        where st_intersects( st_geomfromewkt(#{polygon}),bdc.smgeometry)
+        where st_intersects( st_geomfromewkt(#{polygon}),bdc.geom)
     </select>
-    <insert id="insertBdc" parameterType="com.onemap.sanya.domain.spatial.Bdc" useGeneratedKeys="true" keyProperty="smid">
+        
+    <insert id="insertBdc" parameterType="com.onemap.sanya.domain.spatial.Bdc" useGeneratedKeys="true" keyProperty="gid">
         insert into bdc
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="id != null">id,</if>
             <if test="height != null">height,</if>
             <if test="floor != null">floor,</if>
+            <if test="geom != null">geom,</if>
             <if test="cqr != null">cqr,</if>
             <if test="address != null">address,</if>
+            <if test="jg != null">jg,</if>
             <if test="grade != null">grade,</if>
             <if test="zdmj != null">zdmj,</if>
             <if test="jzmj != null">jzmj,</if>
-            <if test="jg != null">jg,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="id != null">#{id},</if>
             <if test="height != null">#{height},</if>
             <if test="floor != null">#{floor},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="cqr != null">#{cqr},</if>
             <if test="address != null">#{address},</if>
+            <if test="jg != null">#{jg},</if>
             <if test="grade != null">#{grade},</if>
             <if test="zdmj != null">#{zdmj},</if>
             <if test="jzmj != null">#{jzmj},</if>
-            <if test="jg != null">#{jg},</if>
          </trim>
     </insert>
 
     <update id="updateBdc" parameterType="com.onemap.sanya.domain.spatial.Bdc">
         update bdc
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="id != null">id = #{id},</if>
             <if test="height != null">height = #{height},</if>
             <if test="floor != null">floor = #{floor},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="cqr != null">cqr = #{cqr},</if>
             <if test="address != null">address = #{address},</if>
+            <if test="jg != null">jg = #{jg},</if>
             <if test="grade != null">grade = #{grade},</if>
             <if test="zdmj != null">zdmj = #{zdmj},</if>
             <if test="jzmj != null">jzmj = #{jzmj},</if>
-            <if test="jg != null">jg = #{jg},</if>
         </trim>
-        where smid = #{smid}
+        where gid = #{gid}
     </update>
 
-    <delete id="deleteBdcBySmid" parameterType="Integer">
-        delete from bdc where smid = #{smid}
+    <delete id="deleteBdcByGid" parameterType="Integer">
+        delete from bdc where gid = #{gid}
     </delete>
 
-    <delete id="deleteBdcBySmids" parameterType="String">
-        delete from bdc where smid in 
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteBdcByGids" parameterType="String">
+        delete from bdc where gid in 
+        <foreach item="gid" collection="array" open="(" separator="," close=")">
+            #{gid}
         </foreach>
     </delete>
 </mapper>

+ 21 - 46
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C12SfjbMapper.xml

@@ -5,102 +5,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.C12SfjbMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.C12Sfjb" id="C12SfjbResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid"    column="objectid"    />
         <result property="土地级别"    column="土地级别"    />
         <result property="楼面单价"    column="楼面单价"    />
         <result property="qpbh"    column="qpbh"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectC12SfjbVo">
-        select smid, smuserid, smarea, smperimeter, st_astext(smgeometry) as smgeometry, objectid, 土地级别, 楼面单价, qpbh, shape_length, shape_area from "c1_2_sfjb"
+        select id, st_astext(geom) as geom, objectid, 土地级别, 楼面单价, qpbh from "c1_2_sfjb"
     </sql>
 
     <select id="selectC12SfjbList" parameterType="com.onemap.sanya.domain.spatial.C12Sfjb" resultMap="C12SfjbResult">
         <include refid="selectC12SfjbVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="土地级别 != null  and 土地级别 != ''"> and 土地级别 = #{土地级别}</if>
             <if test="楼面单价 != null "> and 楼面单价 = #{楼面单价}</if>
             <if test="qpbh != null  and qpbh != ''"> and qpbh = #{qpbh}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectC12SfjbBySmid" parameterType="Integer" resultMap="C12SfjbResult">
+    <select id="selectC12SfjbById" parameterType="Integer" resultMap="C12SfjbResult">
         <include refid="selectC12SfjbVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
 
     <select id="selectByPolygon" parameterType="String" resultMap="C12SfjbResult">
         <include refid="selectC12SfjbVo"/>
-        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),smgeometry)
+        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),geom)
     </select>
-
-    <insert id="insertC12Sfjb" parameterType="com.onemap.sanya.domain.spatial.C12Sfjb" useGeneratedKeys="true" keyProperty="smid">
-        insert into "c1_2_sfjb"
+        
+    <insert id="insertC12Sfjb" parameterType="com.onemap.sanya.domain.spatial.C12Sfjb" useGeneratedKeys="true" keyProperty="id">
+        insert into c1_2_sfjb
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid != null">objectid,</if>
             <if test="土地级别 != null">土地级别,</if>
             <if test="楼面单价 != null">楼面单价,</if>
             <if test="qpbh != null">qpbh,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="土地级别 != null">#{土地级别},</if>
             <if test="楼面单价 != null">#{楼面单价},</if>
             <if test="qpbh != null">#{qpbh},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateC12Sfjb" parameterType="com.onemap.sanya.domain.spatial.C12Sfjb">
-        update "c1_2_sfjb"
+        update c1_2_sfjb
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="土地级别 != null">土地级别 = #{土地级别},</if>
             <if test="楼面单价 != null">楼面单价 = #{楼面单价},</if>
             <if test="qpbh != null">qpbh = #{qpbh},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteC12SfjbBySmid" parameterType="Integer">
-        delete from "c1_2_sfjb" where smid = #{smid}
+    <delete id="deleteC12SfjbById" parameterType="Integer">
+        delete from c1_2_sfjb where id = #{id}
     </delete>
 
-    <delete id="deleteC12SfjbBySmids" parameterType="String">
-        delete from "c1_2_sfjb" where smid in
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteC12SfjbByIds" parameterType="String">
+        delete from c1_2_sfjb where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 21 - 46
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C22ZzjbMapper.xml

@@ -5,102 +5,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.C22ZzjbMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.C22Zzjb" id="C22ZzjbResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid"    column="objectid"    />
         <result property="土地级别"    column="土地级别"    />
         <result property="楼面单价"    column="楼面单价"    />
         <result property="qpbh"    column="qpbh"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectC22ZzjbVo">
-        select smid, smuserid, smarea, smperimeter, st_astext(smgeometry) as smgeometry, objectid, 土地级别, 楼面单价, qpbh, shape_length, shape_area from "c2_2_zzjb"
+        select id, st_astext(geom) as geom, objectid, 土地级别, 楼面单价, qpbh from "c2_2_zzjb"
     </sql>
 
     <select id="selectC22ZzjbList" parameterType="com.onemap.sanya.domain.spatial.C22Zzjb" resultMap="C22ZzjbResult">
         <include refid="selectC22ZzjbVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="土地级别 != null  and 土地级别 != ''"> and 土地级别 = #{土地级别}</if>
             <if test="楼面单价 != null "> and 楼面单价 = #{楼面单价}</if>
             <if test="qpbh != null  and qpbh != ''"> and qpbh = #{qpbh}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectC22ZzjbBySmid" parameterType="Integer" resultMap="C22ZzjbResult">
+    <select id="selectC22ZzjbById" parameterType="Integer" resultMap="C22ZzjbResult">
         <include refid="selectC22ZzjbVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
 
     <select id="selectByPolygon" parameterType="String" resultMap="C22ZzjbResult">
         <include refid="selectC22ZzjbVo"/>
-        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),smgeometry)
+        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),geom)
     </select>
-
-    <insert id="insertC22Zzjb" parameterType="com.onemap.sanya.domain.spatial.C22Zzjb" useGeneratedKeys="true" keyProperty="smid">
-        insert into "c2_2_zzjb"
+        
+    <insert id="insertC22Zzjb" parameterType="com.onemap.sanya.domain.spatial.C22Zzjb" useGeneratedKeys="true" keyProperty="id">
+        insert into c2_2_zzjb
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid != null">objectid,</if>
             <if test="土地级别 != null">土地级别,</if>
             <if test="楼面单价 != null">楼面单价,</if>
             <if test="qpbh != null">qpbh,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="土地级别 != null">#{土地级别},</if>
             <if test="楼面单价 != null">#{楼面单价},</if>
             <if test="qpbh != null">#{qpbh},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateC22Zzjb" parameterType="com.onemap.sanya.domain.spatial.C22Zzjb">
-        update "c2_2_zzjb"
+        update c2_2_zzjb
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="土地级别 != null">土地级别 = #{土地级别},</if>
             <if test="楼面单价 != null">楼面单价 = #{楼面单价},</if>
             <if test="qpbh != null">qpbh = #{qpbh},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteC22ZzjbBySmid" parameterType="Integer">
-        delete from "c2_2_zzjb" where smid = #{smid}
+    <delete id="deleteC22ZzjbById" parameterType="Integer">
+        delete from c2_2_zzjb where id = #{id}
     </delete>
 
-    <delete id="deleteC22ZzjbBySmids" parameterType="String">
-        delete from "c2_2_zzjb" where smid in
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteC22ZzjbByIds" parameterType="String">
+        delete from c2_2_zzjb where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 21 - 46
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C32GyjbMapper.xml

@@ -5,102 +5,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.C32GyjbMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.C32Gyjb" id="C32GyjbResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid"    column="objectid"    />
         <result property="土地级别"    column="土地级别"    />
         <result property="楼面单价"    column="楼面单价"    />
         <result property="qpbh"    column="qpbh"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectC32GyjbVo">
-        select smid, smuserid, smarea, smperimeter, st_astext(smgeometry) as smgeometry, objectid, 土地级别, 楼面单价, qpbh, shape_length, shape_area from "c3_2_gyjb"
+        select id, st_astext(geom) as geom, objectid, 土地级别, 楼面单价, qpbh from "c3_2_gyjb"
     </sql>
 
     <select id="selectC32GyjbList" parameterType="com.onemap.sanya.domain.spatial.C32Gyjb" resultMap="C32GyjbResult">
         <include refid="selectC32GyjbVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="土地级别 != null  and 土地级别 != ''"> and 土地级别 = #{土地级别}</if>
             <if test="楼面单价 != null "> and 楼面单价 = #{楼面单价}</if>
             <if test="qpbh != null  and qpbh != ''"> and qpbh = #{qpbh}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectC32GyjbBySmid" parameterType="Integer" resultMap="C32GyjbResult">
+    <select id="selectC32GyjbById" parameterType="Integer" resultMap="C32GyjbResult">
         <include refid="selectC32GyjbVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
 
     <select id="selectByPolygon" parameterType="String" resultMap="C32GyjbResult">
         <include refid="selectC32GyjbVo"/>
-        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),smgeometry)
+        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),geom)
     </select>
-
-    <insert id="insertC32Gyjb" parameterType="com.onemap.sanya.domain.spatial.C32Gyjb" useGeneratedKeys="true" keyProperty="smid">
-        insert into "c3_2_gyjb"
+        
+    <insert id="insertC32Gyjb" parameterType="com.onemap.sanya.domain.spatial.C32Gyjb" useGeneratedKeys="true" keyProperty="id">
+        insert into c3_2_gyjb
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid != null">objectid,</if>
             <if test="土地级别 != null">土地级别,</if>
             <if test="楼面单价 != null">楼面单价,</if>
             <if test="qpbh != null">qpbh,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="土地级别 != null">#{土地级别},</if>
             <if test="楼面单价 != null">#{楼面单价},</if>
             <if test="qpbh != null">#{qpbh},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateC32Gyjb" parameterType="com.onemap.sanya.domain.spatial.C32Gyjb">
-        update "c3_2_gyjb"
+        update c3_2_gyjb
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="土地级别 != null">土地级别 = #{土地级别},</if>
             <if test="楼面单价 != null">楼面单价 = #{楼面单价},</if>
             <if test="qpbh != null">qpbh = #{qpbh},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteC32GyjbBySmid" parameterType="Integer">
-        delete from "c3_2_gyjb" where smid = #{smid}
+    <delete id="deleteC32GyjbById" parameterType="Integer">
+        delete from c3_2_gyjb where id = #{id}
     </delete>
 
-    <delete id="deleteC32GyjbBySmids" parameterType="String">
-        delete from "c3_2_gyjb" where smid in
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteC32GyjbByIds" parameterType="String">
+        delete from c3_2_gyjb where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 21 - 46
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/C41GfjbMapper.xml

@@ -5,11 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.C41GfjbMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.C41Gfjb" id="C41GfjbResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid"    column="objectid"    />
         <result property="土地级别"    column="土地级别"    />
         <result property="qpbh"    column="qpbh"    />
@@ -25,21 +22,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="文化地价"    column="文化_地价"    />
         <result property="公园与绿地公用设施用地"    column="公园与绿地、公用设施用地"    />
         <result property="公园地价"    column="公园_地价"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectC41GfjbVo">
-        select smid, smuserid, smarea, smperimeter, st_astext(smgeometry) as smgeometry, objectid, 土地级别, qpbh, 新闻出版用地, 新闻_地价, 医疗卫生、社会福利用地, 医疗_地价, 教育、科研用地, 教育_地价, 机关团体用地, 机关_地价, 文化设施、体育用地, 文化_地价, 公园与绿地、公用设施用地, 公园_地价, shape_length, shape_area from "c4_1_gfjb"
+        select id, st_astext(geom) as geom,  objectid, 土地级别, qpbh, 新闻出版用地, 新闻_地价, 医疗卫生、社会福利用地, 医疗_地价, 教育、科研用地, 教育_地价, 机关团体用地, 机关_地价, 文化设施、体育用地, 文化_地价, 公园与绿地、公用设施用地, 公园_地价 from "c4_1_gfjb"
     </sql>
 
     <select id="selectC41GfjbList" parameterType="com.onemap.sanya.domain.spatial.C41Gfjb" resultMap="C41GfjbResult">
         <include refid="selectC41GfjbVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="土地级别 != null  and 土地级别 != ''"> and 土地级别 = #{土地级别}</if>
             <if test="qpbh != null  and qpbh != ''"> and qpbh = #{qpbh}</if>
@@ -55,28 +47,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="文化地价 != null "> and 文化_地价 = #{文化地价}</if>
             <if test="公园与绿地、公用设施用地 != null  and 公园与绿地、公用设施用地 != ''"> and 公园与绿地、公用设施用地 = #{公园与绿地、公用设施用地}</if>
             <if test="公园地价 != null "> and 公园_地价 = #{公园地价}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectC41GfjbBySmid" parameterType="Integer" resultMap="C41GfjbResult">
+    <select id="selectC41GfjbById" parameterType="Integer" resultMap="C41GfjbResult">
         <include refid="selectC41GfjbVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
 
     <select id="selectByPolygon" parameterType="String" resultMap="C41GfjbResult">
         <include refid="selectC41GfjbVo"/>
-        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),smgeometry)
+        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),geom)
     </select>
-
-    <insert id="insertC41Gfjb" parameterType="com.onemap.sanya.domain.spatial.C41Gfjb" useGeneratedKeys="true" keyProperty="smid">
-        insert into "c4_1_gfjb"
+        
+    <insert id="insertC41Gfjb" parameterType="com.onemap.sanya.domain.spatial.C41Gfjb" useGeneratedKeys="true" keyProperty="id">
+        insert into c4_1_gfjb
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid != null">objectid,</if>
             <if test="土地级别 != null">土地级别,</if>
             <if test="qpbh != null">qpbh,</if>
@@ -92,14 +79,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="文化地价 != null">文化_地价,</if>
             <if test="公园与绿地、公用设施用地 != null">公园与绿地、公用设施用地,</if>
             <if test="公园地价 != null">公园_地价,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="土地级别 != null">#{土地级别},</if>
             <if test="qpbh != null">#{qpbh},</if>
@@ -115,18 +97,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="文化地价 != null">#{文化地价},</if>
             <if test="公园与绿地、公用设施用地 != null">#{公园与绿地、公用设施用地},</if>
             <if test="公园地价 != null">#{公园地价},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateC41Gfjb" parameterType="com.onemap.sanya.domain.spatial.C41Gfjb">
-        update "c4_1_gfjb"
+        update c4_1_gfjb
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="土地级别 != null">土地级别 = #{土地级别},</if>
             <if test="qpbh != null">qpbh = #{qpbh},</if>
@@ -142,20 +119,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="文化地价 != null">文化_地价 = #{文化地价},</if>
             <if test="公园与绿地、公用设施用地 != null">公园与绿地、公用设施用地 = #{公园与绿地、公用设施用地},</if>
             <if test="公园地价 != null">公园_地价 = #{公园地价},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteC41GfjbBySmid" parameterType="Integer">
-        delete from "c4_1_gfjb" where smid = #{smid}
+    <delete id="deleteC41GfjbById" parameterType="Integer">
+        delete from c4_1_gfjb where id = #{id}
     </delete>
 
-    <delete id="deleteC41GfjbBySmids" parameterType="String">
-        delete from "c4_1_gfjb" where smid in
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteC41GfjbByIds" parameterType="String">
+        delete from c4_1_gfjb where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 25 - 50
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/DltbMapper.xml

@@ -3,13 +3,10 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.onemap.sanya.mapper.spatial.DltbMapper">
-
+    
     <resultMap type="com.onemap.sanya.domain.spatial.Dltb" id="DltbResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id0"    column="id_0"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid"    column="objectid"    />
         <result property="fidDltb2"    column="fid_dltb_2"    />
         <result property="bsm"    column="bsm"    />
@@ -46,21 +43,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="fidNewSh"    column="fid_new_sh"    />
         <result property="id"    column="id"    />
         <result property="ss"    column="ss"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectDltbVo">
-        select smid, smuserid, smarea, smperimeter,  objectid, fid_dltb_2, bsm, ysdm, tbybh, tbbh, dlbm, dlmc, qsxz, qsdwdm, qsdwmc, zldwdm, zldwmc, tbmj, kcdlbm, kcxs, kcmj, tbdlmj, gdlx, gdpdjb, xzdwkd, tbxhdm, tbxhmc, zzsxdm, zzsxmc, gddb, frdbs, czcsxm, sjnf, mssm, hdmc, bz, st_asewkt(smgeometry) as smgeometry  from dltb
+        select id_0,  st_asewkt(geom) as geom, objectid, fid_dltb_2, bsm, ysdm, tbybh, tbbh, dlbm, dlmc, qsxz, qsdwdm, qsdwmc, zldwdm, zldwmc, tbmj, kcdlbm, kcxs, kcmj, tbdlmj, gdlx, gdpdjb, xzdwkd, tbxhdm, tbxhmc, zzsxdm, zzsxmc, gddb, frdbs, czcsxm, sjnf, mssm, hdmc, bz, shape_leng, fid_new_sh, id, ss from dltb
     </sql>
 
     <select id="selectDltbList" parameterType="com.onemap.sanya.domain.spatial.Dltb" resultMap="DltbResult">
         <include refid="selectDltbVo"/>
         <where>
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="fidDltb2 != null "> and fid_dltb_2 = #{fidDltb2}</if>
             <if test="bsm != null  and bsm != ''"> and bsm = #{bsm}</if>
@@ -96,26 +88,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="shapeLeng != null "> and shape_leng = #{shapeLeng}</if>
             <if test="fidNewSh != null "> and fid_new_sh = #{fidNewSh}</if>
             <if test="ss != null "> and ss = #{ss}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
-
-    <select id="selectDltbBySmid" parameterType="Integer" resultMap="DltbResult">
+    
+    <select id="selectDltbById0" parameterType="Integer" resultMap="DltbResult">
         <include refid="selectDltbVo"/>
-        where smid = #{smid}
+        where id_0 = #{id0}
     </select>
+
     <select id="selectDltbByPolygon" parameterType="String" resultMap="DltbResult">
         <include refid="selectDltbVo"/>
-        where st_intersects( st_geomfromewkt(#{polygon}),dltb.smgeometry)
+        where st_intersects( st_geomfromewkt(#{polygon}),dltb.geom)
     </select>
-    <insert id="insertDltb" parameterType="com.onemap.sanya.domain.spatial.Dltb" useGeneratedKeys="true" keyProperty="smid">
+        
+    <insert id="insertDltb" parameterType="com.onemap.sanya.domain.spatial.Dltb" useGeneratedKeys="true" keyProperty="id0">
         insert into dltb
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid != null">objectid,</if>
             <if test="fidDltb2 != null">fid_dltb_2,</if>
             <if test="bsm != null">bsm,</if>
@@ -152,14 +141,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fidNewSh != null">fid_new_sh,</if>
             <if test="id != null">id,</if>
             <if test="ss != null">ss,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
-        </trim>
+         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">st_geomfromewkt(#{smgeometry}),</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="fidDltb2 != null">#{fidDltb2},</if>
             <if test="bsm != null">#{bsm},</if>
@@ -196,18 +180,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fidNewSh != null">#{fidNewSh},</if>
             <if test="id != null">#{id},</if>
             <if test="ss != null">#{ss},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
-        </trim>
+         </trim>
     </insert>
 
     <update id="updateDltb" parameterType="com.onemap.sanya.domain.spatial.Dltb">
         update dltb
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry  = st_geomfromewkt( #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="fidDltb2 != null">fid_dltb_2 = #{fidDltb2},</if>
             <if test="bsm != null">bsm = #{bsm},</if>
@@ -244,22 +223,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fidNewSh != null">fid_new_sh = #{fidNewSh},</if>
             <if test="id != null">id = #{id},</if>
             <if test="ss != null">ss = #{ss},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id_0 = #{id0}
     </update>
 
-    <delete id="deleteDltbBySmid" parameterType="Integer">
-        delete from dltb where smid = #{smid}
+    <delete id="deleteDltbById0" parameterType="Integer">
+        delete from dltb where id_0 = #{id0}
     </delete>
 
-    <delete id="deleteDltbBySmids" parameterType="String">
-        delete from dltb where smid in
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteDltbById0s" parameterType="String">
+        delete from dltb where id_0 in 
+        <foreach item="id0" collection="array" open="(" separator="," close=")">
+            #{id0}
         </foreach>
     </delete>
-
-
-</mapper>
+</mapper>

+ 20 - 45
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/GhdkMapper.xml

@@ -5,11 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.GhdkMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.Ghdk" id="GhdkResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid"    column="objectid"    />
         <result property="sjxzqmc"    column="sjxzqmc"    />
         <result property="xjxzqmc"    column="xjxzqmc"    />
@@ -55,21 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="ydflbz"    column="ydflbz"    />
         <result property="jzxs"    column="jzxs"    />
         <result property="jzxssm"    column="jzxssm"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectGhdkVo">
-        select smid, smuserid, smarea, smperimeter, st_astext(smgeometry) as smgeometry, objectid, sjxzqmc, xjxzqmc, xzmc, ghcgmc, bzsj, bzdw, pzwh, pfsj, sjwt, kzxxgyddm, kzxxgydmc, hhydzbsm, dkbm, dkfbm, ydmj, jzmj, rjld, rjlx, rjlsm, jzmdd, jzmdx, jzmdsm, ldld, ldlx, ldlsm, jzxgd, jzxgx, jzxgsm, pjjdcw, pjjdcwsm, pjfjdcw, kzxzbsm, dkbz, jrx, ghsjyq, cssjyd, pjss, jzmjsm, pjfjdcwsm, xzqdm, bz, ydflbz, jzxs, jzxssm, shape_length, shape_area from "ghdk"
+        select id, st_astext(geom) as geom,  objectid, sjxzqmc, xjxzqmc, xzmc, ghcgmc, bzsj, bzdw, pzwh, pfsj, sjwt, kzxxgyddm, kzxxgydmc, hhydzbsm, dkbm, dkfbm, ydmj, jzmj, rjld, rjlx, rjlsm, jzmdd, jzmdx, jzmdsm, ldld, ldlx, ldlsm, jzxgd, jzxgx, jzxgsm, pjjdcw, pjjdcwsm, pjfjdcw, kzxzbsm, dkbz, jrx, ghsjyq, cssjyd, pjss, jzmjsm, pjfjdcwsm, xzqdm, bz, ydflbz, jzxs, jzxssm from "ghdk"
     </sql>
 
     <select id="selectGhdkList" parameterType="com.onemap.sanya.domain.spatial.Ghdk" resultMap="GhdkResult">
         <include refid="selectGhdkVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="sjxzqmc != null  and sjxzqmc != ''"> and sjxzqmc = #{sjxzqmc}</if>
             <if test="xjxzqmc != null  and xjxzqmc != ''"> and xjxzqmc = #{xjxzqmc}</if>
@@ -115,28 +107,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ydflbz != null  and ydflbz != ''"> and ydflbz = #{ydflbz}</if>
             <if test="jzxs != null "> and jzxs = #{jzxs}</if>
             <if test="jzxssm != null  and jzxssm != ''"> and jzxssm = #{jzxssm}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectGhdkBySmid" parameterType="Integer" resultMap="GhdkResult">
+    <select id="selectGhdkById" parameterType="Integer" resultMap="GhdkResult">
         <include refid="selectGhdkVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
 
     <select id="selectByPolygon" parameterType="String" resultMap="GhdkResult">
         <include refid="selectGhdkVo"/>
-        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),smgeometry)
+        where st_intersects( ST_Transform(st_geomfromewkt(#{polygon}),4490),geom)
     </select>
         
-    <insert id="insertGhdk" parameterType="com.onemap.sanya.domain.spatial.Ghdk" useGeneratedKeys="true" keyProperty="smid">
-        insert into "ghdk"
+    <insert id="insertGhdk" parameterType="com.onemap.sanya.domain.spatial.Ghdk" useGeneratedKeys="true" keyProperty="id">
+        insert into ghdk
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid != null">objectid,</if>
             <if test="sjxzqmc != null">sjxzqmc,</if>
             <if test="xjxzqmc != null">xjxzqmc,</if>
@@ -182,14 +169,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ydflbz != null">ydflbz,</if>
             <if test="jzxs != null">jzxs,</if>
             <if test="jzxssm != null">jzxssm,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="sjxzqmc != null">#{sjxzqmc},</if>
             <if test="xjxzqmc != null">#{xjxzqmc},</if>
@@ -235,18 +217,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ydflbz != null">#{ydflbz},</if>
             <if test="jzxs != null">#{jzxs},</if>
             <if test="jzxssm != null">#{jzxssm},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateGhdk" parameterType="com.onemap.sanya.domain.spatial.Ghdk">
-        update "ghdk"
+        update ghdk
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="sjxzqmc != null">sjxzqmc = #{sjxzqmc},</if>
             <if test="xjxzqmc != null">xjxzqmc = #{xjxzqmc},</if>
@@ -292,20 +269,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ydflbz != null">ydflbz = #{ydflbz},</if>
             <if test="jzxs != null">jzxs = #{jzxs},</if>
             <if test="jzxssm != null">jzxssm = #{jzxssm},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteGhdkBySmid" parameterType="Integer">
-        delete from "ghdk" where smid = #{smid}
+    <delete id="deleteGhdkById" parameterType="Integer">
+        delete from ghdk where id = #{id}
     </delete>
 
-    <delete id="deleteGhdkBySmids" parameterType="String">
-        delete from "ghdk" where smid in
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteGhdkByIds" parameterType="String">
+        delete from ghdk where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 20 - 43
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/GysyqMapper.xml

@@ -5,11 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.GysyqMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.Gysyq" id="GysyqResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid1"    column="objectid_1"    />
         <result property="objectid"    column="objectid"    />
         <result property="districtid"    column="districtid"    />
@@ -73,21 +70,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="oldCertN"    column="old_cert_n"    />
         <result property="clearupSt"    column="clearup_st"    />
         <result property="sjglbsm"    column="sjglbsm"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectGysyqVo">
-        select smid, smuserid, smarea, smperimeter, st_asewkt(smgeometry) as smgeometry , objectid_1, objectid, districtid, lot_id, lot_number, is_right, cert_no, ref_x, ref_y, atqy, atfg, f_land_loc, mapguid, f_syqlx, f_zdtzm, f_zddm, f_memo, atbmqy, f_use, f_owntype, f_sjly, f_fzmj, f_sjqljs, ztid, iid, qlrbs, f_unit_no, f_xmmc, f_xmxz, f_hydb, f_yhlxa, f_yhlxb, f_yhwzsm, f_zhax, f_hdmc, f_hddm, f_hdwz, f_hdyt, f_ydfw, f_ydmj, f_djbh, f_yhnx, f_syfs, f_jtyt, sytdmj, txmj, yfttdmj, yfgtdmj, f_qlbz, yzbx, export_bz, 处理类型, 坐标变化, 融合方式, objectid_b, created_ti, last_modif, right_owne, lot_numb_1, f_parcel_n, old_cert_n, clearup_st, sjglbsm, shape_length, shape_area from gysyq
+        select id, st_asewkt(geom) as geom,  objectid_1, objectid, districtid, lot_id, lot_number, is_right, cert_no, ref_x, ref_y, atqy, atfg, f_land_loc, mapguid, f_syqlx, f_zdtzm, f_zddm, f_memo, atbmqy, f_use, f_owntype, f_sjly, f_fzmj, f_sjqljs, ztid, iid, qlrbs, f_unit_no, f_xmmc, f_xmxz, f_hydb, f_yhlxa, f_yhlxb, f_yhwzsm, f_zhax, f_hdmc, f_hddm, f_hdwz, f_hdyt, f_ydfw, f_ydmj, f_djbh, f_yhnx, f_syfs, f_jtyt, sytdmj, txmj, yfttdmj, yfgtdmj, f_qlbz, yzbx, export_bz, 处理类型, 坐标变化, 融合方式, objectid_b, created_ti, last_modif, right_owne, lot_numb_1, f_parcel_n, old_cert_n, clearup_st, sjglbsm from "gysyq"
     </sql>
 
     <select id="selectGysyqList" parameterType="com.onemap.sanya.domain.spatial.Gysyq" resultMap="GysyqResult">
         <include refid="selectGysyqVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid1 != null "> and objectid_1 = #{objectid1}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="districtid != null  and districtid != ''"> and districtid = #{districtid}</if>
@@ -151,26 +143,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oldCertN != null  and oldCertN != ''"> and old_cert_n = #{oldCertN}</if>
             <if test="clearupSt != null  and clearupSt != ''"> and clearup_st = #{clearupSt}</if>
             <if test="sjglbsm != null "> and sjglbsm = #{sjglbsm}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectGysyqBySmid" parameterType="Integer" resultMap="GysyqResult">
+    <select id="selectGysyqById" parameterType="Integer" resultMap="GysyqResult">
         <include refid="selectGysyqVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
+
     <select id="selectGysyqByPolygon" parameterType="String" resultMap="GysyqResult">
         <include refid="selectGysyqVo"/>
-        where st_intersects( st_geomfromewkt(#{polygon}),gysyq.smgeometry)
+        where st_intersects( st_geomfromewkt(#{polygon}),gysyq.geom)
     </select>
-    <insert id="insertGysyq" parameterType="com.onemap.sanya.domain.spatial.Gysyq" useGeneratedKeys="true" keyProperty="smid">
+        
+    <insert id="insertGysyq" parameterType="com.onemap.sanya.domain.spatial.Gysyq" useGeneratedKeys="true" keyProperty="id">
         insert into gysyq
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid1 != null">objectid_1,</if>
             <if test="objectid != null">objectid,</if>
             <if test="districtid != null">districtid,</if>
@@ -234,14 +223,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oldCertN != null">old_cert_n,</if>
             <if test="clearupSt != null">clearup_st,</if>
             <if test="sjglbsm != null">sjglbsm,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">st_geomfromewkt(#{smgeometry}),</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid1 != null">#{objectid1},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="districtid != null">#{districtid},</if>
@@ -305,18 +289,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oldCertN != null">#{oldCertN},</if>
             <if test="clearupSt != null">#{clearupSt},</if>
             <if test="sjglbsm != null">#{sjglbsm},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateGysyq" parameterType="com.onemap.sanya.domain.spatial.Gysyq">
         update gysyq
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry =st_geomfromewkt(#{smgeometry}),</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid1 != null">objectid_1 = #{objectid1},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="districtid != null">districtid = #{districtid},</if>
@@ -380,20 +359,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oldCertN != null">old_cert_n = #{oldCertN},</if>
             <if test="clearupSt != null">clearup_st = #{clearupSt},</if>
             <if test="sjglbsm != null">sjglbsm = #{sjglbsm},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteGysyqBySmid" parameterType="Integer">
-        delete from gysyq where smid = #{smid}
+    <delete id="deleteGysyqById" parameterType="Integer">
+        delete from gysyq where id = #{id}
     </delete>
 
-    <delete id="deleteGysyqBySmids" parameterType="String">
-        delete from gysyq where smid in 
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteGysyqByIds" parameterType="String">
+        delete from gysyq where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 21 - 44
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/JtownerMapper.xml

@@ -5,11 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.JtownerMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.Jtowner" id="JtownerResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid1"    column="objectid_1"    />
         <result property="objectid"    column="objectid"    />
         <result property="bsm"    column="bsm"    />
@@ -71,21 +68,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="fCreateT"    column="f_create_t"    />
         <result property="yzbx"    column="yzbx"    />
         <result property="sjglbsm"    column="sjglbsm"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectJtownerVo">
-        select smid, smuserid, smarea, smperimeter, st_asewkt(smgeometry) as smgeometry , objectid_1, objectid, bsm, ysdm, zdh, zdsz, txdz, tdzl, qsxz, syqlx, scmj, fzmj, jzrjl, jzmd, tdjb, sbdj, qdjg, zdlsh, szxzcmc, ms, jcr, jcrq, jcsftg, jcbtgyy, blr, blrq, blsjjcr, blsjjcrq, blsjjcsftg, fzr, fzrq, sfhg, djh, sjly, tdyt, exportflag, atqy, iid, zdtybm, mapguid, bz, qlr, cert_no, qlrbs, f_lb, f_xb, f_xdm, f_fbf, f_cbqssj, f_cbjssj, f_lqsqm, f_zysz, f_zs, f_sllb, f_zlnd, f_syqx, f_qlbz, f_create_b, f_create_t, yzbx, sjglbsm, shape_length, shape_area from jtowner
+        select id,  st_asewkt(geom) as geom, objectid_1, objectid, bsm, ysdm, zdh, zdsz, txdz, tdzl, qsxz, syqlx, scmj, fzmj, jzrjl, jzmd, tdjb, sbdj, qdjg, zdlsh, szxzcmc, ms, jcr, jcrq, jcsftg, jcbtgyy, blr, blrq, blsjjcr, blsjjcrq, blsjjcsftg, fzr, fzrq, sfhg, djh, sjly, tdyt, exportflag, atqy, iid, zdtybm, mapguid, bz, qlr, cert_no, qlrbs, f_lb, f_xb, f_xdm, f_fbf, f_cbqssj, f_cbjssj, f_lqsqm, f_zysz, f_zs, f_sllb, f_zlnd, f_syqx, f_qlbz, f_create_b, f_create_t, yzbx, sjglbsm from "jtowner"
     </sql>
 
     <select id="selectJtownerList" parameterType="com.onemap.sanya.domain.spatial.Jtowner" resultMap="JtownerResult">
         <include refid="selectJtownerVo"/>
-        <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+        <where>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid1 != null "> and objectid_1 = #{objectid1}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="bsm != null "> and bsm = #{bsm}</if>
@@ -147,26 +139,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null  and fCreateT != ''"> and f_create_t = #{fCreateT}</if>
             <if test="yzbx != null  and yzbx != ''"> and yzbx = #{yzbx}</if>
             <if test="sjglbsm != null "> and sjglbsm = #{sjglbsm}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectJtownerBySmid" parameterType="Integer" resultMap="JtownerResult">
+    <select id="selectJtownerById" parameterType="Integer" resultMap="JtownerResult">
         <include refid="selectJtownerVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
+
     <select id="selectJtownerByPolygon" parameterType="String" resultMap="JtownerResult">
         <include refid="selectJtownerVo"/>
-        where st_intersects( st_geomfromewkt(#{polygon}),jtowner.smgeometry)
+        where st_intersects( st_geomfromewkt(#{polygon}),jtowner.geom)
     </select>
-    <insert id="insertJtowner" parameterType="com.onemap.sanya.domain.spatial.Jtowner" useGeneratedKeys="true" keyProperty="smid">
+        
+    <insert id="insertJtowner" parameterType="com.onemap.sanya.domain.spatial.Jtowner" useGeneratedKeys="true" keyProperty="id">
         insert into jtowner
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid1 != null">objectid_1,</if>
             <if test="objectid != null">objectid,</if>
             <if test="bsm != null">bsm,</if>
@@ -228,14 +217,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null">f_create_t,</if>
             <if test="yzbx != null">yzbx,</if>
             <if test="sjglbsm != null">sjglbsm,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid1 != null">#{objectid1},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="bsm != null">#{bsm},</if>
@@ -297,18 +281,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null">#{fCreateT},</if>
             <if test="yzbx != null">#{yzbx},</if>
             <if test="sjglbsm != null">#{sjglbsm},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateJtowner" parameterType="com.onemap.sanya.domain.spatial.Jtowner">
         update jtowner
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid1 != null">objectid_1 = #{objectid1},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="bsm != null">bsm = #{bsm},</if>
@@ -370,20 +349,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null">f_create_t = #{fCreateT},</if>
             <if test="yzbx != null">yzbx = #{yzbx},</if>
             <if test="sjglbsm != null">sjglbsm = #{sjglbsm},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteJtownerBySmid" parameterType="Integer">
-        delete from jtowner where smid = #{smid}
+    <delete id="deleteJtownerById" parameterType="Integer">
+        delete from jtowner where id = #{id}
     </delete>
 
-    <delete id="deleteJtownerBySmids" parameterType="String">
-        delete from jtowner where smid in 
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteJtownerByIds" parameterType="String">
+        delete from jtowner where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>

+ 20 - 43
onemap-modules/onemap-model/src/main/resources/mapper/sanya/spatial/JtuseMapper.xml

@@ -5,11 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.onemap.sanya.mapper.spatial.JtuseMapper">
     
     <resultMap type="com.onemap.sanya.domain.spatial.Jtuse" id="JtuseResult">
-        <result property="smid"    column="smid"    />
-        <result property="smuserid"    column="smuserid"    />
-        <result property="smarea"    column="smarea"    />
-        <result property="smperimeter"    column="smperimeter"    />
-        <result property="smgeometry"    column="smgeometry"    />
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
         <result property="objectid1"    column="objectid_1"    />
         <result property="objectid"    column="objectid"    />
         <result property="syqr"    column="syqr"    />
@@ -40,21 +37,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="fCreateT"    column="f_create_t"    />
         <result property="yzbx"    column="yzbx"    />
         <result property="sjglbsm"    column="sjglbsm"    />
-        <result property="shapeLength"    column="shape_length"    />
-        <result property="shapeArea"    column="shape_area"    />
     </resultMap>
 
     <sql id="selectJtuseVo">
-        select smid, smuserid, smarea, smperimeter, st_asewkt(smgeometry) as smgeometry , objectid_1, objectid, syqr, zdtybm, zdzl, zdmj, tdyt, ytdzh, mapguid, iid, cert_no, ztid, zdh, f_lb, f_xb, f_xdm, f_fbf, f_cbqssj, f_cbjssj, f_lqsqm, f_zysz, f_zs, f_sllb, f_zlnd, f_syqx, f_qlbz, f_create_b, f_create_t, yzbx, sjglbsm, shape_length, shape_area from jtuse
+        select id, st_asewkt(geom) as geom,  objectid_1, objectid, syqr, zdtybm, zdzl, zdmj, tdyt, ytdzh, mapguid, iid, cert_no, ztid, zdh, f_lb, f_xb, f_xdm, f_fbf, f_cbqssj, f_cbjssj, f_lqsqm, f_zysz, f_zs, f_sllb, f_zlnd, f_syqx, f_qlbz, f_create_b, f_create_t, yzbx, sjglbsm from "jtuse"
     </sql>
 
     <select id="selectJtuseList" parameterType="com.onemap.sanya.domain.spatial.Jtuse" resultMap="JtuseResult">
         <include refid="selectJtuseVo"/>
         <where>  
-            <if test="smuserid != null "> and smuserid = #{smuserid}</if>
-            <if test="smarea != null "> and smarea = #{smarea}</if>
-            <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
-            <if test="smgeometry != null  and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
             <if test="objectid1 != null "> and objectid_1 = #{objectid1}</if>
             <if test="objectid != null "> and objectid = #{objectid}</if>
             <if test="syqr != null  and syqr != ''"> and syqr = #{syqr}</if>
@@ -85,26 +77,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null  and fCreateT != ''"> and f_create_t = #{fCreateT}</if>
             <if test="yzbx != null  and yzbx != ''"> and yzbx = #{yzbx}</if>
             <if test="sjglbsm != null "> and sjglbsm = #{sjglbsm}</if>
-            <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
-            <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
         </where>
     </select>
     
-    <select id="selectJtuseBySmid" parameterType="Integer" resultMap="JtuseResult">
+    <select id="selectJtuseById" parameterType="Integer" resultMap="JtuseResult">
         <include refid="selectJtuseVo"/>
-        where smid = #{smid}
+        where id = #{id}
     </select>
+
     <select id="selectJtuseByPolygon" parameterType="String" resultMap="JtuseResult">
         <include refid="selectJtuseVo"/>
-        where st_intersects( st_geomfromewkt(#{polygon}),jtuse.smgeometry)
+        where st_intersects( st_geomfromewkt(#{polygon}),jtuse.geom)
     </select>
-    <insert id="insertJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse" useGeneratedKeys="true" keyProperty="smid">
+        
+    <insert id="insertJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse" useGeneratedKeys="true" keyProperty="id">
         insert into jtuse
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">smuserid,</if>
-            <if test="smarea != null">smarea,</if>
-            <if test="smperimeter != null">smperimeter,</if>
-            <if test="smgeometry != null">smgeometry,</if>
+            <if test="geom != null">geom,</if>
             <if test="objectid1 != null">objectid_1,</if>
             <if test="objectid != null">objectid,</if>
             <if test="syqr != null">syqr,</if>
@@ -135,14 +124,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null">f_create_t,</if>
             <if test="yzbx != null">yzbx,</if>
             <if test="sjglbsm != null">sjglbsm,</if>
-            <if test="shapeLength != null">shape_length,</if>
-            <if test="shapeArea != null">shape_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="smuserid != null">#{smuserid},</if>
-            <if test="smarea != null">#{smarea},</if>
-            <if test="smperimeter != null">#{smperimeter},</if>
-            <if test="smgeometry != null">#{smgeometry},</if>
+            <if test="geom != null">#{geom},</if>
             <if test="objectid1 != null">#{objectid1},</if>
             <if test="objectid != null">#{objectid},</if>
             <if test="syqr != null">#{syqr},</if>
@@ -173,18 +157,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null">#{fCreateT},</if>
             <if test="yzbx != null">#{yzbx},</if>
             <if test="sjglbsm != null">#{sjglbsm},</if>
-            <if test="shapeLength != null">#{shapeLength},</if>
-            <if test="shapeArea != null">#{shapeArea},</if>
          </trim>
     </insert>
 
     <update id="updateJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse">
         update jtuse
         <trim prefix="SET" suffixOverrides=",">
-            <if test="smuserid != null">smuserid = #{smuserid},</if>
-            <if test="smarea != null">smarea = #{smarea},</if>
-            <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
-            <if test="smgeometry != null">smgeometry = #{smgeometry},</if>
+            <if test="geom != null">geom = #{geom},</if>
             <if test="objectid1 != null">objectid_1 = #{objectid1},</if>
             <if test="objectid != null">objectid = #{objectid},</if>
             <if test="syqr != null">syqr = #{syqr},</if>
@@ -215,20 +194,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateT != null">f_create_t = #{fCreateT},</if>
             <if test="yzbx != null">yzbx = #{yzbx},</if>
             <if test="sjglbsm != null">sjglbsm = #{sjglbsm},</if>
-            <if test="shapeLength != null">shape_length = #{shapeLength},</if>
-            <if test="shapeArea != null">shape_area = #{shapeArea},</if>
         </trim>
-        where smid = #{smid}
+        where id = #{id}
     </update>
 
-    <delete id="deleteJtuseBySmid" parameterType="Integer">
-        delete from jtuse where smid = #{smid}
+    <delete id="deleteJtuseById" parameterType="Integer">
+        delete from jtuse where id = #{id}
     </delete>
 
-    <delete id="deleteJtuseBySmids" parameterType="String">
-        delete from jtuse where smid in 
-        <foreach item="smid" collection="array" open="(" separator="," close=")">
-            #{smid}
+    <delete id="deleteJtuseByIds" parameterType="String">
+        delete from jtuse where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>