1
0
فهرست منبع

地籍管理上传文件,进行解析校验,对比等

chenendian 3 ماه پیش
والد
کامیت
89d89e52d9

+ 33 - 4
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/CadastreManageController.java

@@ -1,18 +1,20 @@
 package com.siwei.apply.controller.cadastre;
 
 import com.siwei.apply.domain.vo.CheckInfoResultVo;
+import com.siwei.apply.domain.vo.CompareResultVo;
 import com.siwei.apply.service.cadastre.CadastreManageService;
 import com.siwei.common.core.domain.R;
 import com.siwei.common.core.web.controller.BaseController;
 import org.gdal.ogr.*;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
+import javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec;
 import java.util.*;
 
-@Controller
+@RestController
 @RequestMapping("/cadastre/manage")
 /**
  * 地籍库管理模块
@@ -23,13 +25,13 @@ public class CadastreManageController extends BaseController {
     private CadastreManageService cadastreManageService;
 
     @PostMapping("/checkUploadDquality")
-    public R<CheckInfoResultVo> checkData(String shpFileName, String shpFilePath, String fromRoute) {
+    public R<CheckInfoResultVo> checkData(String theFileName, String theFilePath, String fromRoute) {
         try {
             //1.先获取相关信息,进行入库
             //2.日志记录写入
             //3.读取文件进行录入
             //4.质量进行检查
-            CheckInfoResultVo res = cadastreManageService.checkFileData(shpFileName, shpFilePath, fromRoute);
+            CheckInfoResultVo res = cadastreManageService.checkFileData(theFileName, theFilePath, fromRoute);
             return R.ok(res);
         } catch (Exception e) {
             e.printStackTrace();
@@ -38,6 +40,33 @@ public class CadastreManageController extends BaseController {
     }
 
 
+    @PostMapping("/getCompareData")
+    public R<CompareResultVo> compareData(String uploadId, String theFilePath) {
+        try {
+            CompareResultVo res = cadastreManageService.getCompareData(uploadId);
+            return R.ok(res);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail(e.getMessage());
+        }
+    }
+
+
+
+    @PostMapping("/addBatchGdbData")
+    public R<String> addBatchGdbData(String uploadId) {
+        try {
+            String res = cadastreManageService.addBatchGdbData(uploadId);
+            return R.ok(res);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail(e.getMessage());
+        }
+    }
+
+
+
+
 
 
 }

+ 1 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/CheckInfoResultVo.java

@@ -9,6 +9,7 @@ import java.util.List;
  */
 @Data
 public class CheckInfoResultVo {
+    private String uploadId; //上传批次id
     private Boolean resultStatus; //检查是否通过
     private List<CheckInfoVo> checkSuccessList; // 用地位置
     private List<CheckInfoVo> checkFailList; // 用地位置

+ 18 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/CompareGemoVo.java

@@ -0,0 +1,18 @@
+package com.siwei.apply.domain.vo;
+
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * 上传比较对象vo
+ *
+ */
+@Data
+public class CompareGemoVo {
+    private String layerName;
+    private List<String> geomData; //空间矢量数据
+    private List<String> oldGeomData; //原数据
+}

+ 17 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/CompareResultVo.java

@@ -0,0 +1,17 @@
+package com.siwei.apply.domain.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ *
+ * 上传比较对象vo
+ *
+ */
+@Data
+public class CompareResultVo {
+    private String uploadId; //检查是否通过
+    private Boolean resultStatus; //检查是否通过
+    private List<CompareGemoVo> gemos;
+}

+ 27 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/CadastreFileMapper.java

@@ -4,6 +4,7 @@ import com.siwei.apply.domain.CadastreFile;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Collection;
 import java.util.List;
 
 @Mapper
@@ -28,8 +29,34 @@ public interface CadastreFileMapper {
      */
     void delete(String id);
 
+
     /**
      * 列表查询
      */
     List<CadastreFile> getList(CadastreFile cadastreFile);
+
+
+    /**
+     * 查询当前表的所有列
+     */
+    List<String> selectTableCollum(String name);
+
+    /**
+     * 查询所有表名
+     */
+    List<String> selectAllTable();
+
+
+    /**
+     * 查询所有表名无视图
+     */
+    List<String> selectAllTableNoView();
+
+
+    int insertTableData(@Param("tableName") String tableName, @Param("keyList")Collection<String> keyList, @Param("valueList")Collection<String> valueList);
+
+
+    String selectGeoms(String tableName);
+
+
 }

+ 6 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/CadastreManageService.java

@@ -4,6 +4,7 @@ package com.siwei.apply.service.cadastre;
 import com.siwei.apply.domain.CadastreFile;
 import com.siwei.apply.domain.vo.CheckInfoResultVo;
 import com.siwei.apply.domain.vo.CheckInfoVo;
+import com.siwei.apply.domain.vo.CompareResultVo;
 import com.siwei.apply.domain.vo.JsydghxkVo;
 import com.siwei.common.core.domain.R;
 
@@ -12,8 +13,13 @@ import java.util.Map;
 
 public interface CadastreManageService {
 
+    CompareResultVo getCompareData(String uploadId) ;
+
     CadastreFile saveUploadFile(String theFileName, String theFilePath, String fromRoute);
 
     CheckInfoResultVo checkFileData(String theFileName, String theFilePath, String fromRoute);
 
+
+    String addBatchGdbData(String uploadId);
+
 }

+ 232 - 31
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/CadastreManageServiceImpl.java

@@ -3,8 +3,9 @@ package com.siwei.apply.service.cadastre.impl;
 import com.siwei.apply.domain.CadastreFile;
 import com.siwei.apply.domain.vo.CheckInfoResultVo;
 import com.siwei.apply.domain.vo.CheckInfoVo;
+import com.siwei.apply.domain.vo.CompareGemoVo;
+import com.siwei.apply.domain.vo.CompareResultVo;
 import com.siwei.apply.mapper.CadastreFileMapper;
-import com.siwei.apply.mapper.FzssFxrwrzMapper;
 import com.siwei.apply.service.cadastre.CadastreManageService;
 
 import com.siwei.apply.utils.FileExtractUtil;
@@ -16,6 +17,7 @@ import org.gdal.ogr.*;
 import org.gdal.osr.SpatialReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -39,6 +41,110 @@ public class CadastreManageServiceImpl implements CadastreManageService {
     @Autowired
     private FzssFxrwrzHandleService fzssFxrwrzHandleService;
 
+
+    /**
+     *
+     * 1.进行解析数据成为list<map></map>
+     * 2.进行调用方法动态插入到当前表中
+     * 3.需要修改upload 的表更新状态
+     * 4.考虑增量入库还是全量入库。()
+     * 5.校验逻辑复杂()
+     *
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public String addBatchGdbData(String uploadId) {
+        String result = "success";
+        try {
+            CadastreFile cadastreFile = cadastreFileMapper.get(uploadId);
+            //这里判断是否校验通过
+            if (!cadastreFile.getStatus().equalsIgnoreCase("3")) {
+                log.info("校验未通过,不能入库");
+                result = "校验未通过,不能入库";
+            }
+
+            String gdbPath = cadastreFile.getUnzipPath();
+            DataSource ds = ogr.Open(gdbPath + "/" + cadastreFile.getName(), 0); // 0 = 只读
+            if (ds == null) {
+                log.warn("无法打开 gdb");
+                return result;
+            }
+
+            //这里进行遍历每个图层
+            for (int i = 0; i < ds.GetLayerCount(); i++) {
+                Layer layer = ds.GetLayer(i);
+                String layerName = layer.GetName();
+                //todo 相关代码
+                if (!layerName.equalsIgnoreCase("T_CGZJ_CWTC_M")) {
+                    continue;
+                }
+                boolean haveGeom = false;
+                //获取字段信息
+                List<String> dbFieldNameList = cadastreFileMapper.selectTableCollum(layerName.toLowerCase(Locale.ROOT));
+                if (dbFieldNameList.contains("geom")) {
+                    haveGeom = true;
+                }
+                List<Map<String, String>> theValueList = getValueList(layer, haveGeom);
+                //这里直接数据入库,区分增量或者全量
+                Boolean addRes = fullDataStorage(layerName,theValueList);
+                log.error("当前图层{},入库结果 {}", layerName, addRes);
+                //Boolean checkRes2 = incrementalDataStorage(layer);
+            }
+
+        } catch (Exception e) {
+            log.error("矢量数据入库异常,uploadId: {}", uploadId, e);
+            throw new ServiceException("矢量数据入库异常," + e.getMessage());
+        }
+        return result;
+    }
+
+
+    /**
+     * 获取比较数据
+     *
+     * @param uploadId
+     * @return
+     */
+    @Override
+    public CompareResultVo getCompareData(String uploadId) {
+        CompareResultVo compareResultVo = new CompareResultVo();
+        compareResultVo.setUploadId(uploadId);
+        compareResultVo.setResultStatus(true);
+        try {
+            List<CompareGemoVo> gemos = new ArrayList<>();
+            CadastreFile cadastreFile = cadastreFileMapper.get(uploadId);
+            String gdbPath = cadastreFile.getUnzipPath();
+            DataSource ds = ogr.Open(gdbPath + "/" + cadastreFile.getName(), 0); // 0 = 只读
+            if (ds == null) {
+                log.warn("无法打开 gdb");
+                return compareResultVo;
+            }
+            //这里进行遍历每个图层
+            for (int i = 0; i < ds.GetLayerCount(); i++) {
+                Layer layer = ds.GetLayer(i);
+                String layerName = layer.GetName();
+                //todo 相关代码
+                if (!layerName.equalsIgnoreCase("T_CGZJ_CWTC_M")) {
+                    continue;
+                }
+                CompareGemoVo compareGemoVo = new CompareGemoVo();
+                compareGemoVo.setLayerName(layerName);
+                List<String> layerGeom = getLayerGeom(layer);
+                compareGemoVo.setGeomData(layerGeom);
+                List<String> dbGeom = getDbGeom(layerName);
+                compareGemoVo.setOldGeomData(dbGeom);
+                //加入当前图层对比对象
+                gemos.add(compareGemoVo);
+            }
+            compareResultVo.setGemos(gemos);
+        } catch (Exception e) {
+            log.error("获取对比矢量数据信息异常,uploadId: {}", uploadId, e);
+            throw new ServiceException("获取对比矢量数据信息异常," + e.getMessage());
+        }
+        return compareResultVo;
+    }
+
+
     /**
      * 文件入库
      *
@@ -89,15 +195,15 @@ public class CadastreManageServiceImpl implements CadastreManageService {
         return null;
     }
 
+
     /**
-     *         //1.文件进行解压
-     *         //1.先获取相关信息,进行入库
-     *         //2.日志记录写入
-     *         //3.读取文件进行录入
-     *         //4.质量进行检查
-     *         //日志记录
-     *         //fzssFxrwrzHandleService.insertFxrwrz();
-     *
+     * //1.文件进行解压
+     * //1.先获取相关信息,进行入库
+     * //2.日志记录写入
+     * //3.读取文件进行录入
+     * //4.质量进行检查
+     * //日志记录
+     * //fzssFxrwrzHandleService.insertFxrwrz();
      *
      * @param theFileName
      * @param theFilePath
@@ -114,20 +220,30 @@ public class CadastreManageServiceImpl implements CadastreManageService {
         CadastreFile uploadFile = this.saveUploadFile(theFileName, theFilePath, fromRoute);
         if (Objects.nonNull(uploadFile)) {
             //入库成功
-            fzssFxrwrzHandleService.insertFxrwrz(uploadFile.getId(), "info", "上传文件成功", "地籍库管理");
+            fzssFxrwrzHandleService.insertFxrwrz(uploadFile.getId(), "地籍库管理", "上传文件成功", "info");
+            checkInfoResult.setUploadId(uploadFile.getId());
+
             String gdbPath = uploadFile.getUnzipPath();
-            DataSource ds = ogr.Open(gdbPath, 0); // 0 = 只读
+            DataSource ds = ogr.Open(gdbPath + "/" + theFileName, 0); // 0 = 只读
             if (ds == null) {
                 log.warn("无法打开 gdb");
                 return checkInfoResult;
             }
             log.info("图层数量: {}", ds.GetLayerCount());
 
+            //获取库中表名
+            List<String> allTableList = cadastreFileMapper.selectAllTable();
             //这里进行遍历每个图层
             for (int i = 0; i < ds.GetLayerCount(); i++) {
                 Layer layer = ds.GetLayer(i);
+                //todo 相关代码
+                if (!layer.GetName().equalsIgnoreCase("T_CGZJ_CWTC_M")) {
+                    continue;
+                }
+
+                //todo 测试代码
                 //这里做质量检查
-                CheckInfoVo checkRes = checkLayerInfo(layer, null);
+                CheckInfoVo checkRes = checkLayerInfo(layer, allTableList);
                 if (checkRes.getCheckStatus().equals(false)) { //检查出错
                     checkInfoFailList.add(checkRes);
                     checkInfoResult.setResultStatus(false);
@@ -160,38 +276,43 @@ public class CadastreManageServiceImpl implements CadastreManageService {
         checkInfoVo.setUploadFileTableName(name);
 
         //检查表名对应
-        if (!allTableList.contains(name)) {
+        if (!allTableList.contains(name.toLowerCase(Locale.ROOT))) {
             checkInfoList.add(name + ":图层名称不在地籍库范围内!");
             checkInfoVo.setCheckStatus(false);
         }
 
         //检查坐标系
-        if(checkCoordinateSystem(layer).equals(false)){
+        if (checkCoordinateSystem(layer).equals(false)) {
             checkInfoList.add(name + ":坐标系不正确,确认是否CGCS2000!");
             checkInfoVo.setCheckStatus(false);
         }
 
-        //todo  查询库中的当前表字段;
-        List<String> dbFieldNameList =  new ArrayList<>();
-        List<String> layerFieldNameList =   getFieldName(layer);
+        boolean haveGeom = false;
+        //获取字段信息
+        List<String> dbFieldNameList = cadastreFileMapper.selectTableCollum(name.toLowerCase(Locale.ROOT));
+        if (dbFieldNameList.contains("geom")) {
+            haveGeom = true;
+        }
+
+        List<String> layerFieldNameList = getFieldName(layer, haveGeom);
         // 判断是否包含相同的元素(不考虑顺序)
         boolean areCollectionsEqual = CollectionUtils.isEqualCollection(dbFieldNameList, layerFieldNameList);
-        if(!areCollectionsEqual){
-            checkInfoList.add(name + ":字段数据不一致!-"+dbFieldNameList);
+        if (!areCollectionsEqual) {
+            checkInfoList.add(name + ":字段数据不一致!-" + dbFieldNameList);
             checkInfoVo.setCheckStatus(false);
         }
 
         //todo 检查字段数据是否为空
         //仅仅获取图层属性
-        List<Map<String, String>> theValueList =  getValueList(layer,false);
+        List<Map<String, String>> theValueList = getValueList(layer, false);
         //todo 这里根据表名获取相关校验字段信息
         List<String> checkFieldList = new ArrayList<>();
-        checkFieldList.add("111");
-
+        //checkFieldList.add("111");
+        checkFieldList.add("bz");
         for (Map<String, String> theMap : theValueList) {
-            for(String fieldName : checkFieldList){
-                if(com.siwei.common.core.utils.StringUtils.isBlank(theMap.get(fieldName))){
-                    checkInfoList.add(name + "--"+fieldName+"字段不能为空!");
+            for (String fieldName : checkFieldList) {
+                if (com.siwei.common.core.utils.StringUtils.isBlank(theMap.get(fieldName))) {
+                    checkInfoList.add(name + "--" + fieldName + "字段不能为空!");
                     checkInfoVo.setCheckStatus(false);
                 }
             }
@@ -201,21 +322,22 @@ public class CadastreManageServiceImpl implements CadastreManageService {
     }
 
 
-
-
     /**
      * 获取当前图层的所有属性字段名
      *
      * @param layer
      * @return
      */
-    private List<String> getFieldName(Layer layer) {
+    private List<String> getFieldName(Layer layer, Boolean haveGeom) {
         List<String> nameList = new ArrayList();
         FeatureDefn defn = layer.GetLayerDefn();
         System.out.println("字段数: " + defn.GetFieldCount());
         for (int i = 0; i < defn.GetFieldCount(); i++) {
             FieldDefn field = defn.GetFieldDefn(i);
-            nameList.add(field.GetName());
+            nameList.add(field.GetName().toLowerCase(Locale.ROOT));
+        }
+        if (haveGeom.equals(true)) {
+            nameList.add("geom");
         }
         return nameList;
     }
@@ -237,18 +359,20 @@ public class CadastreManageServiceImpl implements CadastreManageService {
                 map.put(feature.GetFieldDefnRef(i).GetName(), feature.GetFieldAsString(i));
             }
             if (haveGeom.equals(true)) {
+                String wkt = null;
                 Geometry geom = feature.GetGeometryRef();
                 if (geom != null) {
                     // 将几何对象转换为 WKT 格式
-                    String wkt = geom.ExportToWkt();
-                    map.put("geom", wkt);
+                    wkt = geom.ExportToWkt();
                 }
+                map.put("geom", wkt);
             }
             list.add(map);
         }
         return list;
     }
 
+
     /**
      * 校验当前图层坐标系是否为:CGCS2000
      *
@@ -298,4 +422,81 @@ public class CadastreManageServiceImpl implements CadastreManageService {
     }
 
 
+    /**
+     * 获取对比的矢量图层
+     *
+     * @param layer
+     * @return
+     */
+    private List<String> getLayerGeom(Layer layer) {
+        List<String> list = new ArrayList<>();
+        // 循环处理每个要素
+        for (int i = 0; i < layer.GetFeatureCount(0); i++) {
+            Feature feature = layer.GetFeature(i);
+            if (feature == null) {
+                continue;
+            }
+            Geometry geometry = feature.GetGeometryRef(); // 获取几何对象
+            if (geometry != null) {
+                // 将几何对象转换为 WKT 格式
+                String wkt = geometry.ExportToWkt();
+                list.add(wkt);
+            }
+        }
+        return list;
+    }
+
+
+    /**
+     *
+     * @param tableName
+     * @return
+     */
+    private List<String> getDbGeom(String tableName) {
+        List<String> list = new ArrayList<>();
+        String geomsStr = cadastreFileMapper.selectGeoms(tableName);
+        if (StringUtils.isNotBlank(geomsStr)) {
+            list = Arrays.asList(geomsStr.split("\\|"));
+        }
+        return list;
+    }
+
+
+
+
+    /**
+     * 这里需要开启事务
+     * 数据全量入库
+     * @param tableName
+     * @param theValueList
+     * @return
+     */
+    private Boolean fullDataStorage(String tableName,List<Map<String, String>> theValueList) {
+        boolean addRes = false;
+        if (!CollectionUtils.isEmpty(theValueList)) {
+            for (Map<String, String> map : theValueList) {
+                Collection<String> values = map.values();
+                Collection<String> keys = map.keySet();
+                cadastreFileMapper.insertTableData(tableName,keys,values);
+            }
+        }
+        return addRes;
+    }
+
+
+
+
+    /**
+     * 数据增量入库
+     *
+     * @param layer
+     * @return
+     */
+    private Boolean incrementalDataStorage(Layer layer) {
+        boolean haveGeom = false;
+
+        return haveGeom;
+    }
+
+
 }

