Commit 5b9f4544 authored by hongguangwu's avatar hongguangwu

MVP1.6.4-加线上地址

parent da637bb8
...@@ -30,6 +30,7 @@ import java.io.IOException; ...@@ -30,6 +30,7 @@ import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -175,9 +176,16 @@ public class SocialConfig { ...@@ -175,9 +176,16 @@ public class SocialConfig {
if (!"200".equals(code)) { if (!"200".equals(code)) {
throw new CheckedException("获取社保士兵【可执行的设备接口】失败,code="+code); throw new CheckedException("获取社保士兵【可执行的设备接口】失败,code="+code);
} }
JSONArray dataArr = (JSONArray) bodyObject.get("data"); List<HashMap> dataList = JSON.parseArray(bodyObject.getString("data"), HashMap.class);
if (dataArr != null && !dataArr.isEmpty()) { String label;
terminalId = ((JSONObject)dataArr.get(0)).getString("value"); if (dataList != null && !dataList.isEmpty()) {
for (HashMap data : dataList) {
terminalId = String.valueOf(data.get("value"));
label = String.valueOf(data.get("label"));
if (Common.isNotNull(label) && label.contains("空闲")) {
break;
}
}
} }
} }
if (Common.isEmpty(terminalId)) { if (Common.isEmpty(terminalId)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment