Przeglądaj źródła

汇交数据生成

chenendian 1 miesiąc temu
rodzic
commit
d01f5637f5

+ 7 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/ConvergeController.java

@@ -102,6 +102,13 @@ public class ConvergeController extends BaseController {
             String batch =  addDataVo.getBatchName();
             String type  = addDataVo.getType();
             //convergeService.batchDelete333(batch,type);
+
+            convergeService.operationConverge(batch,type);
+
+
+
+
+
             return R.ok("提交成功");
         } catch (Exception e) {
             return R.fail(e.getMessage());

+ 1 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/ConvergeService.java

@@ -35,5 +35,6 @@ public interface ConvergeService {
     void downConvergeFile(HttpServletResponse response, String ywh);
 
 
+    void operationConverge(String batch,String type) ;
 
 }

+ 38 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/impl/ConvergeServiceImpl.java

@@ -5,6 +5,7 @@ import com.siwei.apply.domain.vo.ConvergeFilterVo;
 import com.siwei.apply.domain.vo.ConvergeUpdateVo;
 import com.siwei.apply.mapper.ConvergeMapper;
 import com.siwei.apply.service.ConvergeService;
+import com.siwei.apply.service.cadastre.impl.FzssFxrwrzHandleService;
 import com.siwei.apply.utils.ServiceFileUtil;
 import com.siwei.common.core.utils.uuid.IdUtils;
 import lombok.extern.slf4j.Slf4j;
@@ -30,6 +31,11 @@ public class ConvergeServiceImpl implements ConvergeService {
     @Autowired
     private ConvergeMapper convergeMapper;
 
+    @Autowired
+    private FzssFxrwrzHandleService fzssFxrwrzHandleService;
+
+
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void add(Converge converge) {
@@ -42,7 +48,6 @@ public class ConvergeServiceImpl implements ConvergeService {
         filterVo.validatePageParams();
         List<Converge> list = convergeMapper.getList(filterVo);
         Integer total = convergeMapper.getCount(filterVo);
-
         Map<String, Object> res = new HashMap<>();
         res.put("rows", list);
         res.put("total", total);
@@ -105,11 +110,43 @@ public class ConvergeServiceImpl implements ConvergeService {
             log.error("导出SHP文件失败", e);
             throw new RuntimeException("导出SHP文件失败: " + e.getMessage());
         }
+    }
+
+
+
+    @Transactional
+    @Override
+    public void operationConverge(String batch,String type) {
+        try {
+            Converge converge = new Converge();
+            converge.generateId();
+            String convergeId = converge.getId();
+            fzssFxrwrzHandleService.insertFxrwrz(convergeId, "地籍库管理", "操作汇交开始", "info");
+            converge.setName("赣江新区"+batch+"数据");
+            converge.setBatchName(batch);
+            converge.setFilePath("");
+            converge.setStatus("0");
+            converge.setType(type);
+            converge.setReadMessage("正在生成。。");
+            converge.setFileCostTime("0");
+            convergeMapper.add(converge);
+            log.info("==========="+convergeId);
+            fzssFxrwrzHandleService.insertFxrwrz(convergeId, "地籍库管理", "汇交任务创建", "info");
+            fzssFxrwrzHandleService.insertFxrwrz(convergeId, "地籍库管理", "汇交数据执行开始。。。", "info");
+
 
+        } catch (Exception e) {
+            log.error("导出SHP文件失败", e);
+            throw new RuntimeException("导出SHP文件失败: " + e.getMessage());
+        }
     }
 
 
 
 
 
+
+
+
+
 }

+ 2 - 2
siwei-modules/siwei-apply/src/main/resources/mapper/ConvergeMapper.xml

@@ -43,7 +43,7 @@
             <if test="status != null and status != ''">
                 AND status = #{status}
             </if>
-            <if test="type != null and type != ''">
+            <if test="type != null and type != '' and type != 0">
                 AND type = #{type}
             </if>
             <if test="beginTime != null and beginTime != ''">
@@ -70,7 +70,7 @@
             <if test="status != null and status != ''">
                 AND status = #{status}
             </if>
-            <if test="type != null and type != ''">
+            <if test="type != null and type != '' and type != 0">
                 AND type = #{type}
             </if>
             <if test="beginTime != null and beginTime != ''">

+ 6 - 12
siwei-modules/siwei-spatial/src/main/java/com/siwei/spatial/controller/file/SpatialFilesDbController.java

@@ -9,17 +9,13 @@ import com.siwei.spatial.api.domain.file.TGeomDbDetails;
 import com.siwei.spatial.service.file.ISpatialFilesDbService;
 import com.siwei.spatial.service.file.ITGeomDbDetailsService;
 import com.siwei.spatial.service.file.ITGeomDbService;
-import com.siwei.spatial.utils.ShpPostgisTableBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 
 /**
  * 空间与shp文件入库相关操作处理
@@ -139,7 +135,6 @@ public class SpatialFilesDbController extends BaseController {
         return R.ok(geomDb);
     }
 
-
     @PostMapping("/geom/save")
     // @InnerAuth
     public R<TGeomDb> saveGeom(@RequestBody Map<String,Object> geoms ) throws IOException {
@@ -153,7 +148,6 @@ public class SpatialFilesDbController extends BaseController {
             filePath = "C:\\Users\\Administrator\\Desktop\\07\\shp_deom\\给一码管地\\地籍区.shp";
         }
         //filePath = "C:\\Users\\Administrator\\Desktop\\07\\结合图-新—赣江新区图幅比例-0311\\500结合图.shp";
-
 //        File shp = new File("C:\\Users\\Administrator\\Desktop\\07\\结合图-新—赣江新区图幅比例\\500结合图.shp");
 //        String sql = null;
 //        try {
@@ -173,23 +167,18 @@ public class SpatialFilesDbController extends BaseController {
 //        System.exit(0);
 //        iSpatialFilesDbService.testInsertShp(res);
 //        iSpatialFilesDbService.testInsertShpZD(res);
-
-
         iSpatialFilesDbService.testInsertShp(res);
-
-
         return R.ok(res);
     }
 
-
     @GetMapping("/test/getShpData")
     public R<List<Map<String,Object>>> getShpData(@RequestParam("tabeName") String tabeName ) {
         List<Map<String,Object>> res = iSpatialFilesDbService.testGetShpData(tabeName);
-
         return R.ok(res);
     }
 
 
+
     /**
      * 根据表生成shp文件,并下载
      * @param response
@@ -207,4 +196,9 @@ public class SpatialFilesDbController extends BaseController {
     }
 
 
+
+
+
+
+
 }