Kaynağa Gözat

入库代码finash第一

chenendian 17 saat önce
ebeveyn
işleme
171dc493bd

+ 5 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/common/Constant.java

@@ -87,12 +87,16 @@ public class Constant {
 
 
     public static final List<String> NODE_ATTACHMENT_NAME_LIST = List.of(
+            "2016",
+            "2017",
+            "2018",
             "2019",
             "2020",
             "2021",
             "2022",
             "2023",
             "2024",
+            "2025",
             "DX2017",
             "DX2018",
             "DX2019",
@@ -116,7 +120,7 @@ public class Constant {
     public static final String  IMPORT_EXCEL_FILE_PATH = "D:\\tmp\\给开发";
 
 
-    public static final String  FILE_UPLOAD_PATH = "/home/siwei/uploadPath/2026/09/32";
+    public static final String  FILE_UPLOAD_PATH = "/home/siwei/uploadPath/2026/09/33";
 
     public static final String  GG = "GONGGAI";
     public static final String  BDC = "BUDONGCHAN";

+ 2 - 4
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/third/DealExcelController.java

@@ -78,8 +78,6 @@ public class DealExcelController extends BaseController {
 
 
 
-
-
     /**
      * 处理excel数据,批次报批数据
      */
@@ -115,8 +113,8 @@ public class DealExcelController extends BaseController {
 //            String res = dealExcelService.checkExcelDataToDb(dataMap);
 //            logger.info("检查数据结果{}",res);
 
-
-            String res = dealExcelService.addExcelDataToDb(dataMap);
+            //String res = dealExcelService.addExcelDataToDb(dataMap);
+            String res = "";
             logger.info("新增数据结果{}",res);
 
 //            for (Map.Entry<String, List<Map<String, String>>> entry : dataMap.entrySet()) {

+ 2 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/vo/TjyydhxVo.java

@@ -15,5 +15,6 @@ public class TjyydhxVo {
     private String ydwz;           // 用地位置
     private String cjbh;           // 出具编号
     private String cjDate;           // 出具日期
-    private String cjyj;           // 出具意见
+    private String cjyj;           // 出具依据
+
 }

+ 75 - 473
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/DealExcelServiceImpl.java

@@ -49,12 +49,17 @@ import java.util.stream.Collectors;
 @Service
 public class DealExcelServiceImpl {
     // 土地供应 ,出让,划拨
-    private final String rootPathAll = "";
+    //private final String rootPathAll = "";
+
 
     private final String rootPathAll_CR = Constant.IMPORT_EXCEL_FILE_PATH + "\\4.土地供应\\附件材料\\1.出让项目";
     private final String rootPathAll_HB = Constant.IMPORT_EXCEL_FILE_PATH + "\\4.土地供应\\附件材料\\2.划拨项目";
     //用地预审选址
     private final String rootPathAll_YDYSYXZ = Constant.IMPORT_EXCEL_FILE_PATH + "\\2.用地预审与选址项目";
+    private final String rootPathAll_TJYYDHX = Constant.IMPORT_EXCEL_FILE_PATH + "\\1.条件出具规划条件与用地红线出具";
+
+    private final String rootPathAll_YDBP = Constant.IMPORT_EXCEL_FILE_PATH + "\\3.用地报批\\附件材料";
+    private final String rootPathAll_YDBP_SHP = Constant.IMPORT_EXCEL_FILE_PATH + "\\3.用地报批\\矢量图层";
 
     //private final String rootPath2019 = Constant.IMPORT_EXCEL_DATA_FILE_PATH + "\\数据治理批量导入示例数据\\赣江新区项目文件夹建立\\1.出让项目\\2019";
     //private final String rootPath2020 = Constant.IMPORT_EXCEL_DATA_FILE_PATH + "\\数据治理批量导入示例数据\\赣江新区项目文件夹建立\\1.出让项目\\2020";
@@ -238,7 +243,13 @@ public class DealExcelServiceImpl {
                 writeToLog("project_file_name_err2.log", "excel行(" + i + ")-> "+projectFileName);
 
                 String currentGdType =  gdType.equalsIgnoreCase("出让") ? "1" : (gdType.equalsIgnoreCase("划拨")? "2" : "1");
-                dealCurrentNodeAttachmentV3(projectId, id, projectFileName,"", nodeFileName, currentGdType);
+                String outPath = "";
+                if("1".equalsIgnoreCase(currentGdType)){
+                    outPath = rootPathAll_CR;
+                }else if("2".equalsIgnoreCase(currentGdType)){
+                    outPath = rootPathAll_HB;
+                }
+                dealCurrentNodeAttachmentV3(projectId, id, projectFileName,outPath, nodeFileName, currentGdType);
                 //矢量数据处理  -- 数据治理文件名
                 String dzjgh = jdMap.get("划拨决定书/出让合同电子监管号");
                 dealCurrentNodeGeom(dzjgh, id);
@@ -268,7 +279,10 @@ public class DealExcelServiceImpl {
                 Map<String, String> excel = ydbpList.get(i);
                 if (!isAllFieldsEmpty(excel)) {
                     String pfwh = excel.get("批复文号(必填)");
+
                     String pfDate = excel.get("批复日期(必填)");
+                    pfDate = this.parseChineseDate(pfDate);
+
                     if (StringUtils.isNotBlank(pfwh) && StringUtils.isNotBlank(pfDate) && isValidChineseDate(pfDate)) {
                         pfDate = parseChineseDate(pfDate);
                         YdbpVo vo = new YdbpVo();
@@ -287,17 +301,51 @@ public class DealExcelServiceImpl {
                             else hasZz = "";
                         }
                         vo.setHasZz(hasZz);
-                        vo.setBpDate(excel.get("报批日期"));
+                        String bpDate = excel.get("报批日期");
+                        vo.setBpDate(this.parseChineseDate(bpDate));
                         String nodeId = ydbpService.add(vo);
+
+                        //附件处理
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachmentV3(projectId, nodeId, jdList.get(i).get("数据治理文件名"),rootPathAll, "01用地报批阶段", null);
+                            dealCurrentNodeAttachmentV3(projectId, nodeId, projectName,rootPathAll_YDBP, "01用地报批阶段", null);
+                        }
+
+                        //矢量处理
+                        if (StringUtils.isNotBlank(projectName)) {
+                            String shpFileName = projectName + ".zip";
+                            Path filePath = Paths.get(rootPathAll_YDBP_SHP + "\\" + shpFileName);
+                            if (Files.exists(filePath) && !Files.isDirectory(filePath)) {
+                                String fullFilePath = copyFileToDirectory(rootPathAll_YDBP_SHP + "\\", targectDir, shpFileName);
+                                R<TGeomDb> saveGeomRes = remoteSpatialFilesDbService.readShp(shpFileName, fullFilePath, "excel", SecurityConstants.INNER);
+                                TGeomDb tGeomDb = saveGeomRes.getData();
+                                log.info("远程调用geom保存,返回结果:{}", tGeomDb);
+                                //这里保存geom映射关系
+                                nodeLandService.createNodeLand(nodeId, tGeomDb.getId());
+                            }else {
+                                log.info("数据治理文件不存在--找不到矢量zip,路径:{}", filePath);
+                            }
+                        }
+
+                        try{
+                            //这里更新上链
+                            NodeLand nodeLand = nodeLandService.getNodeLandByNodeId(nodeId);
+                            if(Objects.nonNull(nodeLand)){
+                                tdgyService.updateHasOnchain(nodeId, projectId,true);
+                                // 更新项目表的上链数量
+                                projectService.countOnChinaNum(projectId);
+                                //这里生成资源吗
+                                landOneCodeService.addOrUpdateLandOneCodeInfo(projectId,nodeId);
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            log.info("自动上链失败:上链项目名称:{},错误信息{}",projectName, e.getMessage());
                         }
+
                     }
                 }
             }
 
 
-
             // ----- 用地预审与选址 (仅单独选址) -----
             if (projectVo.getProjectType() == 1 && CollectionUtils.isNotEmpty(ydysyxzList) && i < ydysyxzList.size()) {
                 Map<String, String> excel = ydysyxzList.get(i);
@@ -322,21 +370,16 @@ public class DealExcelServiceImpl {
                         vo.setHasZz(hasZz);
                         vo.setJsyj(excel.get("项目建设依据"));
                         vo.setXmjsyj(excel.get("项目规模及内容"));
-
                         String nodeId = ydysyxzService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachmentV3(projectId, nodeId, projectName, rootPathAll_YDYSYXZ,"00用地预审与选址阶段", null);
-                        }
+
+                        dealCurrentNodeAttachmentV3(projectId, nodeId, projectName, rootPathAll_YDYSYXZ,"00用地预审与选址阶段", null);
                     }
                 }
             }
 
-
-
             // ----- 规划条件与用地红线出具 (仅批次报批) -----
             if (projectVo.getProjectType() == 2 && CollectionUtils.isNotEmpty(tjyydhxList) && i < tjyydhxList.size()) {
                 Map<String, String> excel = tjyydhxList.get(i);
-
                 if (!isAllFieldsEmpty(excel)) {
                     String cjbh = excel.get("出具编号");
                     String cjDate = excel.get("出具日期");
@@ -351,14 +394,14 @@ public class DealExcelServiceImpl {
                         vo.setAreaUnit(validateAreaUnit(excel.get("用地面积"), excel.get("面积单位"), "用地面积", "面积单位"));
                         vo.setYdxz(excel.get("用地性质"));
                         vo.setYdwz(excel.get("用地位置"));
+                        vo.setCjyj(excel.get("出具依据"));
+
                         String nodeId = tjyydhxService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachmentV3(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "","09规划条件与用地红线出具阶段", null);
-                        }
+                        //附件处理
+                        dealCurrentNodeAttachmentV3(projectId, nodeId, cjbh, rootPathAll_TJYYDHX,"09规划条件与用地红线出具阶段", null);
                     }
                 }
             }
-
             i++;
         }
         return "successs";
@@ -370,15 +413,6 @@ public class DealExcelServiceImpl {
 
 
 
-
-
-
-
-
-
-
-
-
     /**
      * 下载相关的不动产材料附件
      * @param dataMap
@@ -1070,456 +1104,28 @@ public class DealExcelServiceImpl {
     }
 
 
-    /**
-     * 添加excel数据到数据库
-     *
-     * @param dataMap
-     * @return
-     */
-    @Transactional(rollbackFor = Exception.class)
-    public String addExcelDataToDb(Map<String, List<Map<String, String>>> dataMap) {
-
-        List<Map<String, String>> xmList = dataMap.get("项目信息");
-        List<Map<String, String>> tdgyList = dataMap.get("土地供应");
-        List<Map<String, String>> jdList = dataMap.get("阶段");
-        List<Map<String, String>> ydysyxzList = dataMap.get("用地预审与选址");
-        List<Map<String, String>> ydbpList = dataMap.get("用地报批");
-        List<Map<String, String>> gyjsydscdjList = dataMap.get("国有建设用地使用权首次登记");
-        List<Map<String, String>> jsydghxkList = dataMap.get("建设用地规划许可");
-        List<Map<String, String>> jsgcghxkList = dataMap.get("建设工程规划许可");
-        List<Map<String, String>> tdhyhsList = dataMap.get("土地核验与规划核实");
-        List<Map<String, String>> gyjsydjfwscdjList = dataMap.get("国有建设用地使用权及房屋所有权首次登记(会有多个不动产权证)(界面新参数)");
-        List<Map<String, String>> tjyydhxList = dataMap.get("规划条件与用地红线出具");
-
-        int i = 0;
-
-        for (Map<String, String> xm : xmList) {
-            ProjectVo projectVo = new ProjectVo();
-            String projectType = xm.get("项目类型(必填)");
-            if (projectType.equalsIgnoreCase("单独选址")) {
-                projectVo.setProjectType(1);
-            } else if (projectType.equalsIgnoreCase("批次报批")) {
-                projectVo.setProjectType(2);
-            } else {
-                log.error("项目类型不合法,项目类型只能是单独选址或者批次报批{}", projectType);
-                continue;
-            }
-
-            String projectName = xm.get("项目名称");
-            if (StringUtils.isBlank(projectName)) {
-                projectName = "xxxx1_" + System.currentTimeMillis();
-                log.warn("项目名称为空,默认设置为{}", projectName);
-            }else {
-                projectName = "pro1_" + projectName;
-            }
-
-            projectVo.setName(projectName);
-
-            String code = xm.get("项目代码");
-            projectVo.setCode(code);
-
-            String company = xm.get("建设单位");
-            projectVo.setCompany(company);
-            projectVo.setOnChainNum(0);
-
-            String projectId = projectService.add(projectVo);
-
-            // -----------------第一部分增加项目结束-------------------------------
-
-
-            // -----------------第二部分增加土地供应环节开始-------------------------------
-            if (CollectionUtils.isNotEmpty(tdgyList)) {
-                TdgyVo tdgyVo = new TdgyVo();
-                tdgyVo.setProjectId(projectId);
-
-                Map<String, String> tdgyExcel = tdgyList.get(i);
-                String srf = tdgyExcel.get("土地受让人");
-                tdgyVo.setSrf(srf);
-
-                String tdyt = tdgyExcel.get("土地用途");
-                String tdytCode = getTdytCodeByName(tdyt);
-                if (StringUtils.isBlank(tdytCode)) {
-                    log.warn("土地用途{}没有找到对应的code,默认设置为{}", tdyt, tdytCode);
-                }
-                tdgyVo.setTdyt(tdytCode);
-
-                String gdArea = tdgyExcel.get("供地面积");
-                if (StringUtils.isBlank(gdArea)) {
-                    log.warn("供地面积为空,默认设置为0");
-                    gdArea = "0";
-                }
-                tdgyVo.setGdArea(Float.parseFloat(gdArea));
-
-                String gdUnit = tdgyExcel.get("面积单位");
-                if (StringUtils.isBlank(gdUnit)) {
-                    log.warn("面积单位为空,默认设置为空字符");
-                    gdUnit = "";
-                }
-                tdgyVo.setGdUnit(gdUnit);
-
-                String jswz = tdgyExcel.get("建设位置");
-                tdgyVo.setJswz(jswz);
-
-                String gdType = tdgyExcel.get("供地方式");
-                tdgyVo.setGdType(gdType);
-
-                String hasZz = tdgyExcel.get("是否完成征转");
-                if (hasZz.equalsIgnoreCase("是")) {
-                    hasZz = "已报已征";
-                } else if (hasZz.equalsIgnoreCase("否")) {
-                    hasZz = "未报未征";
-                } else {
-                    log.warn("是否完成征转{}不合法,默认设置为否", hasZz);
-                    hasZz = "";
-                }
-                tdgyVo.setHasZz(hasZz);
-
-                String hbcrfapfwh = tdgyExcel.get("用地划拨/出让方案批复文号");
-                tdgyVo.setHbcrfapfwh(hbcrfapfwh);
-
-                String hbcrhtbh = tdgyExcel.get("划拨决定书/出让合同编号(必填)");
-                tdgyVo.setHbcrhtbh(hbcrhtbh);
-
-                String hbcrhtDate = tdgyExcel.get("划拨决定书/出让合同日期");
-                hbcrhtDate = parseChineseDate(hbcrhtDate);
-                tdgyVo.setHbcrhtDate(hbcrhtDate);
-                String id = tdgyService.add(tdgyVo);
-
-                //附件材料处理  -- 数据治理文件名
-                Map<String, String> jdMap = jdList.get(i);
-                String projectFileName = jdMap.get("数据治理文件名");
-                String nodeFileName = "03土地供应阶段";
-                writeToLog("project_file_name_err2.log", "excel行(" + i + ")-> "+projectFileName);
-
-                String currentGdType =  gdType.equalsIgnoreCase("出让") ? "1" : (gdType.equalsIgnoreCase("划拨")? "2" : "1");
-                dealCurrentNodeAttachment(projectId, id, projectFileName, nodeFileName, currentGdType);
-                //矢量数据处理  -- 数据治理文件名
-                String dzjgh = jdMap.get("划拨决定书/出让合同电子监管号");
-                dealCurrentNodeGeom(dzjgh, id);
-
-                try{
-                    //这里更新上链
-                    NodeLand nodeLand = nodeLandService.getNodeLandByNodeId(id);
-                    if(Objects.nonNull(nodeLand)){
-                        tdgyService.updateHasOnchain(id, projectId,true);
-                        // 更新项目表的上链数量
-                        projectService.countOnChinaNum(projectId);
-                        //这里生成资源吗
-                        landOneCodeService.addOrUpdateLandOneCodeInfo(projectId,id);
-                    }
-
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    log.info("自动上链失败:上链项目名称:{},错误信息{}",projectName, e.getMessage());
-                }
-
-            }
-            // -----------------第二部分增加项目关联的(土地供应)环节结束-------------------------------
-
-            // ----- 国有建设用地使用权首次登记 -----
-            if (CollectionUtils.isNotEmpty(gyjsydscdjList) && i < gyjsydscdjList.size()) {
-                Map<String, String> excel = gyjsydscdjList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String bdcdyh = excel.get("不动产单元号(必填)");
-                    String bdczh = excel.get("不动产证号(必填)");
-                    if (StringUtils.isNotBlank(bdcdyh) && StringUtils.isNotBlank(bdczh)) {
-                        GyjsydscdjVo vo = new GyjsydscdjVo();
-                        vo.setProjectId(projectId);
-                        vo.setBdcdyh(bdcdyh);
-                        vo.setBdczh(bdczh);
-                        vo.setQlr(excel.get("权利人"));
-                        vo.setGyqk(excel.get("共有情况"));
-                        vo.setZl(excel.get("坐落"));
-                        vo.setQllx(excel.get("权利类型"));
-                        vo.setQlxz(excel.get("权利性质"));
-                        vo.setTdyt(excel.get("土地用途"));
-                        vo.setArea(parseFloatField(excel.get("面积"), "国有建设用地使用权首次登记-面积"));
-                        vo.setAreaUnit(validateAreaUnit(excel.get("面积"), excel.get("面积单位"), "面积", "面积单位"));
-                        vo.setDjjg(excel.get("登记机构"));
-                        vo.setDjDate(excel.get("登记日期"));
-                        String nodeId = gyjsydscdjService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "04国有建设用地使用权首次登记阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 建设用地规划许可 -----
-            if (CollectionUtils.isNotEmpty(jsydghxkList) && i < jsydghxkList.size()) {
-                Map<String, String> excel = jsydghxkList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String zsbh = excel.get("证书编号(必填)");
-                    String fzDate = excel.get("发证日期(必填)");
-                    if (StringUtils.isNotBlank(zsbh) && StringUtils.isNotBlank(fzDate) && isValidChineseDate(fzDate)) {
-                        fzDate = parseChineseDate(fzDate);
-                        JsydghxkVo vo = new JsydghxkVo();
-                        vo.setProjectId(projectId);
-                        vo.setZsbh(zsbh);
-                        vo.setFzDate(fzDate);
-                        vo.setYddw(excel.get("用地单位"));
-                        vo.setYdwz(excel.get("用地位置"));
-                        vo.setYdArea(parseFloatField(excel.get("用地面积"), "建设用地规划许可-用地面积"));
-                        vo.setYdUnit(validateAreaUnit(excel.get("用地面积"), excel.get("用地面积单位"), "用地面积", "用地面积单位"));
-                        vo.setTdyt(excel.get("土地用途"));
-                        vo.setTdhqfs(excel.get("土地获取方式"));
-                        vo.setPzydjg(excel.get("批准用地机关"));
-                        vo.setPzydwh(excel.get("批准用地文号"));
-                        vo.setJsgm(excel.get("建设规模"));
-                        vo.setFzjg(excel.get("发证机关"));
-                        String nodeId = jsydghxkService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "05建设用地规划许可阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 建设工程规划许可 -----
-            if (CollectionUtils.isNotEmpty(jsgcghxkList) && i < jsgcghxkList.size()) {
-                Map<String, String> excel = jsgcghxkList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String zsbh = excel.get("证书编号(必填)");
-                    String fzDate = excel.get("发证日期(必填)");
-                    if (StringUtils.isNotBlank(zsbh) && StringUtils.isNotBlank(fzDate) && isValidChineseDate(fzDate)) {
-                        fzDate = parseChineseDate(fzDate);
-                        JsgcghxkVo vo = new JsgcghxkVo();
-                        vo.setProjectId(projectId);
-                        vo.setZsbh(zsbh);
-                        vo.setFzDate(fzDate);
-                        vo.setYddw(excel.get("用地单位"));
-                        vo.setYdwz(excel.get("用地位置"));
-                        String qsStr = excel.get("期数");
-                        if (StringUtils.isNotBlank(qsStr)) {
-                            try { vo.setQs(Integer.parseInt(qsStr)); } catch (NumberFormatException e) {
-                                log.warn("建设工程规划许可-期数格式不正确: {}", qsStr);
-                            }
-                        }
-                        vo.setJsgm(excel.get("建设规模"));
-                        vo.setFzjg(excel.get("发证机关"));
-                        String nodeId = jsgcghxkService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "06建设工程规划许可阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 土地核验与规划核实 -----
-            if (CollectionUtils.isNotEmpty(tdhyhsList) && i < tdhyhsList.size()) {
-                Map<String, String> excel = tdhyhsList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String hgzh = excel.get("合格证号(必填)");
-                    String fzDate = excel.get("发证日期(必填)");
-                    if (StringUtils.isNotBlank(hgzh) && StringUtils.isNotBlank(fzDate) && isValidChineseDate(fzDate)) {
-                        fzDate = parseChineseDate(fzDate);
-                        TdhyhsVo vo = new TdhyhsVo();
-                        vo.setProjectId(projectId);
-                        vo.setHgzh(hgzh);
-                        vo.setFzDate(fzDate);
-                        vo.setYdwz(excel.get("用地位置"));
-                        vo.setFzjg(excel.get("发证机关"));
-                        vo.setJsdw(excel.get("建设单位"));
-                        vo.setGljsgcghxkh(excel.get("关联建设工程规划许可号"));
-                        String nodeId = tdhyhsService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "07土地核验与规划核实阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 国有建设用地使用权及房屋所有权首次登记 -----
-            if (CollectionUtils.isNotEmpty(gyjsydjfwscdjList) && i < gyjsydjfwscdjList.size()) {
-                Map<String, String> excel = gyjsydjfwscdjList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String ywh = excel.get("业务号(必填)");
-                    if (StringUtils.isNotBlank(ywh)) {
-                        GyjsydjfwscdjVo vo = new GyjsydjfwscdjVo();
-                        vo.setProjectId(projectId);
-                        vo.setYwh(ywh);
-                        vo.setKfdw(excel.get("开发单位"));
-                        vo.setBdcqk(excel.get("不动产情况"));
-                        vo.setJzmj(excel.get("建筑面积"));
-                        vo.setJzmjDw(excel.get("建筑面积单位"));
-                        vo.setTnmj(excel.get("套内面积"));
-                        vo.setTnmjDw(excel.get("套内面积单位"));
-                        vo.setFtmj(excel.get("分摊面积"));
-                        vo.setFtmjDw(excel.get("分摊面积单位"));
-                        vo.setBz(excel.get("备注(数据清单)"));
-                        String nodeId = gyjsydjfwscdjService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "08国有建设用地使用权及房屋所有权首次登记阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 用地报批 (仅单独选址) -----
-            if (projectVo.getProjectType() == 1 && CollectionUtils.isNotEmpty(ydbpList) && i < ydbpList.size()) {
-                Map<String, String> excel = ydbpList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String pfwh = excel.get("批复文号(必填)");
-                    String pfDate = excel.get("批复日期(必填)");
-                    if (StringUtils.isNotBlank(pfwh) && StringUtils.isNotBlank(pfDate) && isValidChineseDate(pfDate)) {
-                        pfDate = parseChineseDate(pfDate);
-                        YdbpVo vo = new YdbpVo();
-                        vo.setProjectId(projectId);
-                        vo.setPfwh(pfwh);
-                        vo.setPfDate(pfDate);
-                        vo.setTdyt(excel.get("土地用途"));
-                        vo.setYdArea(parseFloatField(excel.get("用地面积"), "用地报批-用地面积"));
-                        vo.setYdUnit(validateAreaUnit(excel.get("用地面积"), excel.get("用地面积单位"), "用地面积", "用地面积单位"));
-                        vo.setZsArea(parseFloatField(excel.get("征收面积"), "用地报批-征收面积"));
-                        vo.setZsUnit(validateAreaUnit(excel.get("征收面积"), excel.get("征收面积单位"), "征收面积", "征收面积单位"));
-                        String hasZz = excel.get("是否完成征转");
-                        if (StringUtils.isNotBlank(hasZz)) {
-                            if ("是".equals(hasZz)) hasZz = "已报已征";
-                            else if ("否".equals(hasZz)) hasZz = "未报未征";
-                            else hasZz = "";
-                        }
-                        vo.setHasZz(hasZz);
-                        vo.setBpDate(excel.get("报批日期"));
-                        String nodeId = ydbpService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "01用地报批阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 用地预审与选址 (仅单独选址) -----
-            if (projectVo.getProjectType() == 1 && CollectionUtils.isNotEmpty(ydysyxzList) && i < ydysyxzList.size()) {
-                Map<String, String> excel = ydysyxzList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String zzwh = excel.get("证书文号");
-                    String fzDate = excel.get("发证日期");
-                    if (StringUtils.isNotBlank(zzwh) && StringUtils.isNotBlank(fzDate) && isValidChineseDate(fzDate)) {
-                        fzDate = parseChineseDate(fzDate);
-                        YdysyxzVo vo = new YdysyxzVo();
-                        vo.setProjectId(projectId);
-                        vo.setZzwh(zzwh);
-                        vo.setFzDate(fzDate);
-                        vo.setJsdd(excel.get("建设地点"));
-                        vo.setArea(parseFloatField(excel.get("拟用地面积"), "用地预审与选址-拟用地面积"));
-                        vo.setAreaUnit(validateAreaUnit(excel.get("拟用地面积"), excel.get("面积单位"), "拟用地面积", "面积单位"));
-                        String hasZz = excel.get("是否完成征转");
-                        if (StringUtils.isNotBlank(hasZz)) {
-                            if ("是".equals(hasZz)) hasZz = "已报已征";
-                            else if ("否".equals(hasZz)) hasZz = "未报未征";
-                            else hasZz = "";
-                        }
-                        vo.setHasZz(hasZz);
-                        vo.setXmjsyj(excel.get("项目建设依据"));
-                        String nodeId = ydysyxzService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "00用地预审与选址阶段", null);
-                        }
-                    }
-                }
-            }
-
-            // ----- 规划条件与用地红线出具 (仅批次报批) -----
-            if (projectVo.getProjectType() == 2 && CollectionUtils.isNotEmpty(tjyydhxList) && i < tjyydhxList.size()) {
-                Map<String, String> excel = tjyydhxList.get(i);
-                if (!isAllFieldsEmpty(excel)) {
-                    String cjbh = excel.get("出具编号");
-                    String cjDate = excel.get("出具日期");
-                    if (StringUtils.isNotBlank(cjbh) && StringUtils.isNotBlank(cjDate) && isValidChineseDate(cjDate)) {
-                        cjDate = parseChineseDate(cjDate);
-                        TjyydhxVo vo = new TjyydhxVo();
-                        vo.setProjectId(projectId);
-                        vo.setCjbh(cjbh);
-                        vo.setCjDate(cjDate);
-                        vo.setDkbm(excel.get("地块编码"));
-                        vo.setArea(parseFloatField(excel.get("用地面积"), "规划条件与用地红线出具-用地面积"));
-                        vo.setAreaUnit(validateAreaUnit(excel.get("用地面积"), excel.get("面积单位"), "用地面积", "面积单位"));
-                        vo.setYdxz(excel.get("用地性质"));
-                        vo.setYdwz(excel.get("用地位置"));
-                        String nodeId = tjyydhxService.add(vo);
-                        if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "09规划条件与用地红线出具阶段", null);
-                        }
-                    }
-                }
-            }
-
-            i++;
-        }
-        return "successs";
-    }
-
-
     //附件数据处理  -- 数据治理文件名
-    public void dealCurrentNodeAttachment(String projectId, String nodeId, String projectFileName, String nodeFileName,String gdType) {
+    public void dealCurrentNodeAttachmentV3(String projectId, String nodeId, String projectFileName,String outPath, String nodeFileName,String gdType) {
         if (StringUtils.isBlank(projectFileName)) {
             log.info("数据治理文件名称--附件材料:{}", projectFileName);
             return;
         }
-
-//        List<String> aa = List.of(
-//                "2020-3 赣江新区直管区国药南大道以东、规划路以南、国药支路以西、慈菇东路以北(SHD02-07)",
-//                "2020-4 赣江新区直管区欧阳修支路以东、欧阳修路以南、储备用地以西、慈菇东路以北(SHD04-05-01)",
-//                "2020-12 赣江新区直管区济生南路以东、欧阳修路以南、储备用地以西、慈菇东路以北SHD06-03"
-//        );
-//
-//        if(aa.contains(projectFileName)){
-//            int a1=100;
-//            int b2=a1+100;
-//            log.info("附件材料处理逻辑:{},{}", projectFileName,b2);
-//        }
-
         //这里先初始化项目
-        nodeAttachmentService.addDefaultAttachment(projectId, nodeId,gdType);
+        //nodeAttachmentService.addDefaultAttachment(projectId, nodeId,gdType);
         String fullFilePath ="";
-        String innerDirName = getDealFilePath("",projectFileName);//找到当前文件
-        if (StringUtils.isNotBlank(innerDirName)) {
-            fullFilePath = copyFileToDirectory(rootPathAll +"\\" + innerDirName + "\\" + projectFileName, targectDir + "\\" + projectFileName, nodeFileName);
-        }
-        if (StringUtils.isNotBlank(fullFilePath)) {
-            //这里进行文件关联
-            String nodeAttachmentId = associationFile(fullFilePath, projectId, nodeId);
-            log.info("关于项目{}的土地供应环节,文件{}关联结果{}", projectId, nodeFileName, nodeAttachmentId);
-        }else {
-            log.warn("未找到数据治理文件名称--附件材料:{},请确认文件是否存在于路径{}或{}", projectFileName, rootPathAll);
-        }
-    }
-
-
-
-
 
-
-
-
-    //附件数据处理  -- 数据治理文件名
-    public void dealCurrentNodeAttachmentV3(String projectId, String nodeId, String projectFileName,String outPath, String nodeFileName,String gdType) {
-        if (StringUtils.isBlank(projectFileName)) {
-            log.info("数据治理文件名称--附件材料:{}", projectFileName);
-            return;
+        Path filePath = Paths.get(outPath+"\\" +projectFileName);
+        if (Files.exists(filePath) && Files.isDirectory(filePath)) {
+            fullFilePath = copyFileToDirectory(outPath+"\\" +projectFileName, targectDir + "\\" + projectFileName, nodeFileName);
+        }else {
+            //当前目录存在子目录情况
+            String innerDirName = getDealFilePath(outPath,projectFileName);//找到当前文件
+            if (StringUtils.isNotBlank(innerDirName)) {
+                fullFilePath = copyFileToDirectory(outPath +"\\" + innerDirName + "\\" + projectFileName, targectDir + "\\" + projectFileName, nodeFileName);
+            }
         }
 
-//        List<String> aa = List.of(
-//                "2020-3 赣江新区直管区国药南大道以东、规划路以南、国药支路以西、慈菇东路以北(SHD02-07)",
-//                "2020-4 赣江新区直管区欧阳修支路以东、欧阳修路以南、储备用地以西、慈菇东路以北(SHD04-05-01)",
-//                "2020-12 赣江新区直管区济生南路以东、欧阳修路以南、储备用地以西、慈菇东路以北SHD06-03"
-//        );
-//
-//        if(aa.contains(projectFileName)){
-//            int a1=100;
-//            int b2=a1+100;
-//            log.info("附件材料处理逻辑:{},{}", projectFileName,b2);
-//        }
-
-        //这里先初始化项目
-        nodeAttachmentService.addDefaultAttachment(projectId, nodeId,gdType);
-        String fullFilePath ="";
-        String innerDirName = getDealFilePath(outPath,projectFileName);//找到当前文件
-        if (StringUtils.isNotBlank(innerDirName)) {
-            fullFilePath = copyFileToDirectory(rootPathAll +"\\" + innerDirName + "\\" + projectFileName, targectDir + "\\" + projectFileName, nodeFileName);
-        }
         if (StringUtils.isNotBlank(fullFilePath)) {
-
             //这里进行文件关联
             String nodeAttachmentId = associationFile(fullFilePath, projectId, nodeId);
             log.info("关于项目{}的土地供应环节,文件{}关联结果{}", projectId, nodeFileName, nodeAttachmentId);
@@ -1530,6 +1136,7 @@ public class DealExcelServiceImpl {
 
 
 
+
     //附件数据处理  -- 数据治理文件名
     public void dealCurrentBatchNodeAttachment(String nodeId, String projectFileName, String nodeFileName,int count) {
         if (StringUtils.isBlank(projectFileName)) {
@@ -1553,23 +1160,16 @@ public class DealExcelServiceImpl {
 
     public  String getDealFilePath(String outPath,String projectFileName) {
         String fullFilePath = "";
-        if(StringUtils.isBlank(outPath)){
-            return "";
-        }
-
         try {
             for(String pathName : Constant.NODE_ATTACHMENT_NAME_LIST){
-                //Path filePath = Paths.get(rootPathAll + "\\" +pathName+ "\\" + projectFileName);
                 Path filePath = Paths.get(outPath + "\\" +pathName+ "\\" + projectFileName);
-
-
                 if (Files.exists(filePath) && Files.isDirectory(filePath)) {
                     fullFilePath =pathName;
                     break;
                 }
             }
         } catch (Exception e) {
-            //e.printStackTrace();
+            e.printStackTrace();
             log.warn("查找文件{}时发生异常: {}", projectFileName, e.getMessage());
             return "";
         }
@@ -1578,6 +1178,8 @@ public class DealExcelServiceImpl {
 
 
 
+
+
     //矢量数据处理  -- 数据治理文件名
     public void dealCurrentNodeGeom(String dzjgh, String nodeId) {
         if (StringUtils.isBlank(dzjgh)) {
@@ -1668,7 +1270,7 @@ public class DealExcelServiceImpl {
      */
     public static String writeToLog(String fileName, String msg) {
         // 转换为节点
-        String filePath = Constant.BDC_FILE_DOWN_PATH + "\\log\\" + fileName;
+        String filePath = Constant.IMPORT_EXCEL_DATA_FILE_PATH + "\\log\\" + fileName;
         //todo 完善当前方法,功能:1.将msg写入到filePath指定的文件中;2.如果文件不存在则创建;3.每次写入都追加到文件末尾;4.写入完成后返回写入结果(成功/失败)
         // 文件就是一个文本文件,每次写入一行日志,格式为:时间戳 + msg
         try {