Browse Source

修改服务代理地址

DESKTOP-2K9OVK9\siwei 5 months ago
parent
commit
c30bf18f18

+ 11 - 5
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/MyExamineServiceImpl.java

@@ -13,7 +13,7 @@ public class MyExamineServiceImpl implements IMyExamineService {
 
     @Autowired
     private TMyExamineMapper myExamineMapper;
-    private String paroxy_url = "http://192.168.60.2:8080/proxy/handle/{token}/";
+    private String paroxy_url = "http://192.168.60.2:8080/proxy/handle/{token}/siweiserver/";
 
     @Override
     public String getProxyServerUrl(String fwKey, String fwid) {
@@ -23,9 +23,11 @@ public class MyExamineServiceImpl implements IMyExamineService {
         }
         String server_type = (String) mapfwData.get("server_type");
         String type = (String) mapfwData.get("type");
-//        String url = (String) mapfwData.get("url");
+        String url = (String) mapfwData.get("url");
         //判断geoserver
         if (StringUtils.isNotEmpty(server_type) && "geoserver".equals(server_type.toLowerCase())) {
+            int len = url.indexOf("geoserver");
+            url = url.substring(len + 9);
             String fwmc = (String) mapfwData.get("fwmc");
             String fwgzkj = (String) mapfwData.get("fwgzkj");
             String qpfa = (String) mapfwData.get("qpfa");
@@ -34,7 +36,7 @@ public class MyExamineServiceImpl implements IMyExamineService {
             Integer maximumlevel = (Integer) mapfwData.get("maximumlevel");
             Integer minimumlevel = (Integer) mapfwData.get("minimumlevel");
             String params = "";
-            params = params + paroxy_url.replace("{token}", fwKey) + "siweigeoserver" + "?";
+            params = params + paroxy_url.replace("{token}", fwKey) + url + "?";
             params = params + paramsTogether("server_type", type, true);
             params = params + paramsTogether("fwmc", fwmc, true);
             params = params + paramsTogether("fwgzkj", fwgzkj, true);
@@ -47,14 +49,18 @@ public class MyExamineServiceImpl implements IMyExamineService {
         } else {
             //判断3DTiles
             if (StringUtils.isNotEmpty(type) && "3DTiles".toLowerCase().equals(type.toLowerCase())) {
+                int len = url.indexOf("3Dtiles");
+                url = url.substring(len + 7);
                 String params = "";
-                params = params + paroxy_url.replace("{token}", fwKey) + "siwei3dtiles";
+                params = params + paroxy_url.replace("{token}", fwKey) + url;
                 return params;
             } else {
                 //超图的
+                int len = url.indexOf("iserver");
+                url = url.substring(len + 7);
                 String sde = (String) mapfwData.get("sde");
                 String params = "";
-                params = params + paroxy_url.replace("{token}", fwKey) + "siweisupermap" + "?";
+                params = params + paroxy_url.replace("{token}", fwKey) + url + "?";
                 params = params + paramsTogether("server_type", type, true);
                 params = params + paramsTogether("sde", sde, false);
                 return params;

+ 0 - 12
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/ShareConfigurationServiceImp.java

@@ -7,25 +7,13 @@ import com.onemap.apply.mapper.zymlapplication.TZymlFiledMapper;
 import com.onemap.apply.service.zymlapplication.IShareConfigurationService;
 import com.onemap.common.core.utils.StringUtils;
 import org.dom4j.*;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
 
 import javax.annotation.Resource;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
 import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;