+ 58 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/CadastreFileMapper.xml → siwei-modules/siwei-apply/src/main/resources/mapper/cadastre/CadastreFileMapper.xml

@@ -76,4 +76,62 @@
             </if>
         </where>
     </select>
+
+    <select id="selectTableCollum" parameterType="String" resultType="string">
+        select COLUMN_NAME FROM  information_schema.COLUMNS
+        WHERE
+            table_schema = 'vector'
+          AND TABLE_NAME = #{tableName}
+    </select>
+
+    <select id="selectAllTable"  resultType="string">
+        select table_name from information_schema.tables
+        where table_schema = 'vector'
+    </select>
+
+    <select id="selectAllTableNoView"  resultType="string">
+        select table_name from information_schema.tables
+        where table_schema = 'vector'
+    </select>
+
+
+
+    <insert id="insertTableData222">
+        INSERT INTO ${tableName} (
+        <foreach collection="tableDataMap" item="map" separator=",">
+            <foreach collection="map.keySet()" item="key" separator=",">
+                ${key}
+            </foreach>
+        </foreach>
+        )
+        VALUES (
+        <foreach collection="tableDataMap" item="map" separator=",">
+            <foreach collection="map.values()" item="value" separator=",">
+                #{value}
+            </foreach>
+        </foreach>
+        )
+    </insert>
+
+    <insert id="insertTableData">
+        INSERT INTO vector.${tableName} (
+            <foreach collection="keyList" item="key" separator=",">
+                ${key}
+            </foreach>
+        )
+        VALUES (
+            <foreach collection="valueList" item="value" separator=",">
+                #{value}
+            </foreach>
+         )
+    </insert>
+
+    <select id="selectGeoms"  resultType="string">
+        SELECT array_to_string(array_agg(ST_AsEWKT(gd.geom)), '|') as "geoms"
+        from vector.${tableName} gd
+    </select>
+
+
+
+
 </mapper>

