1
0
Переглянути джерело

完成后附件节点关联

chenendian 12 годин тому
батько
коміт
104ac63b6f

+ 12 - 7
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/DealExcelServiceImpl.java

@@ -109,7 +109,6 @@ public class DealExcelServiceImpl{
     public String addExcelDataToDb(Map<String, List<Map<String, String>>> dataMap) {
         String rootPath2019 = Constant.IMPORT_EXCEL_DATA_FILE_PATH+"\\数据治理批量导入示例数据\\赣江新区项目文件夹建立\\1.出让项目\\2019";
         String rootPath2020 = Constant.IMPORT_EXCEL_DATA_FILE_PATH+"\\数据治理批量导入示例数据\\赣江新区项目文件夹建立\\1.出让项目\\2020";
-        //String targectDir = "D:\\home\\siwei\\uploadPath\\2026\\0525\\14\\";
         String targectDir = Constant.FILE_UPLOAD_PATH;
 
         List<Map<String, String>> xmList = dataMap.get("项目信息");
@@ -310,12 +309,17 @@ public class DealExcelServiceImpl{
             log.error("写入日志文件失败: {}", e.getMessage(), e);
             return "失败";
         }
-
-
-
     }
 
 
+
+    /**
+     * 这里与项目进行
+     * @param filePath
+     * @param projectId
+     * @param nodeId
+     * @return
+     */
     public String  associationFile(String filePath , String projectId, String nodeId) {
         try {
             String tableName = "";
@@ -334,9 +338,10 @@ public class DealExcelServiceImpl{
                     tableName = AloneWorkFlowEnum.NODE_1.getTableName();
                 }
             }
-            String id = nodeAttachmentService.processFileAndSave(filePath,tableName,gdType);
-            nodeAttachmentService.modifyAttachmentInfo(projectId,nodeId,id);
-            return id;
+            String nodeAttachmentId = nodeAttachmentService.processFileAndSave(filePath,tableName,gdType);
+            boolean success = nodeAttachmentService.updateNodeId(nodeAttachmentId, nodeId);
+            nodeAttachmentService.modifyAttachmentInfo(projectId,nodeId,nodeAttachmentId);
+            return nodeAttachmentId;
         } catch (Exception e) {
             log.error("处理文件异常", e);
         }