Przeglądaj źródła

建设用地规划许可,建设工程规划许可的依赖关系

chenendian 3 miesięcy temu
rodzic
commit
9aaf4fa66b

+ 3 - 3
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/enums/GyjsydjfwscdjAttachmentNameEnum.java

@@ -8,9 +8,9 @@ import com.siwei.apply.common.UnifyAttachmentEnum;
  *
  */
 public enum GyjsydjfwscdjAttachmentNameEnum implements UnifyAttachmentEnum {
-    NAME_1("1", "主体资格文件", "主体资格文件", "国有建设用地使用权及房屋所有权首次登记"),
-    NAME_2("2", "权属来源证明", "登记结果", "国有建设用地使用权及房屋所有权首次登记"),
-    NAME_3("3", "竣工验收材料", "核实后材料", "国有建设用地使用权及房屋所有权首次登记"),
+    NAME_1("1", "主体资格文件", "主体资格文件:t_tdgy", "国有建设用地使用权及房屋所有权首次登记"),
+    NAME_2("2", "权属来源证明", "登记结果:t_gyjsydscdj", "国有建设用地使用权及房屋所有权首次登记"),
+    NAME_3("3", "竣工验收材料", "核实结果:t_tdhyhs", "国有建设用地使用权及房屋所有权首次登记"),
     NAME_4("4", "测绘成果", "", "国有建设用地使用权及房屋所有权首次登记"),
     NAME_5("5", "其它材料", "", "国有建设用地使用权及房屋所有权首次登记"),
     NAME_6("6", "登记结果", "", "国有建设用地使用权及房屋所有权首次登记");

+ 3 - 4
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/enums/JsgcghxkAttachmentNameEnum.java

@@ -9,13 +9,12 @@ import lombok.Getter;
 @Getter
 public enum JsgcghxkAttachmentNameEnum implements UnifyAttachmentEnum {
     NAME_1("1", "建设工程规划许可申请表", "", "建设工程规划许可阶段"),
-    NAME_2("2", "建设项目批准、核准、备案文件", "建设项目批准、核准、备案文件", "建设工程规划许可阶段"),
-    NAME_3("3", "使用土地的有关证明文件", "土地出让合同", "建设工程规划许可阶段"),
+    NAME_2("2", "建设项目批准、核准、备案文件", "建设项目批准、核准、备案文件:t_jsydghxk", "建设工程规划许可阶段"),
+    NAME_3("3", "使用土地的有关证明文件", "出让合同及成交确认书:t_tdgy|划拨决定书及交地确认书:t_tdgy", "建设工程规划许可阶段"),
     NAME_4("4", "建设工程设计方案", "", "建设工程规划许可阶段"),
-    NAME_5("5", "用地图形", "用地图形", "建设工程规划许可阶段"),
+    NAME_5("5", "用地图形", "用地图形:t_jsydghxk", "建设工程规划许可阶段"),
     NAME_6("6", "办理结果", "", "建设工程规划许可阶段");
 
-
     private final String code;
     private final String name;
     private final String relationName;

+ 2 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/enums/TdhyhsAttachmentNameEnum.java

@@ -7,8 +7,8 @@ import com.siwei.apply.common.UnifyAttachmentEnum;
  */
 public enum TdhyhsAttachmentNameEnum implements UnifyAttachmentEnum {
     NAME_1("1", "建设工程土地核验与规划核实申请表", "", "土地核验与规划核实阶段"),
-    NAME_2("2", "规划许可证", "办理结果", "土地核验与规划核实阶段"),
-    NAME_3("3", "土地权属证明材料", "GyjsydjfwscdjAttachmentNameEnum-登记结果|土地出让合同", "土地核验与规划核实阶段"),
+    NAME_2("2", "规划许可证", "建设用地规划许可:t_jsydghxk|建设工程规划许可:t_jsgcghxk", "土地核验与规划核实阶段"),
+    NAME_3("3", "土地权属证明材料", "登记结果:t_gyjsydscdj|出让合同及成交确认书:t_tdgy|划拨决定书及交地确认书:t_tdgy", "土地核验与规划核实阶段"),
     NAME_4("4", "测量数据", "", "土地核验与规划核实阶段"),
     NAME_5("5", "核实结果", "", "土地核验与规划核实阶段");
 

+ 23 - 57
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/impl/NodeAttachmentImpl.java

@@ -310,26 +310,20 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
     }
 
 
-
     /**
+     *      *             1.先判断,当前节点是否存在引用关系。
+     *      *             2.如果不存在直接返回。
+     *      *             3.查询出当前节点信息,解析object对象
+     *      *             4.如果存在引用关系,查询出所有被引用节点的附件信息
+     *      *             5.重新组装object信息并且生成json对象展示。
+     *      *              找到当前枚举类,
+     *      *              查看其依赖关系
+     *      *              根据依赖关系把其它数据进行整理。
+     *
      * 根据节点ID获取当前节点的附件信息
      * 这里需要合并依赖关系的附件资料引用复用等
      * @param nodeId 节点ID
-     * @return
-     */
-    /**
-     *
-     *
-     *             1.先判断,当前节点是否存在引用关系。
-     *             2.如果不存在直接返回。
-     *             3.查询出当前节点信息,解析object对象
-     *             4.如果存在引用关系,查询出所有被引用节点的附件信息
-     *             5.重新组装object信息并且生成json对象展示。
-     *              找到当前枚举类,
-     *              查看其依赖关系
-     *              根据依赖关系把其它数据进行整理。
-     *
-     *
+     * @return NodeAttachment
      */
     @Override
     public NodeAttachment getNodeAttachmentData(String nodeId) {
@@ -340,7 +334,6 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
                 nodeAttachment.setId("");
                 nodeAttachment.setNodeId(nodeId);
             }
-
             ProjectWorkflow projectWorkflow = null;
             //根据节点获取表名
             List<ProjectWorkflow> projectWorkflowList = projectWorkflowMapper.selectByNodeId(nodeId,null);
@@ -354,11 +347,8 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
             String projectId = projectWorkflow.getProjectId();
             Project project =projectMapper.get(projectId);
             Integer projectType = project.getProjectType();
-
             //单独选址
-            if(ProjectType.ALONE.getCode().equals(String.valueOf(projectType))){
-                nodeTableName = "t_ydbp";
-            }else if(ProjectType.BATCH.getCode().equals(String.valueOf(projectType))){
+            if(ProjectType.ALONE.getCode().equals(String.valueOf(projectType))||ProjectType.BATCH.getCode().equals(String.valueOf(projectType))){
                 if(AloneWorkFlowEnum.NODE_2.getTableName().equalsIgnoreCase(nodeTableName)){
                     //规划条件,用地红线出具:查找所有的批次报批节点进行合并
                     //取当前节点数据内容;
@@ -386,43 +376,18 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
                     nodeAttachment = this.assemblyAttachment(projectId,JsydghxkAttachmentNameEnum.NAME_3,nodeAttachment);
                     nodeAttachment = this.assemblyAttachment(projectId,JsydghxkAttachmentNameEnum.NAME_4,nodeAttachment);
                     nodeAttachment = this.assemblyAttachment(projectId,JsydghxkAttachmentNameEnum.NAME_5,nodeAttachment);
-                }
-
-
-
-
-                /*
-                else if(AloneWorkFlowEnum.NODE_3.getTableName().equalsIgnoreCase(nodeTableName)){
-                    //处理-规划条件出具依赖
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(GyjsydscdjAttachmentNameEnum.NAME_2,currentNodeAttachmentMap,relationNodeAttachmentMap);
-
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(GyjsydscdjAttachmentNameEnum.NAME_3,currentNodeAttachmentMap,relationNodeAttachmentMap);
-
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(GyjsydscdjAttachmentNameEnum.NAME_4,currentNodeAttachmentMap,relationNodeAttachmentMap);
-
-                } else if(AloneWorkFlowEnum.NODE_4.getTableName().equalsIgnoreCase(nodeTableName)){
-                    //处理-规划条件出具依赖
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(JsydghxkAttachmentNameEnum.NAME_3,currentNodeAttachmentMap,relationNodeAttachmentMap);
-
-                } else if(AloneWorkFlowEnum.NODE_5.getTableName().equalsIgnoreCase(nodeTableName)){
-                    //处理-规划条件出具依赖
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(JsgcghxkAttachmentNameEnum.NAME_2,currentNodeAttachmentMap,relationNodeAttachmentMap);
-
-                } else if(AloneWorkFlowEnum.NODE_6.getTableName().equalsIgnoreCase(nodeTableName)){
-                    //处理-规划条件出具依赖
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(TdhyhsAttachmentNameEnum.NAME_2,currentNodeAttachmentMap,relationNodeAttachmentMap);
+                }else if(AloneWorkFlowEnum.NODE_5.getTableName().equalsIgnoreCase(nodeTableName)){
+                    nodeAttachment = this.assemblyAttachment(projectId,JsgcghxkAttachmentNameEnum.NAME_2,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,JsgcghxkAttachmentNameEnum.NAME_3,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,JsgcghxkAttachmentNameEnum.NAME_5,nodeAttachment);
+                }else if(AloneWorkFlowEnum.NODE_6.getTableName().equalsIgnoreCase(nodeTableName)){
+                    nodeAttachment = this.assemblyAttachment(projectId,TdhyhsAttachmentNameEnum.NAME_3,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,TdhyhsAttachmentNameEnum.NAME_5,nodeAttachment);
                 }else if(AloneWorkFlowEnum.NODE_7.getTableName().equalsIgnoreCase(nodeTableName)){
-                    //处理-规划条件出具依赖
-                    relationNodeAttachmentMap = new LinkedHashMap<>();
-                    currentNodeAttachmentMap = this.assemblyAttachment(GyjsydjfwscdjAttachmentNameEnum.NAME_1,currentNodeAttachmentMap,relationNodeAttachmentMap);
-                }*/
-
+                    nodeAttachment = this.assemblyAttachment(projectId,GyjsydjfwscdjAttachmentNameEnum.NAME_1,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,GyjsydjfwscdjAttachmentNameEnum.NAME_2,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,GyjsydjfwscdjAttachmentNameEnum.NAME_3,nodeAttachment);
+                }
             }
             return nodeAttachment;
         } catch (Exception e) {
@@ -482,6 +447,7 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
             Map<String, Object> currentNodeAttachmentMap = new LinkedHashMap<>();
             currentNodeAttachmentMap.put("name", name);
             currentNodeAttachmentMap.put("path", "");
+            currentNodeAttachmentMap.put("physicalFlag", "0");
             currentNodeAttachmentMap.put("type", "directory");
             currentNodeAttachmentMap.put("children", currentAttachmentList);
             attachmentChildrenList.add(currentNodeAttachmentMap);

+ 1 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/FileExtractUtil.java

@@ -209,6 +209,7 @@ public class FileExtractUtil {
             Map<String, Object> structure = new HashMap<>();
             structure.put("name", directory.getFileName().toString());
             structure.put("type", Files.isDirectory(directory) ? "directory" : "file");
+            structure.put("physicalFlag", "1");
             structure.put("path", directory.toString());
             
             if (Files.isDirectory(directory)) {

+ 0 - 79
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/ServiceUtil.java

@@ -1,11 +1,7 @@
 package com.siwei.apply.utils;
 
-import com.siwei.apply.common.UnifyAttachmentEnum;
 import com.siwei.apply.domain.NodeAttachment;
-import com.siwei.apply.enums.GyjsydjfwscdjAttachmentNameEnum;
-import com.siwei.apply.enums.TdhyhsAttachmentNameEnum;
 import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
 
 import java.util.*;
 
@@ -13,76 +9,6 @@ import java.util.*;
  * 服务类工具
  */
 public class ServiceUtil {
-    /**
-     * 传递一个表名称,获取当前枚举对象
-     */
-    public static String getEnumName(String tableName) throws Exception {
-        Map<String , GyjsydjfwscdjAttachmentNameEnum> enumMap = new HashMap<>();
-        //enumMap.put("aaa", GyjsydjfwscdjAttachmentNameEnum);
-        Map<String,Class<TdhyhsAttachmentNameEnum>> map = new HashMap<>();
-        map.put("dd", TdhyhsAttachmentNameEnum.class);
-        Class<TdhyhsAttachmentNameEnum> zz =  map.get("dd");
-        TdhyhsAttachmentNameEnum obj = zz.getDeclaredConstructor().newInstance();
-        obj.values();
-
-//        GyjsydjfwscdjAttachmentNameEnum 国有建设用地使用权及房屋所有权首次登记
-//        GyjsydscdjAttachmentNameEnum        国有建设用地使用权首次登记阶段
-//        JsgcghxkAttachmentNameEnum          建设工程规划许可阶段
-//        JsydghxkAttachmentNameEnum          建设用地规划许可阶段
-//        ProjectType                         (未在项目中找到定义,可能表示项目类型枚举)
-//        RegistrationProcessType             (未在项目中找到定义,可能表示登记流程类型枚举)
-//        TdgyAttachmentNameEnum              土地供应阶段
-//        TdhyhsAttachmentNameEnum            土地核验与规划核实阶段
-//        TjyydhxAttachmentNameEnum           规划条件与用地红线出具
-//        YdbpAttachmentNameEnum              用地报批阶段
-//        YdysyxzAttachmentNameEnum           用地预审选址附件名称枚举
-
-        return null;
-    }
-
-    /**
-     * 组装附件信息,处理依赖关系
-     * @param attachmentEnum
-     * @param currentNodeAttachmentMap
-     * @param relationNodeAttachmentMap
-     * @return
-     */
-    public static Map <String, Object>  assemblyAttachment2(UnifyAttachmentEnum attachmentEnum,Map <String, Object> currentNodeAttachmentMap, Map <String, List<String>> relationNodeAttachmentMap){
-        String name =  attachmentEnum.getName();
-        List<String> relationNameList = new ArrayList();
-        String relationNameStr =  attachmentEnum.getRelationName();
-        if(StringUtils.isNotBlank(relationNameStr)){
-            relationNameList = Arrays.asList(relationNameStr.split("\\|"));
-        }
-        /**
-         *
-         * 这里处理依赖关系
-         * 先判断当前是否存在该资料
-         * 1.如果当前节点附件信息不包含该资料,则进行合并
-         * 获取依赖的map,写一个方法:
-         *
-         *
-         */
-        List<String> currentAttachmentList = new ArrayList<>();
-        if(!currentNodeAttachmentMap.containsKey(name) || Objects.isNull(currentNodeAttachmentMap.get(name))) {
-            //这里需要查询并整理所有批次报批节点,查询,
-            if(CollectionUtils.isNotEmpty(relationNameList)) {
-                for(String relationName : relationNameList) {
-                    if (relationNodeAttachmentMap.containsKey(relationName) && CollectionUtils.isNotEmpty(relationNodeAttachmentMap.get(relationName))){
-                        currentAttachmentList.addAll(relationNodeAttachmentMap.get(relationName));
-                    }
-                }
-            }
-        }
-        //第一个依赖关系解决
-        currentNodeAttachmentMap.put(name,currentAttachmentList);
-        return currentNodeAttachmentMap;
-    }
-
-
-
-
-
     /**
      * 获取指定目录下的子children list
      * @param dirName 目录名称
@@ -112,9 +38,4 @@ public class ServiceUtil {
 
 
 
-
-
-
-
-
 }