+ 0 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/FzssFxrwrzMapper.xml → siwei-modules/siwei-apply/src/main/resources/mapper/cadastre/FzssFxrwrzMapper.xml


+ 122 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/cadastre/TdgySjMapper.xml

@@ -0,0 +1,122 @@
+<?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.TdgySjMapper">
+    <resultMap id="BaseResultMap" type="com.siwei.apply.domain.cadastre.TdgySjDTO">
+        <id property="id" column="id"/>
+        <result property="xmmc" column="xmmc"/>
+        <result property="tdzl" column="tdzl"/>
+        <result property="crmj" column="crmj"/>
+        <result property="tdyt" column="tdyt"/>
+        <result property="rjl" column="rjl"/>
+        <result property="cjj" column="cjj"/>
+        <result property="gylx" column="gylx"/>
+        <result property="cjr" column="cjr"/>
+        <result property="pzjg" column="pzjg"/>
+        <result property="pzwh" column="pzwh"/>
+        <result property="pzrq" column="pzrq"/>
+        <result property="xzqh" column="xzqh"/>
+        <result property="create_time" column="create_time"/>
+        <result property="update_time" column="update_time"/>
+        <result property="sulx" column="sulx"/>
+        <result property="srf" column="srf"/>
+        <result property="crmj_m" column="crmj_m"/>
+        <result property="tdsyq" column="tdsyq"/>
+        <result property="htbh" column="htbh"/>
+        <result property="jbr" column="jbr"/>
+        <result property="zdyt" column="zdyt"/>
+        <result property="cqzh" column="cqzh"/>
+        <result property="ydkgsj" column="ydkgsj"/>
+        <result property="ydjgsj" column="ydjgsj"/>
+        <result property="sfjg" column="sfjg"/>
+        <result property="sfkg" column="sfkg"/>
+        <result property="sjkgsj" column="sjkgsj"/>
+        <result property="sjjgsj" column="sjjgsj"/>
+        <result property="sjnf" column="sjnf"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id, xmmc, tdzl, crmj, tdyt, rjl, cjj, gylx, cjr, pzjg, pzwh, pzrq, xzqh, create_time, update_time, sulx, srf, crmj_m, tdsyq, htbh, jbr, zdyt, cqzh, ydkgsj, ydjgsj, sfjg, sfkg, sjkgsj, sjjgsj, sjnf
+    </sql>
+
+    <select id="selectList" parameterType="com.siwei.apply.domain.cadastre.TdgySjDTO" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from "vector"."tdgy_sj"
+        <where>
+            <if test="xmmc != null and xmmc != ''">
+                and xmmc like concat('%', #{xmmc}, '%')
+            </if>
+            <if test="tdzl != null and tdzl != ''">
+                and tdzl like concat('%', #{tdzl}, '%')
+            </if>
+            <if test="xzqh != null and xzqh != ''">
+                and xzqh = #{xzqh}
+            </if>
+            <if test="sjnf != null and sjnf != ''">
+                and sjnf = #{sjnf}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectById" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from "vector"."tdgy_sj"
+        where id = #{id}
+    </select>
+
+    <insert id="insert" parameterType="com.siwei.apply.domain.cadastre.TdgySjDTO">
+        insert into "vector"."tdgy_sj" (
+            id, xmmc, tdzl, crmj, tdyt, rjl, cjj, gylx, cjr, pzjg, pzwh, pzrq, xzqh, create_time, update_time, sulx, srf, crmj_m, tdsyq, htbh, jbr, zdyt, cqzh, ydkgsj, ydjgsj, sfjg, sfkg, sjkgsj, sjjgsj, sjnf
+        ) values (
+            #{id}, #{xmmc}, #{tdzl}, #{crmj}, #{tdyt}, #{rjl}, #{cjj}, #{gylx}, #{cjr}, #{pzjg}, #{pzwh}, #{pzrq}, #{xzqh}, #{create_time}, #{update_time}, #{sulx}, #{srf}, #{crmj_m}, #{tdsyq}, #{htbh}, #{jbr}, #{zdyt}, #{cqzh}, #{ydkgsj}, #{ydjgsj}, #{sfjg}, #{sfkg}, #{sjkgsj}, #{sjjgsj}, #{sjnf}
+        )
+    </insert>
+
+    <update id="update" parameterType="com.siwei.apply.domain.cadastre.TdgySjDTO">
+        update "vector"."tdgy_sj"
+        <set>
+            <if test="xmmc != null">xmmc = #{xmmc},</if>
+            <if test="tdzl != null">tdzl = #{tdzl},</if>
+            <if test="crmj != null">crmj = #{crmj},</if>
+            <if test="tdyt != null">tdyt = #{tdyt},</if>
+            <if test="rjl != null">rjl = #{rjl},</if>
+            <if test="cjj != null">cjj = #{cjj},</if>
+            <if test="gylx != null">gylx = #{gylx},</if>
+            <if test="cjr != null">cjr = #{cjr},</if>
+            <if test="pzjg != null">pzjg = #{pzjg},</if>
+            <if test="pzwh != null">pzwh = #{pzwh},</if>
+            <if test="pzrq != null">pzrq = #{pzrq},</if>
+            <if test="xzqh != null">xzqh = #{xzqh},</if>
+            <if test="create_time != null">create_time = #{create_time},</if>
+            <if test="update_time != null">update_time = #{update_time},</if>
+            <if test="sulx != null">sulx = #{sulx},</if>
+            <if test="srf != null">srf = #{srf},</if>
+            <if test="crmj_m != null">crmj_m = #{crmj_m},</if>
+            <if test="tdsyq != null">tdsyq = #{tdsyq},</if>
+            <if test="htbh != null">htbh = #{htbh},</if>
+            <if test="jbr != null">jbr = #{jbr},</if>
+            <if test="zdyt != null">zdyt = #{zdyt},</if>
+            <if test="cqzh != null">cqzh = #{cqzh},</if>
+            <if test="ydkgsj != null">ydkgsj = #{ydkgsj},</if>
+            <if test="ydjgsj != null">ydjgsj = #{ydjgsj},</if>
+            <if test="sfjg != null">sfjg = #{sfjg},</if>
+            <if test="sfkg != null">sfkg = #{sfkg},</if>
+            <if test="sjkgsj != null">sjkgsj = #{sjkgsj},</if>
+            <if test="sjjgsj != null">sjjgsj = #{sjjgsj},</if>
+            <if test="sjnf != null">sjnf = #{sjnf},</if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteById">
+        delete from "vector"."tdgy_sj" where id = #{id}
+    </delete>
+
+
+
+
+
+</mapper>

+ 4 - 1
siwei-modules/siwei-system/src/main/resources/mapper/mysql/system/SysUserMapper.xml

@@ -204,7 +204,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</update>
 	
 	<update id="resetUserPwd" parameterType="SysUser">
- 		update sys_user set password = #{password} where user_name = #{userName}
+ 		update sys_user set password = #{password} where user_name = #{
+
+
+ 		}
 	</update>
 	
 	<delete id="deleteUserById" parameterType="Long">