Procházet zdrojové kódy

报批数据入库v2

chenendian před 1 dnem
rodič
revize
c74c647658

+ 10 - 218
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/common/Constant.java

@@ -105,232 +105,24 @@ public class Constant {
     );
 
 
-    public static final List<String> BDCDYH_LIST = new ArrayList<>(Arrays.asList(
-            "360122009006GB00002W00000000",
-            "360122009006GB00159W00000000",
-            "360122009006GB00160W00000000",
-            "360122009006GB00161W00000000",
-            "360122009006GB60008W00000000",
-            "360122009006GB60107W00000000",
-            "360122009006GB60168W00000000",
-            "360122009006GB60169W00000000",
-            "360122009006GB60170W00000000",
-            "360122009006GB60171W00000000",
-            "360122009006GB60182W00000000",
-            "360122009006GB60183W00000000",
-            "360122009006GB60190W00000000",
-            "360122009006GB60242W00000000",
-            "360122009006GB60243W00000000",
-            "360122009006GB60273W00000000",
-            "360122009015GB00006W00000000",
-            "360122009015GB00013W00000000",
-            "360122009015GB00015W00000000",
-            "360122009015GB00016W00000000",
-            "360122009015GB60002W00000000",
-            "360122009015GB60053W00000000",
-            "360122009015GB60056W00000000",
-            "360122009015GB60057W00000000",
-            "360122009015GB60058W00000000",
-            "360122009015GB60059W00000000",
-            "360122009015GB60060W00000000",
-            "360122011002GB00004W00000000",
-            "360122011002GB00008W00000000",
-            "360122011002GB00013W00000000",
-            "360122011002GB00029W00000000",
-            "360122011002GB00030W00000000",
-            "360122011002GB00031W00000000",
-            "360122011002GB00308W00000000",
-            "360122011002GB60006W00000000",
-            "360122011002GB60007W00000000",
-            "360122011002GB60012W00000000",
-            "360122011002GB60013W00000000",
-            "360122011003GB00077W00000000",
-            "360122011003GB00246W00000000",
-            "360122011003GB00332W00000000",
-            "360122011003GB00333W00000000",
-            "360122011003GB00334W00000000",
-            "360122011003GB00335W00000000",
-            "360122011003GB00486W00000000",
-            "360122011004GB00381W00000000",
-            "360122011004GB00383W00000000",
-            "360122011004GB00389W00000000",
-            "360122011004GB00391W00000000",
-            "360122011004GB00392W00000000",
-            "360122011004GB00393W00000000",
-            "360122011004GB00394W00000000",
-            "360122011004GB00395W00000000",
-            "360122011004GB00418W00000000",
-            "360122011004GB00419W00000000",
-            "360122011004GB00533W00000000",
-            "360122011004GB00534W00000000",
-            "360122011005GB00002W00000000",
-            "360122011005GB00003W00000000",
-            "360122011005GB60002W00000000",
-            "360122011005GB60003W00000000",
-            "360122011005GB60005W00000000",
-            "360122011005GB60006W00000000",
-            "360122011006GB00001W00000000",
-            "360122011006GB00002W00000000",
-            "360122011006GB00007W00000000",
-            "360122011006GB00008W00000000",
-            "360122011006GB00009W00000000",
-            "360122011006GB00319W00000000",
-            "360122011006GB00320W00000000",
-            "360122011007GB00002W00000000",
-            "360122011007GB00005W00000000",
-            "360122011007GB00009W00000000",
-            "360122011007GB00016W00000000",
-            "360122011007GB00310W00000000",
-            "360122011007GB00324W00000000",
-            "360122011007GB00333W00000000",
-            "360122011007GB00336W00000000",
-            "360122011007GB00337W00000000",
-            "360122011007GB00338W00000000",
-            "360122011007GB00340W00000000",
-            "360122011007GB00341W00000000",
-            "360122011009GB00334W00000000",
-            "360122011009GB00335W00000000",
-            "360122011010GB00018W00000000",
-            "360122011010GB00021W00000000",
-            "360122011010GB00308W00000000",
-            "360122011010GB00312W00000000",
-            "360122011010GB00318W00000000",
-            "360122011010GB00319W00000000",
-            "360122011010GB60011W00000000",
-            "360122013029GB60001W00000000",
-            "360122014003GB00011W00000000",
-            "360122014003GB00045W00000000",
-            "360122014003GB00115W00000000",
-            "360122014003GB60001W00000000",
-            "360122014003GB60002W00000000",
-            "360122014003GB60003W00000000",
-            "360122014003GB60014W00000000",
-            "360122014003GB62229W00000000",
-            "360122014003GB62230W00000000",
-            "360122014003GB62231W00000000",
-            "360122014003GB62232W00000000",
-            "360122014003GB62233W00000000",
-            "360122014003GB62234W00000000",
-            "360122014003GB62235W00000000",
-            "360122014003GB62236W00000000",
-            "360122014003GB62237W00000000",
-            "360122014003GB62238W00000000",
-            "360122014003GB62243W00000000",
-            "360122014003GB62270W00000000",
-            "360122014003GB62277W00000000",
-            "360122014003GB62280W00000000",
-            "360122014003GB62302W00000000",
-            "360122014003GB62305W00000000",
-            "360122014003GB62306W00000000",
-            "360122014003GB62307W00000000",
-            "360122014003GB62309W00000000",
-            "360122014003GB62310W00000000",
-            "360122014003GB62317W00000000",
-            "360122014003GB62328W00000000",
-            "360122014003GB62340W00000000",
-            "360122014003GB62341W00000000",
-            "360122014003GB62360W00000000",
-            "360122014003GB62361W00000000",
-            "360122014003GB62362W00000000",
-            "360122014003GB62367W00000000",
-            "360122014003GB62368W00000000",
-            "360122014004GB00071W00000000",
-            "360122014004GB00072W00000000",
-            "360122014004GB00073W00000000",
-            "360122014004GB00074W00000000",
-            "360122014004GB00075W00000000",
-            "360122014004GB00076W00000000",
-            "360122014004GB00077W00000000",
-            "360122014004GB00078W00000000",
-            "360122014004GB00079W00000000",
-            "360122014004GB00081W00000000",
-            "360122014004GB00083W00000000",
-            "360122014004GB00084W00000000",
-            "360122014004GB00085W00000000",
-            "360122014004GB00086W00000000",
-            "360122014004GB00087W00000000",
-            "360122014004GB00088W00000000",
-            "360122014004GB00089W00000000",
-            "360122014004GB00090W00000000",
-            "360122014004GB00092W00000000",
-            "360122014004GB00094W00000000",
-            "360122014004GB00098W00000000",
-            "360122014004GB00099W00000000",
-            "360122014004GB00104W00000000",
-            "360122014004GB00105W00000000",
-            "360122014004GB00106W00000000",
-            "360122014004GB00107W00000000",
-            "360122014004GB00108W00000000",
-            "360122014004GB00109W00000000",
-            "360122014004GB00110W00000000",
-            "360122014004GB00111W00000000",
-            "360122014004GB00113W00000000",
-            "360122014004GB00114W00000000",
-            "360122014004GB00121W00000000",
-            "360122014004GB00128W00000000",
-            "360122014004GB00129W00000000",
-            "360122014004GB60001W00000000",
-            "360122014004GB60006W00000000",
-            "360122014004GB60017W00000000",
-            "360122014004GB60018W00000000",
-            "360122014004GB60024W00000000",
-            "360122014004GB60035W00000000",
-            "360122014005GB00044W00000000",
-            "360122014005GB00046W00000000",
-            "360122014005GB00047W00000000",
-            "360122014005GB00048W00000000",
-            "360122014005GB00050W00000000",
-            "360122014005GB60001W00000000",
-            "360122014005GB60012W00000000",
-            "360122014008GB00050W00000000",
-            "360122015001GB60001W00000000",
-            "360122015001GB60010W00000000",
-            "360122015001GB60011W00000000",
-            "360122015001GB60012W00000000",
-            "360122015001GB60013W00000000",
-            "360122015001GB60014W00000000",
-            "360122015001GB70001W00000000",
-            "360122015001GB70002W00000000",
-            "360122015002GB00001W00000000",
-            "360122015002GB00002W00000000",
-            "360122015002GB00003W00000000",
-            "360122015002GB00005W00000000",
-            "360122015002GB00019W00000000",
-            "360122015002GB00020W00000000",
-            "360122015002GB00021W00000000",
-            "360122015002GB00022W00000000",
-            "360122015002GB00023W00000000",
-            "360122015002GB00024W00000000",
-            "360122015002GB00025W00000000",
-            "360122015003GB00003W00000000",
-            "360122015003GB00004W00000000",
-            "360122015003GB00005W00000000",
-            "360122020005GB00137W00000000",
-            "360122999000GB60002W00000000",
-            "360425001012GB00027W00000000",
-            "360425005005GB60001W00000000",
-            "360425005005GB60003W00000000",
-            "360425005005GB60005W00000000",
-            "360425005005GB60006W00000000",
-            "360425005005GB60007W00000000",
-            "360425005005GB60008W00000000",
-            "360425005005GB60009W00000000",
-            "360425005005GB60014W00000000",
-            "360425005005GB60015W00000000",
-            "360425005005GB60017W00000000"
-    ));
-
-
+    public static final List<String> BDCDYH_LIST = new ArrayList<>(Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"));
 
 
     //项目excel导入路径
     //public static final String  IMPORT_EXCEL_DATA_FILE_PATH = "D:\\one_code_manage\\project_excel_data";
-    public static final String  IMPORT_EXCEL_DATA_FILE_PATH = "D:\\tmp\\one_code_manage\\excel_deom";
+    //public static final String  IMPORT_EXCEL_DATA_FILE_PATH = "D:\\tmp\\one_code_manage\\excel_deom";
+    public static final String  IMPORT_EXCEL_DATA_FILE_PATH = "D:\\tmp\\one_code_manage\\excel_full_deal";
 
-    public static final String  FILE_UPLOAD_PATH = "/home/siwei/uploadPath/2026/06/07";
+
+    public static final String  FILE_UPLOAD_PATH = "/home/siwei/uploadPath/2026/09/32";
 
     public static final String  GG = "GONGGAI";
     public static final String  BDC = "BUDONGCHAN";
     public static final String  BDC_FILE_DOWN_PATH = "C:\\Users\\Administrator\\Desktop\\11\\excel_out\\output\\02";
 
+
+    public static final String BATCH_NODE_ATTACHMENT_NAME = "D:\\tmp\\one_code_manage\\excel_full_deal\\附件材料-批次报批用地";
+
+
+
 }

