1
0
Quellcode durchsuchen

调整批次报批的附件异常调整

chenendian vor 2 Monaten
Ursprung
Commit
ff232639d5

+ 19 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/NodeAttachmentController.java

@@ -2,11 +2,13 @@ package com.siwei.apply.controller;
 
 
 import com.siwei.apply.domain.NodeAttachment;
 import com.siwei.apply.domain.NodeAttachment;
 import com.siwei.apply.domain.ProjectWorkflow;
 import com.siwei.apply.domain.ProjectWorkflow;
+import com.siwei.apply.domain.YdbpData;
 import com.siwei.apply.domain.res.TdgyRes;
 import com.siwei.apply.domain.res.TdgyRes;
 import com.siwei.apply.enums.AloneWorkFlowEnum;
 import com.siwei.apply.enums.AloneWorkFlowEnum;
 import com.siwei.apply.service.NodeAttachmentService;
 import com.siwei.apply.service.NodeAttachmentService;
 import com.siwei.apply.service.ProjectService;
 import com.siwei.apply.service.ProjectService;
 import com.siwei.apply.service.TdgyService;
 import com.siwei.apply.service.TdgyService;
+import com.siwei.apply.service.YdbpDataService;
 import com.siwei.apply.utils.ServiceFileUtil;
 import com.siwei.apply.utils.ServiceFileUtil;
 import com.siwei.common.core.domain.R;
 import com.siwei.common.core.domain.R;
 import com.siwei.common.core.utils.StringUtils;
 import com.siwei.common.core.utils.StringUtils;
@@ -35,6 +37,11 @@ public class NodeAttachmentController extends BaseController {
     @Autowired
     @Autowired
     private TdgyService tdgyService;
     private TdgyService tdgyService;
 
 
+    @Autowired
+    private YdbpDataService ydbpDataService;
+
+
+
 
 
     /**
     /**
      * 处理文件并保存附件信息
      * 处理文件并保存附件信息
@@ -55,18 +62,28 @@ public class NodeAttachmentController extends BaseController {
             if (nodeId == null || nodeId.trim().isEmpty()) {
             if (nodeId == null || nodeId.trim().isEmpty()) {
                 return R.fail("nodeId不能为空");
                 return R.fail("nodeId不能为空");
             }
             }
-            ProjectWorkflow projectWorkflow = projectService.getProjectWorkflowByNodeId(projectId,nodeId);
 
 
+
+            String tableName = "";
             String gdType = "";
             String gdType = "";
+            //YdbpData data = ydbpDataService.getById(id);
+            ProjectWorkflow projectWorkflow = projectService.getProjectWorkflowByNodeId(projectId,nodeId);
             if(Objects.nonNull(projectWorkflow)){
             if(Objects.nonNull(projectWorkflow)){
                 if(AloneWorkFlowEnum.NODE_2.getTableName().equals(projectWorkflow.getNodeTableName())){
                 if(AloneWorkFlowEnum.NODE_2.getTableName().equals(projectWorkflow.getNodeTableName())){
                     TdgyRes tdgy = tdgyService.getById(nodeId);
                     TdgyRes tdgy = tdgyService.getById(nodeId);
                     gdType = tdgy.getGdType();
                     gdType = tdgy.getGdType();
                     gdType= "出让".equals(gdType) ? "1" : "划拨".equals(gdType)? "2":"1";
                     gdType= "出让".equals(gdType) ? "1" : "划拨".equals(gdType)? "2":"1";
                 }
                 }
+                tableName = projectWorkflow.getNodeTableName();
+            }else {
+                YdbpData data = ydbpDataService.getById(nodeId);
+                if(Objects.nonNull(data)){
+                    //tableName = AloneWorkFlowEnum.NODE_9.getTableName();
+                    tableName = AloneWorkFlowEnum.NODE_1.getTableName();
+                }
             }
             }
 
 
-            String id = nodeAttachmentService.processFileAndSave(filePath,projectWorkflow.getNodeTableName(),gdType);
+            String id = nodeAttachmentService.processFileAndSave(filePath,tableName,gdType);
             nodeAttachmentService.modifyAttachmentInfo(projectId,nodeId,id);
             nodeAttachmentService.modifyAttachmentInfo(projectId,nodeId,id);
             if (id != null) {
             if (id != null) {
                 Map<String, String> responseData = new HashMap<>();
                 Map<String, String> responseData = new HashMap<>();

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

@@ -12,7 +12,8 @@ public enum AloneWorkFlowEnum {
     NODE_5("5", "建设工程规划许可","t_jsgcghxk"),
     NODE_5("5", "建设工程规划许可","t_jsgcghxk"),
     NODE_6("6", "土地核验与规划核实","t_tdhyhs"),
     NODE_6("6", "土地核验与规划核实","t_tdhyhs"),
     NODE_7("7", "国有建设用地使用权及房屋所有权首次登记","t_gyjsydjfwscdj"),
     NODE_7("7", "国有建设用地使用权及房屋所有权首次登记","t_gyjsydjfwscdj"),
-    NODE_8("8", "规划条件与用地红线出具","t_tjyydhx");
+    NODE_8("8", "规划条件与用地红线出具","t_tjyydhx"),
+    NODE_9("8", "用地报批","t_ydbp_data");
 
 
     private final String index;
     private final String index;
     private final String name;
     private final String name;