Przeglądaj źródła

报批数据依赖关系,土地供应处理完成

chenendian 3 miesięcy temu
rodzic
commit
87788a23f1

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

@@ -8,13 +8,12 @@ import com.siwei.apply.common.UnifyAttachmentEnum;
  */
 public enum GyjsydscdjAttachmentNameEnum implements UnifyAttachmentEnum {
     NAME_1("1", "申请表及询问笔录", "", "国有建设用地使用权首次登记阶段资料"),
-    NAME_2("2", "主体资格文件", "主体资格文件", "国有建设用地使用权首次登记阶段资料"),
-    NAME_3("3", "测绘成果", "出让图形|规划红线图", "国有建设用地使用权首次登记阶段资料"),
-    NAME_4("4", "土地权属来源证明", "出让合同及成交确认书", "国有建设用地使用权首次登记阶段资料"),
+    NAME_2("2", "主体资格文件", "主体资格文件:t_tdgy", "国有建设用地使用权首次登记阶段资料"),
+    NAME_3("3", "测绘成果", "出让图形:t_tdgy|规划红线图:t_tjyydhx", "国有建设用地使用权首次登记阶段资料"),
+    NAME_4("4", "土地权属来源证明", "出让合同及成交确认书:t_tdgy|划拨决定书及交地确认书:t_tdgy", "国有建设用地使用权首次登记阶段资料"),
     NAME_5("5", "完税凭证", "", "国有建设用地使用权首次登记阶段资料"),
     NAME_6("6", "登记结果", "", "国有建设用地使用权首次登记阶段资料");
 
-
     private final String code;
     private final String name;
     private final String relationName;

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

@@ -8,9 +8,9 @@ import com.siwei.apply.common.UnifyAttachmentEnum;
 public enum JsydghxkAttachmentNameEnum implements UnifyAttachmentEnum {
     NAME_1("1", "建设用地规划许可申请表", "", "建设用地规划许可阶段"),
     NAME_2("2", "建设项目批准、核准、备案文件", "", "建设用地规划许可阶段"),
-    NAME_3("3", "使用土地的有关证明文件", "土地出让合同", "建设用地规划许可阶段"),
-    NAME_4("4", "用地图形", "用地图形", "建设用地规划许可阶段"),
-    NAME_5("5", "标明建设项目拟用地位置的地形图", "规划红线图", "建设用地规划许可阶段"),
+    NAME_3("3", "使用土地的有关证明文件", "出让合同及成交确认书:t_tdgy|划拨决定书及交地确认书:t_tdgy", "建设用地规划许可阶段"),
+    NAME_4("4", "用地图形", "用地图形:t_tdgy", "建设用地规划许可阶段"),
+    NAME_5("5", "标明建设项目拟用地位置的地形图", "规划红线图:t_tjyydhx", "建设用地规划许可阶段"),
     NAME_6("6", "建设用地规划许可", "", "建设用地规划许可阶段");
 
     private final String name;

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

@@ -7,7 +7,8 @@ import com.siwei.apply.common.UnifyAttachmentEnum;
  * 土地供应阶段
  */
 public enum TdgyAttachmentNameEnum implements UnifyAttachmentEnum {
-    NAME_1("1", "土地权属来源文件", "用地批复", "土地供应阶段"),
+    NAME_1("1", "土地权属来源文件", "用地批复:t_ydbp", "土地供应阶段"),
+    NAME_1_B("1", "土地权属来源文件", "用地批复:t_ydbp_data", "土地供应阶段"),
     NAME_2("2", "规划条件出具", "用地红线:t_tjyydhx|规划条件出具:t_tjyydhx", "土地供应阶段"),
     NAME_3("3", "出让图形", "用地红线:t_tjyydhx", "土地供应阶段"),
     NAME_4("4", "出让方案批复文件", "", "土地供应阶段"),

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

@@ -10,9 +10,9 @@ public enum TdgyHbAttachmentNameEnum implements UnifyAttachmentEnum {
     NAME_1("1", "项目批准文件", "项目建设依据:t_ydysyxz|办理成果:t_ydysyxz", "土地供应阶段"),
     NAME_2("2", "土地权属来源文件", "用地批复:t_ydbp", "土地供应阶段"),
     NAME_2_B("2.1", "土地权属来源文件", "用地批复:t_ydbp_data", "土地供应阶段"),
-    NAME_3("3", "主体资格文件", "用地红线:t_tjyydhx", "土地供应阶段"),
-    NAME_4("4", "测量报告", "用地批复:t_ydbp", "土地供应阶段"),
-    NAME_4_B("4.1", "测量报告", "用地批复:t_ydbp_data", "土地供应阶段"),
+    NAME_3("3", "主体资格文件", "", "土地供应阶段"),
+    NAME_4("4", "测量报告", "项目红线:t_ydbp", "土地供应阶段"),
+    NAME_4_B("4.1", "测量报告", "项目红线:t_ydbp_data", "土地供应阶段"),
     NAME_5("5", "其它文件", "", "土地供应阶段"),
     NAME_7("6", "划拨决定书及交地确认书", "", "土地供应阶段");
 

+ 22 - 26
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/impl/NodeAttachmentImpl.java

@@ -370,9 +370,27 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
                         //处理-出让图形依赖
                         nodeAttachment = this.assemblyAttachment(projectId,TdgyAttachmentNameEnum.NAME_3,nodeAttachment);
                     }else if("划拨".equals(gdType)) {
-
+                        //处理-项目批准文件
+                        nodeAttachment = this.assemblyAttachment(projectId,TdgyHbAttachmentNameEnum.NAME_1,nodeAttachment);
+                        //处理-土地权属来源文件
+                        nodeAttachment = this.assemblyAttachment(projectId,TdgyHbAttachmentNameEnum.NAME_2_B,nodeAttachment);
+                        //处理-测量报告
+                        nodeAttachment = this.assemblyAttachment(projectId,TdgyHbAttachmentNameEnum.NAME_4_B,nodeAttachment);
                     }
+                }else if(AloneWorkFlowEnum.NODE_3.getTableName().equalsIgnoreCase(nodeTableName)){
+                    //处理-主体资格文件
+                    nodeAttachment = this.assemblyAttachment(projectId,GyjsydscdjAttachmentNameEnum.NAME_2,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,GyjsydscdjAttachmentNameEnum.NAME_3,nodeAttachment);
+                    nodeAttachment = this.assemblyAttachment(projectId,GyjsydscdjAttachmentNameEnum.NAME_4,nodeAttachment);
+                } else if(AloneWorkFlowEnum.NODE_4.getTableName().equalsIgnoreCase(nodeTableName)){
+                    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)){
                     //处理-规划条件出具依赖
@@ -420,7 +438,6 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
      * 1.如果当前节点附件信息不包含该资料,则进行合并
      * 获取依赖的map,写一个方法:
      *
-     *
      */
     public  NodeAttachment  assemblyAttachment(String projectId,UnifyAttachmentEnum attachmentEnum,NodeAttachment nodeAttachment){
         String name =  attachmentEnum.getName();
@@ -429,11 +446,10 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
             attachmentMap = nodeAttachment.getAttachment();
         }else {
             attachmentMap = new LinkedHashMap<>();
-            attachmentMap.put("name",name);
+            attachmentMap.put("name",attachmentEnum.getParentName());
             attachmentMap.put("path","");
             attachmentMap.put("type","directory");
         }
-
         //当前材料的首层目录结构list
         List<Map <String,Object>> attachmentChildrenList = null;
         if(Objects.nonNull(attachmentMap.get("children"))) {
@@ -443,7 +459,7 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
         }
 
         //当前节点的当前名称子children list
-        List<Map <String,String>> currentAttachmentList = this.getDirChildrenList(name,nodeAttachment);
+        List<Map <String,String>> currentAttachmentList = ServiceUtil.getDirChildrenList(name,nodeAttachment);
         //当前目录不存在此节点,需要通过依赖关系填充
         if(CollectionUtils.isEmpty(currentAttachmentList)) {
             currentAttachmentList = new ArrayList<>();
@@ -457,7 +473,7 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
                         String relationName = innerRelationNameList.get(0);
                         String tableName = innerRelationNameList.get(1);
                         NodeAttachment relationNodeAttachment = this.getAttachmentByProjectIdAndTable(projectId, tableName);
-                        List<Map<String, String>> relationNodeFileList = this.getDirChildrenList(relationName, relationNodeAttachment);
+                        List<Map<String, String>> relationNodeFileList = ServiceUtil.getDirChildrenList(relationName, relationNodeAttachment);
                         currentAttachmentList.addAll(relationNodeFileList);
                     }
                 }//end for
@@ -481,26 +497,6 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
 
 
 
-    public  List<Map <String,String>>  getDirChildrenList(String dirName,NodeAttachment nodeAttachment) {
-        List<Map <String,String>> list = new  ArrayList<>();
-        if (Objects.nonNull(nodeAttachment) && Objects.nonNull(nodeAttachment.getAttachment())) {
-            Map<String, Object> attachment = nodeAttachment.getAttachment();
-            //第一曾经children 所有目录list
-            List<Map> childrenList = (List<Map>) attachment.get("children");
-            if (CollectionUtils.isNotEmpty(childrenList)) {
-                for (Map childMap : childrenList) {
-                    String childName = (String) childMap.get("name");
-                    if (childName.equalsIgnoreCase(dirName)) {
-                        list = (List<Map<String, String>>) childMap.get("children");
-                        break;
-                    }
-                }
-            }
-        }
-        return  list;
-    }
-
-
 
 
 }

+ 25 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/ServiceUtil.java

@@ -1,6 +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;
@@ -82,7 +83,30 @@ public class ServiceUtil {
 
 
 
-
+    /**
+     * 获取指定目录下的子children list
+     * @param dirName 目录名称
+     * @param nodeAttachment 附件信息
+     * @return
+     */
+    public static   List<Map <String,String>>  getDirChildrenList(String dirName, NodeAttachment nodeAttachment) {
+        List<Map <String,String>> list = new  ArrayList<>();
+        if (Objects.nonNull(nodeAttachment) && Objects.nonNull(nodeAttachment.getAttachment())) {
+            Map<String, Object> attachment = nodeAttachment.getAttachment();
+            //第一曾经children 所有目录list
+            List<Map> childrenList = (List<Map>) attachment.get("children");
+            if (CollectionUtils.isNotEmpty(childrenList)) {
+                for (Map childMap : childrenList) {
+                    String childName = (String) childMap.get("name");
+                    if (childName.equalsIgnoreCase(dirName)) {
+                        list = (List<Map<String, String>>) childMap.get("children");
+                        break;
+                    }
+                }
+            }
+        }
+        return  list;
+    }