+ 24 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/third/DealExcelController.java

@@ -33,6 +33,30 @@ public class DealExcelController extends BaseController {
     @Autowired
     DealExcelServiceImpl  dealExcelService;
 
+
+
+    /**
+     * 处理excel数据(按合并列头分组读取)  v3
+     */
+    @GetMapping("excelDeal_v3/{fileName}")
+    public R<Map<String, List<Map<String,String>>>> excelDeal_v3(@PathVariable String fileName) {
+        try {
+            String uploadFile = Constant.IMPORT_EXCEL_DATA_FILE_PATH+"\\"+fileName;
+            Path filePath = Paths.get(uploadFile);
+            File file = filePath.toFile();
+            Map<String, List<Map<String, String>>> dataMap = readExcelWithMergedHeaders(file);
+
+            String res = dealExcelService.addExcelDataToDb_V3(dataMap);
+            logger.info("新增数据结果{}",res);
+
+            return R.ok(dataMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail(e.getMessage());
+        }
+    }
+
+
     /**
      * 不动产数据下载
      */

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/ProjectMapper.java

@@ -31,6 +31,10 @@ public interface ProjectMapper {
      */
     List<Project> getList(ProjectFilterVo projectFilterVo);
 
+
+    List<Project> getByConditionList(@Param("name") String name ,@Param("code") String code ,@Param("company") String company);
+
+
     /**
      * 获取不分页项目列表
      */

+ 229 - 10
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/DealExcelServiceImpl.java

@@ -6,15 +6,13 @@ import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.alibaba.fastjson2.JSONWriter;
 import com.siwei.apply.common.Constant;
-import com.siwei.apply.domain.LandType;
-import com.siwei.apply.domain.NodeLand;
-import com.siwei.apply.domain.ProjectWorkflow;
-import com.siwei.apply.domain.YdbpData;
+import com.siwei.apply.domain.*;
 import com.siwei.apply.domain.res.TdgyRes;
 import com.siwei.apply.domain.vo.*;
 import com.siwei.apply.enums.AloneWorkFlowEnum;
 import com.siwei.apply.mapper.CadastreFileMapper;
 import com.siwei.apply.mapper.LandTypeMapper;
+import com.siwei.apply.mapper.ProjectMapper;
 import com.siwei.apply.service.*;
 import com.siwei.apply.utils.ServiceFileUtil;
 import com.siwei.apply.utils.ServiceUtil;
@@ -112,6 +110,181 @@ public class DealExcelServiceImpl {
     @Autowired
     private LandOneCodeService landOneCodeService;
 
+    @Autowired
+    private ProjectMapper projectMapper;
+
+
+    /**
+     * 添加excel数据到数据库
+     *
+     * @param dataMap
+     * @return
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public String addExcelDataToDb_V3(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;
+        int j = 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 = StringUtils.isNotBlank(xm.get("项目名称"))? xm.get("项目名称"):"";
+            projectVo.setName(projectName);
+
+            String code = StringUtils.isNotBlank(xm.get("项目代码"))? xm.get("项目代码"):"";
+            projectVo.setCode(code);
+
+            String company = StringUtils.isNotBlank(xm.get("建设单位"))? xm.get("建设单位"):"";
+            projectVo.setCompany(company);
+
+            if(StringUtils.isBlank(projectName)||StringUtils.isBlank(code)||StringUtils.isBlank(company)){
+                log.error("项目名称、项目代码、建设单位不能为空,项目名称:{},项目代码:{},建设单位:{}", projectName, code, company);
+                continue;
+            }
+
+            List<Project> proList =  projectMapper.getByConditionList(projectName, code, company);
+            if(CollectionUtils.isNotEmpty(proList)){
+                log.info("找到项目: name:{},code:{},company:{},条数:{}", projectName, code, company,proList.size());
+            }else {
+                log.info("新增项目: name:{},code:{},company:{},条数:{}", projectName, code, company,++j);
+            }
+
+
+            //String projectId = projectService.add(projectVo);
+            // -----------------第一部分增加项目结束-------------------------------
+
+
+            // -----------------第二部分增加土地供应环节开始-------------------------------
+//            if (CollectionUtils.isNotEmpty(tdgyList) && false) {
+//                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());
+//                }
+//
+//            }
+            // -----------------第二部分增加项目关联的(土地供应)环节结束-------------------------------
+            i++;
+        }
+
+
+
+        return "successs";
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
     /**
      * 下载相关的不动产材料附件
@@ -320,21 +493,29 @@ public class DealExcelServiceImpl {
 
 
 
-
     /**
      * 报批数据导入
      *
      * @param dataMap
      * @return
      */
+    @Transactional
     public String addBatchDateExcelDataToDb(Map<String, List<Map<String, String>>> dataMap) {
         List<Map<String, String>> batchList = dataMap.get("新建(用地报批(批次)数据集成)");
+        int count = 0;
         for (Map<String, String> batch : batchList) {
             String projectName = batch.get("项目名称");
             String reportStatus = batch.get("报征状态");
             String batchApprovalNum = batch.get("批复文号");
             String reportDate = batch.get("报批日期");
             String approvalDate = batch.get("批复日期");
+
+            String area = batch.get("用地面积");
+            String unit = batch.get("用地面积单位");
+
+            String zs_area = batch.get("征收面积");
+            String zs_unit = batch.get("征收面积单位");
+
             approvalDate = this.parseChineseDate(approvalDate);
 
             //todo 这里继续完善数据添加逻辑,目前先打印日志
@@ -345,15 +526,34 @@ public class DealExcelServiceImpl {
             }
 
             YdbpDataVo ydbpDataVo = new YdbpDataVo();
-            ydbpDataVo.setName("bp2_"+projectName);
-            ydbpDataVo.setPfDate(approvalDate);
+            ydbpDataVo.setName("bp3_"+projectName);
+            ydbpDataVo.setHasZz(reportStatus);
             ydbpDataVo.setPfwh(batchApprovalNum);
 
+            if(StringUtils.isNotBlank(zs_area)){
+                ydbpDataVo.setYdArea(Float.parseFloat(area));
+            }
+
+            ydbpDataVo.setYdUnit(unit);
+            if(StringUtils.isNotBlank(zs_area)){
+                ydbpDataVo.setZsArea(Float.parseFloat(zs_area));
+            }
+
+            ydbpDataVo.setZsUnit(zs_unit);
+            ydbpDataVo.setBpDate(reportDate);
+            ydbpDataVo.setPfDate(approvalDate);
+
+
             String nodeId = ydbpDataService.add(ydbpDataVo);
             ydbpDataService.updateHasOnchain(nodeId,true);
 
-            String shpFileName = projectName + ".zip";
+            count++;
+            //附件材料处理  -- 数据治理文件名
+            String nodeFileName = "02用地报批阶段";
+            dealCurrentBatchNodeAttachment(nodeId, projectName, nodeFileName,count);
+
             //数据治理文件名
+            String shpFileName = projectName + ".zip";
             if (StringUtils.isNotBlank(projectName)) {
                 Path filePath = Paths.get(rootPathZip + "\\" + shpFileName);
                 if (Files.exists(filePath) && !Files.isDirectory(filePath)) {
@@ -373,8 +573,6 @@ public class DealExcelServiceImpl {
     }
 
 
-
-
     /**
      * 检查excel数据到数据库
      *
@@ -1193,7 +1391,28 @@ public class DealExcelServiceImpl {
         }else {
             log.warn("未找到数据治理文件名称--附件材料:{},请确认文件是否存在于路径{}或{}", projectFileName, rootPath2019, rootPath2020);
         }
+    }
+
 
+
+    //附件数据处理  -- 数据治理文件名
+    public void dealCurrentBatchNodeAttachment(String nodeId, String projectFileName, String nodeFileName,int count) {
+        if (StringUtils.isBlank(projectFileName)) {
+            log.info("数据治理文件名称--附件材料:{}", projectFileName);
+            return;
+        }
+        String sourceDirPath = Constant.BATCH_NODE_ATTACHMENT_NAME  + "\\" + projectFileName;
+        Path filePath = Paths.get(sourceDirPath);
+        if (Files.exists(filePath) && Files.isDirectory(filePath)) {
+            String fullFilePath = copyFileToDirectory(sourceDirPath, targectDir + "\\" + projectFileName+"f00"+count, nodeFileName);
+            if (StringUtils.isNotBlank(fullFilePath)) {
+                //这里进行文件关联
+                String nodeAttachmentId = associationFile(fullFilePath, "", nodeId);
+                log.info("关于项目{}的土地供应环节,文件{}关联结果{}", "", nodeFileName, nodeAttachmentId);
+            }else {
+                log.warn("未找到数据治理文件名称--附件材料:{},请确认文件是否存在于路径{}", projectFileName, Constant.BATCH_NODE_ATTACHMENT_NAME);
+            }
+        }
     }
 
 

+ 17 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/ProjectMapper.xml

@@ -43,6 +43,23 @@
         where t_project.id = #{id}
     </select>
 
+    <select id="getByConditionList"  resultMap="projectMap">
+        SELECT * FROM t_project
+        <where>
+            <if test="name != null and name != ''">
+                OR name = #{name}
+            </if>
+            <if test="code != null and code != ''">
+                OR code = #{code}
+            </if>
+            <if test="company != null and company != ''">
+                OR company = #{company}
+            </if>
+        </where>
+    </select>
+
+
+
     <select id="getList" parameterType="com.siwei.apply.domain.vo.ProjectFilterVo" resultMap="projectMap">
         SELECT *
         FROM t_project