Sfoglia il codice sorgente

上传接口完善

chenendian 4 mesi fa
parent
commit
4d3322cd64

+ 21 - 4
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/third/OfferDataController.java

@@ -3,6 +3,7 @@ package com.siwei.apply.controller.third;
 import com.siwei.apply.domain.LandOneCode;
 import com.siwei.apply.domain.NodeAttachment;
 import com.siwei.apply.domain.vo.AttachmentParamVo;
+import com.siwei.apply.domain.vo.LandFirstParamVo;
 import com.siwei.apply.service.third.OfferDataService;
 import com.siwei.apply.utils.ServiceUtil;
 import com.siwei.common.core.domain.R;
@@ -44,13 +45,18 @@ public class OfferDataController extends BaseController {
     @Autowired
     private RedisService redisService;
 
+
+
     /**
-     * 新增
+     *
+     * 不动产土地登记完成后入参使用
      */
-    @PostMapping("/bb")
-    public R<Map<String, String>> add(@RequestBody LandOneCode body) {
+    @PostMapping("/third/landFirstRegistration")
+    public R<Map<String, Object>> landFirstRegistration(@RequestBody LandFirstParamVo body) {
         try {
-            Map<String, String> map = offerDataService.getById("11");
+//             landFirstParamVo
+//             houseFirstParamVo
+            Map<String, Object> map = offerDataService.landFirstRegistration(body);
             map.put("id", map.get("id"));
             return R.ok(map);
         } catch (Exception e) {
@@ -58,6 +64,17 @@ public class OfferDataController extends BaseController {
         }
     }
 
+
+
+
+
+
+
+
+
+
+
+
     /**
      * 按ID查询
      */

+ 131 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/LandFirstParamVo.java

@@ -0,0 +1,131 @@
+package com.siwei.apply.domain.vo;
+
+import lombok.Data;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 一码管地首次录数据参数 Vo
+ */
+@Data
+public class LandFirstParamVo {
+
+    /**
+     * 预赋不动产单元号(注:一码管地首次录数据根据地块等信息,从不动产系统获取此码)
+     * 必选: 是
+     * 业务类型: 系统
+     */
+    private String yfbdcdyh;
+
+    /**
+     * 业务编号(业务唯一标识,例:20251023145655)
+     * 必选: 是
+     * 业务类型: 系统
+     */
+    private String ywbh;
+
+    /**
+     * 项目编号(示例:c0d565ca-1f11-411f-a150-0fe1623b8104)
+     * 必选: 否
+     * 业务类型: 系统
+     */
+    private String xmbh;
+
+    /**
+     * 正式不动产单元号(不动产单元号有变动需传此参数)
+     * 必选: 否
+     * 业务类型: 业务
+     */
+    private String bdcdyh;
+
+    /**
+     * 权利人
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String qlr;
+
+    /**
+     * 坐落位置
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String zl;
+
+    /**
+     * 共有情况(如:共同共有)
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String gyqk;
+
+    /**
+     * 权利类型(如:国有建设用地使用权)
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String qllx;
+
+    /**
+     * 权利性质(出让/划拨)
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String qlxz;
+
+    /**
+     * 土地用途
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String tdyt;
+
+    /**
+     * 土地面积
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String tdmj;
+
+    /**
+     * 土地面积单位
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String tdmjdw;
+
+    /**
+     * 不动产证件号
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String bdczh;
+
+    /**
+     * 登记机构
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String djjg;
+
+    /**
+     * 登记日期(如:2025-10-09)
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private String djrq;
+
+    /**
+     * 空间地块矢量图数据(EWKT格式)
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private List<String> geoms;
+
+    /**
+     * 附件材料信息(zip或文档结构待定)
+     * 必选: 是
+     * 业务类型: 业务
+     */
+    private Map<String, Object> attachment;
+}

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/OfferDataService.java

@@ -1,6 +1,7 @@
 package com.siwei.apply.service.third;
 
 import com.siwei.apply.domain.NodeAttachment;
+import com.siwei.apply.domain.vo.LandFirstParamVo;
 
 import java.util.Map;
 
@@ -29,4 +30,7 @@ public interface OfferDataService {
     NodeAttachment getThirdNodeAttachment(String immobileCode, String projectId, String dqjd) throws Exception;
 
 
+    Map<String, Object> landFirstRegistration(LandFirstParamVo body);
+
+
 }

+ 73 - 25
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/OfferDataServiceImpl.java

@@ -2,13 +2,18 @@ package com.siwei.apply.service.third.impl;
 
 import com.siwei.apply.domain.NodeAttachment;
 import com.siwei.apply.domain.ProjectWorkflow;
+import com.siwei.apply.domain.vo.GyjsydscdjVo;
+import com.siwei.apply.domain.vo.LandFirstParamVo;
 import com.siwei.apply.enums.AloneWorkFlowEnum;
 import com.siwei.apply.mapper.ProjectWorkflowMapper;
+import com.siwei.apply.service.GyjsydscdjService;
 import com.siwei.apply.service.NodeAttachmentService;
 import com.siwei.apply.service.third.OfferDataService;
 import com.siwei.apply.utils.ServiceUtil;
+import com.siwei.common.core.exception.ServiceException;
 import lombok.extern.slf4j.Slf4j;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -16,7 +21,7 @@ import java.util.*;
 
 
 /**
- *  获取三方数据服务实现类
+ * 获取三方数据服务实现类
  */
 @Slf4j
 @Service
@@ -29,6 +34,17 @@ public class OfferDataServiceImpl implements OfferDataService {
     @Autowired
     private ProjectWorkflowMapper projectWorkflowMapper;
 
+
+    @Autowired
+    private GyjsydscdjService gyjsydscdjService;
+
+
+
+
+
+
+
+
     @Override
     public Map<String, String> get(String projectId) {
         return Map.of();
@@ -41,16 +57,60 @@ public class OfferDataServiceImpl implements OfferDataService {
 
 
     @Override
-    public String  getTheFile(String attachmentId, String dirName,String fileName) {
+    public Map<String, Object> landFirstRegistration(LandFirstParamVo body) {
+        //
+        String yfbdcdyh = body.getYfbdcdyh();
+        if(StringUtils.isBlank(yfbdcdyh)){
+            throw new ServiceException("预分不动产单元号为空");
+        }
+        String ywbh = body.getYwbh();
+        if(StringUtils.isBlank(ywbh)){
+            throw new ServiceException("业务编号为空");
+        }
+        //todo 这里进行文件下载入库:
+
+
+
+
+        //todo 这里进行矢量文件的保存及其传输。
+
+
+
+        GyjsydscdjVo gyjsydscdjVo = new GyjsydscdjVo();
+        gyjsydscdjVo.setProjectId(body.getXmbh());
+        gyjsydscdjVo.setQlr(body.getQlr());
+        gyjsydscdjVo.setGyqk(body.getGyqk());
+        gyjsydscdjVo.setZl(body.getZl());
+        gyjsydscdjVo.setQllx(body.getQllx());
+        gyjsydscdjVo.setQlxz(body.getQlxz());
+        gyjsydscdjVo.setTdyt(body.getTdyt());
+        if (StringUtils.isNotBlank(body.getTdmj())) {
+            gyjsydscdjVo.setArea(Float.valueOf(body.getTdmj()));
+        }
+        gyjsydscdjVo.setAreaUnit(body.getTdmjdw());
+        gyjsydscdjVo.setBdcdyh(StringUtils.isNotBlank(body.getBdcdyh()) ? body.getBdcdyh() : body.getYfbdcdyh());
+        gyjsydscdjVo.setBdczh(body.getBdczh());
+        gyjsydscdjVo.setDjjg(body.getDjjg());
+        gyjsydscdjVo.setDjDate(body.getDjrq());
+
+        String id = gyjsydscdjService.add(gyjsydscdjVo);
+        Map<String, Object> map = new HashMap<>();
+        map.put("id", id);
+        return map;
+    }
+
+
+    @Override
+    public String getTheFile(String attachmentId, String dirName, String fileName) {
         String fileAndPath = "";
         NodeAttachment nodeAttachment = nodeAttachmentService.getById(attachmentId);
-        nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeAttachment.getNodeId(),null);
+        nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeAttachment.getNodeId(), null);
 
-        if(Objects.nonNull(nodeAttachment)){
-            List<Map <String,String>>  fileList = ServiceUtil.getDirChildrenList(dirName,nodeAttachment);
-            if(Objects.nonNull(fileList)){
-                Optional<Map<String, String>> result = fileList.stream().filter(s->s.get("name").equalsIgnoreCase(fileName)).findFirst();
-                if(result.isPresent()){
+        if (Objects.nonNull(nodeAttachment)) {
+            List<Map<String, String>> fileList = ServiceUtil.getDirChildrenList(dirName, nodeAttachment);
+            if (Objects.nonNull(fileList)) {
+                Optional<Map<String, String>> result = fileList.stream().filter(s -> s.get("name").equalsIgnoreCase(fileName)).findFirst();
+                if (result.isPresent()) {
                     fileAndPath = result.get().get("path");
                 }
             }
@@ -59,15 +119,15 @@ public class OfferDataServiceImpl implements OfferDataService {
     }
 
     @Override
-    public NodeAttachment  getThirdNodeAttachment(String immobileCode, String projectId,String dqjd) throws Exception{
-        String nodeTableName = dqjd.equals("00") ? AloneWorkFlowEnum.NODE_2.getTableName() : dqjd.equals("01") ? AloneWorkFlowEnum.NODE_6.getTableName() :"";
+    public NodeAttachment getThirdNodeAttachment(String immobileCode, String projectId, String dqjd) throws Exception {
+        String nodeTableName = dqjd.equals("00") ? AloneWorkFlowEnum.NODE_2.getTableName() : dqjd.equals("01") ? AloneWorkFlowEnum.NODE_6.getTableName() : "";
         NodeAttachment nodeAttachment = null;
         List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId, nodeTableName);
         Optional<ProjectWorkflow> res = projectWorkflows.stream().findFirst();
-        if(res.isPresent()){
+        if (res.isPresent()) {
             String nodeId = res.get().getNodeId();
-            log.info("-------getAttachmentByProjectIdAndTable-----"+nodeId);
-            nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeId,null);
+            log.info("-------getAttachmentByProjectIdAndTable-----" + nodeId);
+            nodeAttachment = nodeAttachmentService.getNodeAttachmentData(nodeId, null);
             //这里获取到所有附件文件路径进行转化拼接为新的
             ServiceUtil.convertFilePath(nodeAttachment);
         }
@@ -75,16 +135,4 @@ public class OfferDataServiceImpl implements OfferDataService {
     }
 
 
-
-
-
-
-
-
-
-
-
-
-
-
 }

+ 1 - 3
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/TakeDataServiceImpl.java

@@ -11,7 +11,6 @@ import com.siwei.apply.enums.AloneWorkFlowEnum;
 import com.siwei.apply.mapper.ProjectWorkflowMapper;
 import com.siwei.apply.service.NodeLandService;
 import com.siwei.apply.service.ProjectService;
-import com.siwei.apply.service.TdgyService;
 import com.siwei.apply.service.third.TakeDataService;
 import com.siwei.apply.utils.HttpClientUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -54,8 +53,7 @@ public class TakeDataServiceImpl implements TakeDataService {
         String secondPlotCode = project.getSecondPlotCode();
         String tableName = AloneWorkFlowEnum.NODE_2.getTableName(); // 土地供应图斑
 
-        List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId,
-                tableName);
+        List<ProjectWorkflow> projectWorkflows = projectWorkflowMapper.selectByProjectIdAndNodeTableName(projectId, tableName);
         if (CollectionUtils.isNotEmpty(projectWorkflows)) {
             String nodeId = projectWorkflows.get(0).getNodeId();
             Map<String, Object> paramMap = new LinkedHashMap<>();