Kaynağa Gözat

不动产附件下载入库兼容

chenendian 1 gün önce
ebeveyn
işleme
9eb17fd21a

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

@@ -102,12 +102,15 @@ public class Constant {
             "DX2026"
     );
 
-
     //项目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  FILE_UPLOAD_PATH = "/home/siwei/uploadPath/2026/06/07";
 
+    public static final String  GG = "GONGGAI";
+    public static final String  BDC = "BUDONGCHAN";
+
+
 
 }

+ 8 - 8
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/third/OfferDataController.java

@@ -1,6 +1,6 @@
 package com.siwei.apply.controller.third;
 
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.siwei.apply.domain.NodeAttachment;
@@ -60,14 +60,14 @@ public class OfferDataController extends BaseController {
     public String landSupplyList(@RequestBody String body, HttpServletRequest request) throws JsonProcessingException {
         try {
             //String timestamp = request.getHeader("timestamp");
-            log.info("登簿响应原文: {}" , body);
+            log.info("项目列表入参原文: {}" , body);
             //解析为明文
             String plain = decryptByPrivateKey(ServiceUtil.THIRD_API_PRIVATE_KEY, body);
             log.info("登簿响应解密明文: {}" , plain);
 
             List<Map<String, Object>> list = new ArrayList<>();
             if(StringUtils.isNotBlank(plain)){
-                ThirdProjectParamVo paramVo = JSON.parseObject(JSON.toJSONString(plain), ThirdProjectParamVo.class);
+                ThirdProjectParamVo paramVo = JSON.parseObject(plain, ThirdProjectParamVo.class);
                 List<Map<String, Object>> resultList = offerDataService.landSupplyAndProjectList(paramVo);
                 list.addAll(resultList);
             }
@@ -101,7 +101,7 @@ public class OfferDataController extends BaseController {
             log.info("登簿响应解密明文: {}" , plain);
             Map<String, Object> map = new HashMap<>();
             if(StringUtils.isNotBlank(plain)){
-                ThirdRecordStatusParamVo paramVo = JSON.parseObject(JSON.toJSONString(plain), ThirdRecordStatusParamVo.class);
+                ThirdRecordStatusParamVo paramVo = JSON.parseObject(plain, ThirdRecordStatusParamVo.class);
                 Map<String, Object> addMap = offerDataService.addRecordStatusData(paramVo);
                 map.put("id", addMap.get("id"));
             }
@@ -109,7 +109,7 @@ public class OfferDataController extends BaseController {
             String json = mapper.writeValueAsString(R.ok(map));
             return encryptByPublicKey(ServiceUtil.THIRD_API_PUBLIC_KEY, json);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("登簿数据接收异常", e);
             ObjectMapper mapper = new ObjectMapper();
             String json = mapper.writeValueAsString(R.ok("接口调用失败:"+e.getMessage()));
             return encryptByPublicKey(ServiceUtil.THIRD_API_PUBLIC_KEY, json);
@@ -127,15 +127,15 @@ public class OfferDataController extends BaseController {
     public String attachmentList(@RequestBody String body,HttpServletRequest request) throws JsonProcessingException {
         try {
             //String timestamp = request.getHeader("timestamp");
-            log.info("登簿响应原文: {}" , body);
+            log.info("前序附件入参原文: {}" , body);
             //解析为明文
             String plain = decryptByPrivateKey(ServiceUtil.THIRD_API_PRIVATE_KEY, body);
-            log.info("登簿响应解密明文: {}" , plain);
+            log.info("前序附件入参解密明文: {}" , plain);
 
             ObjectMapper mapper = new ObjectMapper();
             NodeAttachment nodeAttachment = null;
             if(StringUtils.isNotBlank(plain)){
-                AttachmentParamVo paramVo = JSON.parseObject(JSON.toJSONString(plain), AttachmentParamVo.class);
+                AttachmentParamVo paramVo = JSON.parseObject(plain, AttachmentParamVo.class);
                 String projectId = paramVo.getYwbh();
                 String preImmobileCode = paramVo.getYfbdcdyh();
                 String dqjd = paramVo.getDqjd();

+ 10 - 12
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/third/TakeDataController.java

@@ -44,14 +44,18 @@ public class TakeDataController extends BaseController {
 
 
 
-
     /**
      * 国有建设用地使用权首次登记
      * 不动产土地登记完成后入参使用
      */
     @PostMapping("/third/landFirstRegistration")
-    public R<Map<String, Object>> landFirstRegistration(@RequestBody ThirdRecordStatusParamVo body) {
+    public R<Map<String, Object>> testLandFirstRegistration(@RequestBody ThirdRecordStatusParamVo body) {
         try {
+            //这里入参,登簿数据
+            body = new ThirdRecordStatusParamVo();
+            body.setYfbdcdyh("360122014004GB60018");
+            body.setYwlx("1");
+            body.setYwh("20251023145611");
             Map<String, Object> map = takeDataService.remoteLandFirstRegistration(body);
             map.put("id", map.get("id"));
             return R.ok(map);
@@ -69,8 +73,11 @@ public class TakeDataController extends BaseController {
      * 不动产土地登记完成后入参使用
      */
     @PostMapping("/third/houseFirstRegistration")
-    public R<Map<String, Object>> houseFirstRegistration(@RequestBody ThirdRecordStatusParamVo  body) {
+    public R<Map<String, Object>> testHouseFirstRegistration(@RequestBody ThirdRecordStatusParamVo  body) {
         try {
+            //这里入参,登簿数据
+
+
             Map<String, Object> map = takeDataService.remoteHouseFirstRegistration(body);
             map.put("id", map.get("id"));
             return R.ok(map);
@@ -89,13 +96,4 @@ public class TakeDataController extends BaseController {
 
 
 
-
-
-
-
-
-
-
-
-
 }

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

@@ -129,5 +129,5 @@ public class LandFirstParamVo {
      * 必选: 是
      * 业务类型: 业务
      */
-    private Map<String, Object> attachment;
+    private List<Map<String, Object>> attachment;
 }

+ 4 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/NodeAttachmentService.java

@@ -66,4 +66,8 @@ public interface NodeAttachmentService {
 
     Map<String, Object>  getDefaultAttachment(String tableName) ;
 
+
+    String getThirdAttachment(String projectId, String nodeId,String nodeName,List<Map<String, Object>> attachmentList);
+
+
     }

+ 78 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/impl/NodeAttachmentImpl.java

@@ -1,5 +1,6 @@
 package com.siwei.apply.service.impl;
 
+import com.siwei.apply.common.Constant;
 import com.siwei.apply.common.UnifyAttachmentEnum;
 import com.siwei.apply.domain.*;
 import com.siwei.apply.domain.res.TdgyRes;
@@ -23,6 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
@@ -135,7 +137,7 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
      * @return
      */
     @Override
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public String processFileAndSave(String filePath,String nodeTableName,String gdType) {
         try {
             if (filePath == null || filePath.trim().isEmpty()) {
@@ -678,7 +680,6 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
                             }
                         }
                     }
-
                 } catch (IOException e) {
                     throw new ServiceException("全文检索附件材料--保存失败");
                 }
@@ -712,5 +713,80 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
 
 
 
+    /**
+     * 1.获取不动产附件
+     * 2.进行url处理。
+     * 3.创建目录,根据名称进行下载
+     * 4.把下载的附件进行入库与当前节关联
+     */
+    @Override
+    public String getThirdAttachment(String projectId, String nodeId,String nodeName,List<Map<String, Object>> attachmentList) {
+        String fileDownLoadPath = "";
+        try {
+            //这里增加一个方法,把文件下载下来
+            String unsafeChars = "[<>:\"/\\\\|?*]";
+            if (CollectionUtils.isNotEmpty(attachmentList)) {
+                String[] subDirectoryNameArr = attachmentList.stream().map(s->s.get("dir_name").toString()).distinct().toArray(String[]::new);
+                String[] subDirectoryNameNew = Arrays.stream(subDirectoryNameArr)
+                        .map(name -> name.replaceAll(unsafeChars, "_")).toArray(String[]::new);
+
+                //重新创建子目录
+                fileDownLoadPath = ServiceFileUtil.createMultipartDirectory(nodeName,subDirectoryNameNew);
+                for (Map<String, Object> attachment : attachmentList) {
+
+                    String url = Optional.ofNullable(attachment.getOrDefault("path", attachment.get("PATH")))
+                            .map(String::valueOf)
+                            .orElse("");
+
+
+                    if(StringUtils.isBlank(url)){ //这里避免空值造成数据无法传输
+                        continue;
+                    }
+                    //todo 这里需要进行url替换转
+                    String baseUrl = ServiceUtil.THIRD_API_DOMAIN+"/estate";
+                    String otherDomian = "http://172.16.6.23";
+                    url = StringUtils.replace(url,otherDomian,baseUrl);
+                    //子目录路径
+                    String directoryName = Optional.ofNullable(attachment.getOrDefault("dir_name", attachment.get("DIR_NAME")))
+                            .map(String::valueOf)
+                            .orElse("");
+                    //去掉特殊字符
+                    directoryName = directoryName.replaceAll(unsafeChars,"_");
+                    String fileName = Optional.ofNullable(attachment.getOrDefault("file_name", attachment.get("FILE_NAME")))
+                            .map(String::valueOf)
+                            .orElse("");
+
+                    String subDownLoadFilePath = fileDownLoadPath + "/" + directoryName;
+
+                    //todo 这里不需要try catch 如果下载不了,不进行入库,可以便于查找问题
+                    try {
+                        ServiceFileUtil.downloadFile(url,fileName, subDownLoadFilePath,Constant.BDC);
+                    }catch (IOException e){
+                        logger.error(e.getMessage(),e);
+                    }
+                }
+            }
+
+            String nodeAttachmentId = this.processFileAndSave(fileDownLoadPath, null, null);
+            boolean success = this.updateNodeId(nodeAttachmentId, nodeId);
+            logger.info("附件材料下载并关联入库成功:环节id:{}-项目id:{}",nodeId, projectId);
+            this.modifyAttachmentInfo(projectId, nodeId, nodeAttachmentId);
+            return nodeAttachmentId;
+        } catch (Exception e) {
+            logger.error("处理文件异常", e);
+        }
+
+        return "";
+    }
+
+
+
+
+
+
+
+
+
+
 
 }

+ 81 - 46
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/TakeDataServiceImpl.java

@@ -1,19 +1,27 @@
 package com.siwei.apply.service.third.impl;
 
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
 import com.siwei.apply.domain.Project;
+import com.siwei.apply.domain.ProjectImmobileCode;
 import com.siwei.apply.domain.ProjectWorkflow;
 import com.siwei.apply.domain.res.GyjsydscdjRes;
 import com.siwei.apply.domain.res.GyjsydscdjSinglRes;
 import com.siwei.apply.domain.vo.*;
 import com.siwei.apply.enums.AloneWorkFlowEnum;
 
+import com.siwei.apply.mapper.ProjectImmobileCodeMapper;
 import com.siwei.apply.mapper.ProjectMapper;
 import com.siwei.apply.mapper.ProjectWorkflowMapper;
 import com.siwei.apply.service.GyjsydjfwscdjService;
 import com.siwei.apply.service.GyjsydscdjService;
+import com.siwei.apply.service.NodeAttachmentService;
 import com.siwei.apply.service.NodeLandService;
 import com.siwei.apply.service.third.TakeDataService;
 import com.siwei.apply.utils.HttpClientUtil;
+import com.siwei.apply.utils.ServiceFileUtil;
+import com.siwei.apply.utils.ServiceUtil;
 import com.siwei.common.core.domain.R;
 import com.siwei.common.core.exception.ServiceException;
 import com.siwei.common.core.utils.StringUtils;
@@ -26,10 +34,7 @@ import org.apache.commons.lang3.RandomStringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 获取三方数据服务实现类
@@ -57,6 +62,18 @@ public class TakeDataServiceImpl implements TakeDataService {
     private RemoteSpatialFilesDbService remoteSpatialFilesDbService;
 
 
+    @Autowired
+    private NodeAttachmentService nodeAttachmentService;
+
+    @Autowired
+    private ProjectImmobileCodeMapper projectImmobileCodeMapper;
+
+
+
+    @Autowired
+    DealExcelServiceImpl  dealExcelService;
+
+
     @Override
     public String add(TakeDataAddVo takeDataAddVo) {
         // TODO: Implement add logic
@@ -79,6 +96,7 @@ public class TakeDataServiceImpl implements TakeDataService {
 
     }
 
+
     /**
      * 远程获取第三方最大序号
      * 然后根据规则生成预赋不动产单元号
@@ -168,75 +186,92 @@ public class TakeDataServiceImpl implements TakeDataService {
     /**
      * 远程获取国有建设用地使用权首次登记数据
      * 并且入库
-     *
      * @param paramVo
      * @return
      */
     @Override
     public Map<String, Object> remoteLandFirstRegistration(ThirdRecordStatusParamVo paramVo) {
         String yfbdcdyh = paramVo.getYfbdcdyh();
-        if (org.apache.commons.lang3.StringUtils.isBlank(yfbdcdyh)) {
+        if (StringUtils.isBlank(yfbdcdyh)) {
             throw new ServiceException("预分不动产单元号为空");
         }
         String ywh = paramVo.getYwh();
-        if (org.apache.commons.lang3.StringUtils.isBlank(ywh)) {
+        if (StringUtils.isBlank(ywh)) {
             throw new ServiceException("业务编号为空");
         }
         String ywlx = paramVo.getYwlx();
-        if (org.apache.commons.lang3.StringUtils.isBlank(ywlx)) {
+        if (StringUtils.isBlank(ywlx)) {
             throw new ServiceException("业务类型为空");
         }
+        Map<String, Object> retMap = new HashMap<>();
 
         //todo 这里进行远程请求,获取相关数据,解析后入库
-        LandFirstParamVo body = new LandFirstParamVo(); //这里需要调整
-        List<String> geomsList = body.getGeoms();
-
-
-
-        if (CollectionUtils.isEmpty(geomsList)) {
-            throw new ServiceException("geom信息为空");
-        }
         try {
-            GyjsydscdjVo gyjsydscdjVo = new GyjsydscdjVo();
-            gyjsydscdjVo.setProjectId(body.getXmbh());
-            gyjsydscdjVo.setQlr(body.getQlr());
-            gyjsydscdjVo.setGyqk(body.getGyqk());
-            gyjsydscdjVo.setZl(body.getZl());
-            gyjsydscdjVo.setQllx(body.getQllx());
-            gyjsydscdjVo.setQlxz(body.getQlxz());
-            gyjsydscdjVo.setTdyt(body.getTdyt());
-            if (org.apache.commons.lang3.StringUtils.isNotBlank(body.getTdmj())) {
-                gyjsydscdjVo.setArea(Float.valueOf(body.getTdmj()));
+            Map<String,Object> paramMap = new LinkedHashMap<>();
+            paramMap.put("ywbh","");
+            paramMap.put("yfbdcdyh",yfbdcdyh);
+            String remoteResult = ServiceUtil.getRemoteDataByHttpClient("query.landRegist.datas",paramMap);
+            JSONObject root = JSON.parseObject(remoteResult);
+            JSONObject innerData = root.getJSONObject("data").getJSONObject("data");
+            LandFirstParamVo body = JSON.parseObject(innerData.toString(), LandFirstParamVo.class);
+            if(Objects.nonNull(body)){
+                ProjectImmobileCode immobileCodeRes = projectImmobileCodeMapper.selectByPreAssignCode(yfbdcdyh);
+                if (Objects.isNull(immobileCodeRes)) {
+                    throw new ServiceException("检查预赋不动产单元号是否正确");
+                }
+
+                String projectId = immobileCodeRes.getProjectId();
+                //Project project = projectMapper.get(projectId);
+                GyjsydscdjVo gyjsydscdjVo = new GyjsydscdjVo();
+                gyjsydscdjVo.setProjectId(projectId);
+                gyjsydscdjVo.setQlr(body.getQlr());
+
+                gyjsydscdjVo.setGyqk(body.getGyqk());
+                gyjsydscdjVo.setZl(body.getZl());
+                gyjsydscdjVo.setQllx(body.getQllx());
+                gyjsydscdjVo.setQlxz(body.getQlxz());
+                //土地用途转化
+                if(StringUtils.isNotBlank(body.getTdyt())){
+                    String code = dealExcelService.getTdytCodeByName(body.getTdyt());
+                    gyjsydscdjVo.setTdyt(code);
+                }
+                if (StringUtils.isNotBlank(body.getTdmj())) {
+                    gyjsydscdjVo.setArea(Float.valueOf(body.getTdmj()));
+                }
+                gyjsydscdjVo.setAreaUnit(body.getTdmjdw());
+                gyjsydscdjVo.setBdcdyh(StringUtils.isNotBlank(body.getBdcdyh()) ? body.getBdcdyh() : body.getYfbdcdyh());
+                gyjsydscdjVo.setBdczh(body.getBdczh());
+                gyjsydscdjVo.setDjjg(body.getDjjg());
+                gyjsydscdjVo.setDjDate(body.getDjrq());
+                String nodeId = gyjsydscdjService.add(gyjsydscdjVo);
+                retMap.put("id", nodeId);
+                //这里保存附件信息
+                if(Objects.nonNull(body.getAttachment()) && !body.getAttachment().isEmpty()){
+                    nodeAttachmentService.getThirdAttachment(projectId,nodeId,AloneWorkFlowEnum.NODE_3.getName(),body.getAttachment());
+                }
             }
-            gyjsydscdjVo.setAreaUnit(body.getTdmjdw());
-            gyjsydscdjVo.setBdcdyh(org.apache.commons.lang3.StringUtils.isNotBlank(body.getBdcdyh()) ? body.getBdcdyh() : body.getYfbdcdyh());
-            gyjsydscdjVo.setBdczh(body.getBdczh());
-            gyjsydscdjVo.setDjjg(body.getDjjg());
-            gyjsydscdjVo.setDjDate(body.getDjrq());
-
-            String nodeId = gyjsydscdjService.add(gyjsydscdjVo);
-            Map<String, Object> map1 = new HashMap<>();
-            map1.put("geomData", geomsList);
-            map1.put("sourceType", "third");
-            //todo 这里进行矢量文件的保存及其传输。
-            R<TGeomDb> res = remoteSpatialFilesDbService.saveGeom(map1);
-            TGeomDb tGeomDb = res.getData();
-            //这里保存geom映射关系
-            nodeLandService.createNodeLand(nodeId, tGeomDb.getId());
-            Map<String, Object> map = new HashMap<>();
-            map.put("id", nodeId);
-            return map;
         } catch (Exception e) {
             log.error("调用矢量保存文件错误,业务编号:{}: ", ywh);
             e.printStackTrace();
         }
         //todo 同步完成之后,需要修改t_third_record_status 表的状态值,同步完成;
-
-        return null;
+        return retMap;
     }
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
     @Override
     public Map<String, Object> remoteHouseFirstRegistration(ThirdRecordStatusParamVo paramVo) {
         String yfbdcdyh = paramVo.getYfbdcdyh();

+ 21 - 19
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/ServiceFileUtil.java

@@ -1,5 +1,6 @@
 package com.siwei.apply.utils;
 
+import com.siwei.apply.common.Constant;
 import com.siwei.common.core.exception.ServiceException;
 import com.siwei.common.core.utils.DateUtils;
 import com.siwei.common.core.utils.StringUtils;
@@ -313,11 +314,22 @@ public class ServiceFileUtil {
      * @param destinationPath
      * @throws IOException
      */
-    public static void downloadFile(String fileURL,String fileName, String destinationPath) throws IOException {
-        String encodeFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.name());
-        String newUrl = fileURL.replaceAll("&fileName=[^&]*$", "");
-        // 拼接合法URL
-        String fullUrl = newUrl + "&fileName=" + encodeFileName;
+    public static void downloadFile(String fileURL,String fileName, String destinationPath,String fromRoute) throws IOException {
+        String fullUrl= "";
+        if(Constant.GG.equalsIgnoreCase(fromRoute)){
+            String newUrl = "";
+            if(StringUtils.contains(fileName,"&")){
+                newUrl = StringUtils.replace(fileURL, "&fileName="+fileName, "");
+            }else {
+                newUrl = fileURL.replaceAll("&fileName=[^&]*$", "");
+            }
+            String encodeFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
+            // 拼接合法URL
+            fullUrl = newUrl + "&fileName=" + encodeFileName;
+        }else if(Constant.BDC.equalsIgnoreCase(fromRoute)){
+            fullUrl = fileURL;
+        }
+
         URL url = new URL(fullUrl);
         HttpURLConnection connection = (HttpURLConnection) url.openConnection();
         connection.setRequestMethod("GET");
@@ -325,7 +337,7 @@ public class ServiceFileUtil {
         connection.setReadTimeout(5000); // 设置读取超时时间
         int contentLength = connection.getContentLength(); // 获取文件大小
 
-        System.out.println("Downloading file of size: " + contentLength + " bytes");
+        logger.info("Downloading file of size: " + contentLength + " bytes");
 
         //目录路径许哟啊拼接文件名称
         destinationPath += "/"+ fileName;
@@ -339,20 +351,13 @@ public class ServiceFileUtil {
             while ((bytesRead = in.read(buffer)) != -1) {
                 out.write(buffer, 0, bytesRead);
             }
-
-            System.out.println("Download completed.");
+            logger.info("Download completed.");
         } finally {
             connection.disconnect();
         }
     }
 
 
-
-
-
-
-
-
     public static void test() throws Exception {
         Path dirPath = Paths.get("C:\\Users\\Administrator\\Desktop\\01\\一码管地相关\\数据库.docx");
         String extension = FilenameUtils.getExtension(dirPath.toString());
@@ -365,14 +370,11 @@ public class ServiceFileUtil {
     public static void main(String[] args) {
         System.out.println("==========start=============");
         try {
-
             String baseUrl = "http://10.224.130.138:7071/aplanmis-rest/province/downDzzzFileByFileId?fileId=605028ecf919500a380acc5a&fileName=阳光三路工程规划许可证申请表.pdf";
             String fileName = "阳光三路工程规划许可证申请表.pdf";
-
             String savePath = "C:\\home\\siwei\\uploadPath\\2026\\06\\13\\建设用地规划许可_20260613182743A035_20260613182743A036\\建设工程规划许可证申请表";
-            downloadFile(baseUrl, fileName, savePath);
-
-            downloadFile(baseUrl,fileName,savePath);
+            downloadFile(baseUrl, fileName, savePath,Constant.GG);
+            downloadFile(baseUrl,fileName,savePath,Constant.GG);
         } catch (Exception e) {
             throw new RuntimeException(e);
         }

+ 10 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/ServiceUtil.java

@@ -25,11 +25,19 @@ public class ServiceUtil {
     private static final String DOMAIN = "http://192.168.60.219/prod-api/apply";  // doman
     public static final String THIRD_API_PRIVATE_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAI1O4yrVG7/Eg1M0G1f/bRDV1ABUpRSSBxvfAxh4dL2W7ApMCz+Krs3xushcQzTOsVuxPGAjgXB906iUEyUJoefnixiKthYV56kzVeXtIw+J1Tbnc1ujTvhWNUkaJYxLCTw+8Z/kASL0XNKImSgzNsB6YQ/ZlYa0kBUEFrs0RBStAgMBAAECgYAxOrqJwZTZSm02H4EnNyWYJ+aj9tlMQVOYsikx7UU+h8XUEIoaqQYdWYnpI7uGOjwv5Z9THwuJVUzX/j5tON3el/eMeOCdnRaSzprY90ceKPr13TezIy6PvyZbH0JRua7Qwu+Klh8GL/6s5lZfs3VAM3qImSE+O86SlL+GbdLiAQJBANF5zA/a8KGkm7yremftARqvfOTy+PQxXXXE7tbWqE5P/t4/feZI45OKoNNId1EGFs4nIS/G+p99AEO80sQNnVUCQQCssUV6h6ddEp3SAVfDSB1Ss0i35kd5GRZT5v+atA9ETAyP37o8ZqnFln1blG95Afp7qy0NcP+ltGCZZftOBdn5AkAv+SXbx7duPYWRKvBolqW3F9ORl3eebSPLUeOk/hojfTyQZ5gMwkqkQo5cdO8mdi+I3PtDtt0042rJGJhoX/nVAkEAqJekGdxHgzDCjJws/wPvRKatDoQtMMdSKfUxgunYobeQ6ADmQ0OC6NhjZ73BGiTZUlSp9h5kJnSzfe626dQCmQJBAM7heHLxlzNY65ziyTp5RkShxmp/yEi6d4cFzZ5/UyFDWW/vphrbKezsKK5rpbFmQjNhFcAk61+O+70J0V8Yoh8=";  // doman
     public static final String THIRD_API_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoVP+LpSUfIL6r2nvN/TYOmBGGJT/6vB2Us8Qhk/4ZhmPIo1PE/8ovpdFcNXaYGbtd6/32dkotxFgMxiLdHFHii3EaBL6PXUYHiZWnIRz79gmttHQGDXhOVRGbldNHOZXWBBrek8/GWDk6Z5jgUFhi3K5853JU5fIc8w5TGyVs7wIDAQAB";
-    public static final String THIRD_API_BASE_URL = "http://10.224.1.228:10001/dsp-register-server/dspRegisterService/proxyService/proxyThirdPlatformService";
 
+//   本地密钥
+//    public static final String THIRD_API_PRIVATE_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJ5/O5IdusAZ+tmS8kFIhqOSkTm9nE+boXnQ7tqD+wdBCeE37t0muKI64q8nk9WFz68sMAadnhjWvpflfV6qHKQmH47ZNqeH2vwIJz5vw7su49o3GRDZVW99X56LSVv0oJsVuXL/SvxKGONuC/qtbpb7SXltLWZCmgAgjnuIIjfZAgMBAAECgYA3FRCm3x4f1OeQ5bi7Z3EjN7Sw1GyWXgfoRew8lNGQ29GLK90fjm1sM/rD1IVUF4Tt4/Vs1yoyh68FKwQ++e+prZ3CTbpKhmuZ5NKWrJEaZkuYTtsP4xiuae38lM8lZgrA89Qkrmfu/TdR+AJAFtSIohmy5Md4YM78D3BIxOLXgQJBAPZBl5utD86YhgeXHth51OOrzN0ftqUAm281dCa4I9Zaf2uvGqfB5J61uyeK1PBXRu+4MfbA0q5ZSSr2wPZnr6UCQQCkxLMK3H7O3H0w4555+j4m0v+n/Gx6jUfXiMcALO85so/bFDr/5v9VWojEKgO8re7yoje+bD+ubSuDKqeJxnElAkBjefeucWiTQlXSNx/EvuJa3gmxwZ/cY7RmZid3hKclbgVPELspzU93NV5XCOQf+oGzUKsOTLJOr864xlkIsLXpAkEAgvvHpXPB7yrC7xGUEz3HGNAV4vI9PnN/0CzwnggaqRB1YeDEQljdVHojTWZlECJpWUNx8xRUz5IDzEMlatZxbQJBAI9xCcKTBg5qO9olagSAA9TKhMfNtNm1SaMtAzkHNJKJojUK01ORdlE+6vpEOC2SfoS9C4ZAEGXV1/sROmeoUBQ=";  // doman
+//    public static final String THIRD_API_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCefzuSHbrAGfrZkvJBSIajkpE5vZxPm6F50O7ag/sHQQnhN+7dJriiOuKvJ5PVhc+vLDAMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCefzuSHbrAGfrZkvJBSIajkpE5vZxPm6F50O7ag/sHQQnhN+7dJriiOuKvJ5PVhc+vLDAGnZ4Y1r6X5X1eqhykJh+O2Tanh9r8CCc+b8O7LuPaNxkQ2VVvfV+ei0lb9KCbFbly/0r8Shjjbgv6rW6W+0l5bS1mQpoAII57iCI32QIDAQAB";
 
+    public static final String THIRD_API_DOMAIN = "http://10.224.1.228:10001";
+    public static final String THIRD_API_BASE_URL = "/dsp-register-server/dspRegisterService/proxyService/proxyThirdPlatformService";
     protected static final Logger logger = LoggerFactory.getLogger(ServiceUtil.class);
 
+
+
+
+
     /**
      * 获取指定目录下的子children list
      *
@@ -227,7 +235,7 @@ public class ServiceUtil {
         headers.put("x-format", "json");
 
         // 7. 使用HttpClientUtil 发起远程POST请求
-        String resp = HttpClientUtil.doPostJson(THIRD_API_BASE_URL, payload, headers);
+        String resp = HttpClientUtil.doPostJson(THIRD_API_DOMAIN+THIRD_API_BASE_URL, payload, headers);
         //System.out.println("响应原文: " + resp);
         logger.info("响应原文:{} ", resp);
         // 8. 用我方私钥解密响应密文