|
@@ -142,7 +142,7 @@ public class APIModuleGis extends UZModule {
|
|
|
try {
|
|
|
res.put("code",code);
|
|
|
res.put("msg",msg);
|
|
|
- res.put("version","1.1.7");
|
|
|
+ res.put("version","1.1.8");
|
|
|
|
|
|
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
|
|
if (adapter == null) {
|
|
@@ -201,6 +201,11 @@ public class APIModuleGis extends UZModule {
|
|
|
Log.i(TAG+"test",wgslat);
|
|
|
Log.i(TAG+"test",wgslng);
|
|
|
Log.i(TAG+"test",wgsblh);
|
|
|
+ if("0".equals(postType)||"2".equals(postType)){
|
|
|
+ wgslat = "0.0";
|
|
|
+ wgslng = "0.0";
|
|
|
+ }
|
|
|
+
|
|
|
if(!"0.0".equals(wgslat)&&!"0.0".equals(wgslng)) {
|
|
|
gisObj.put("wgslat", wgslat);
|
|
|
gisObj.put("wgslng", wgslng);
|
|
@@ -242,6 +247,9 @@ public class APIModuleGis extends UZModule {
|
|
|
String mountName = context.optString("mountName");
|
|
|
String userName = context.optString("userName");
|
|
|
String passWord = context.optString("passWord");
|
|
|
+ String diffType = context.optString("diffType");
|
|
|
+ String stationId = context.optString("stationId");
|
|
|
+ Integer type = context.optInt("type");
|
|
|
|
|
|
//TODO 熔断
|
|
|
if(!"0".equals(bindCode)){
|
|
@@ -261,7 +269,7 @@ public class APIModuleGis extends UZModule {
|
|
|
return new ModuleResult(res);
|
|
|
}
|
|
|
if(!"0".equals(logCorsCod)) {
|
|
|
- DiffConnectManager.loginCors(this.context(), ip, port, mountName, userName, passWord);
|
|
|
+ DiffConnectManager.loginCors(this.context(), ip, port, mountName, userName, passWord,diffType,stationId,type);
|
|
|
}
|
|
|
|
|
|
//TODO rtk连接比cors连接优先级要高
|
|
@@ -297,7 +305,7 @@ public class APIModuleGis extends UZModule {
|
|
|
userName!=null&&userName.length()>0&&
|
|
|
passWord!=null&&passWord.length()>0){
|
|
|
//TODO 重连必须满足以上条件
|
|
|
- DiffConnectManager.loginCors(this.context(),ip,port,mountName,userName,passWord);
|
|
|
+ DiffConnectManager.loginCors(this.context(),ip,port,mountName,userName,passWord,diffType,stationId,type);
|
|
|
}
|
|
|
}
|
|
|
ramRtkName = rtkName;
|
|
@@ -607,6 +615,9 @@ public class APIModuleGis extends UZModule {
|
|
|
String mountName = context.optString("mountName");
|
|
|
String userName = context.optString("userName");
|
|
|
String passWord = context.optString("passWord");
|
|
|
+ String diffType = context.optString("diffType");
|
|
|
+ String stationId = context.optString("stationId");
|
|
|
+ Integer type = context.optInt("type");
|
|
|
if(ip==null||"".equals(ip)||
|
|
|
port==null||
|
|
|
mountName==null||"".equals(mountName)||
|
|
@@ -617,7 +628,7 @@ public class APIModuleGis extends UZModule {
|
|
|
return new ModuleResult(res);
|
|
|
}
|
|
|
if(!"0".equals(logCorsCod)){
|
|
|
- DiffConnectManager.loginCors(this.context(),ip,port,mountName,userName,passWord);
|
|
|
+ DiffConnectManager.loginCors(this.context(),ip,port,mountName,userName,passWord,diffType,stationId,type);
|
|
|
}else{
|
|
|
code = "0";
|
|
|
msg = "success";
|
|
@@ -724,6 +735,9 @@ public class APIModuleGis extends UZModule {
|
|
|
String mountName = moduleContext.optString("mountName");
|
|
|
String userName = moduleContext.optString("userName");
|
|
|
String passWord = moduleContext.optString("passWord");
|
|
|
+ String diffType = moduleContext.optString("diffType");
|
|
|
+ String stationId = moduleContext.optString("stationId");
|
|
|
+ Integer type = moduleContext.optInt("type");
|
|
|
|
|
|
if (!EventBus.getDefault().isRegistered(this)) {
|
|
|
EventBus.getDefault().register(this);
|
|
@@ -783,7 +797,7 @@ public class APIModuleGis extends UZModule {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
if(!"0".equals(logCorsCod)){
|
|
|
- DiffConnectManager.loginCors(corsContext,ip,port,mountName,userName,passWord);
|
|
|
+ DiffConnectManager.loginCors(corsContext,ip,port,mountName,userName,passWord,diffType,stationId,type);
|
|
|
}else{
|
|
|
//TODO cors更换
|
|
|
if((ip!=null&&!ip.equals(ramIp))||(port!=null&&!port.equals(ramPort))
|
|
@@ -798,7 +812,7 @@ public class APIModuleGis extends UZModule {
|
|
|
userName!=null&&userName.length()>0&&
|
|
|
passWord!=null&&passWord.length()>0){
|
|
|
//TODO 重连必须满足以上条件
|
|
|
- DiffConnectManager.loginCors(thisContext,ip,port,mountName,userName,passWord);
|
|
|
+ DiffConnectManager.loginCors(thisContext,ip,port,mountName,userName,passWord,diffType,stationId,type);
|
|
|
}
|
|
|
}
|
|
|
}
|