|
@ -77,6 +77,7 @@ public class YsDeviceService {
|
|
JSONArray tmpArr = result.getJSONObject("eps").getJSONArray("alert");
|
|
JSONArray tmpArr = result.getJSONObject("eps").getJSONArray("alert");
|
|
boolean fallFlag = false;
|
|
boolean fallFlag = false;
|
|
String deviceSN = null;
|
|
String deviceSN = null;
|
|
|
|
String sceneUrl = "";
|
|
for (int i=0;i<tmpArr.size();i++){
|
|
for (int i=0;i<tmpArr.size();i++){
|
|
JSONObject tmpObj = tmpArr.getJSONObject(i);
|
|
JSONObject tmpObj = tmpArr.getJSONObject(i);
|
|
String msgType = tmpObj.getString("msgType");
|
|
String msgType = tmpObj.getString("msgType");
|
|
@ -94,6 +95,13 @@ public class YsDeviceService {
|
|
if ("tumble_detection".equals(alarmType)){//tumble_detection跌倒类型 //有人出现SmartHumanDet
|
|
if ("tumble_detection".equals(alarmType)){//tumble_detection跌倒类型 //有人出现SmartHumanDet
|
|
fallFlag = true;
|
|
fallFlag = true;
|
|
deviceSN = bodyJsonObj2.getString("devSerial");//设备SN
|
|
deviceSN = bodyJsonObj2.getString("devSerial");//设备SN
|
|
|
|
if (bodyJsonObj2.containsKey("pictureList")&&bodyJsonObj2.getJSONArray("pictureList")!=null){
|
|
|
|
JSONArray pictureList = bodyJsonObj2.getJSONArray("pictureList");
|
|
|
|
if (pictureList.size()>0){
|
|
|
|
JSONObject tmp = pictureList.getJSONObject(0);
|
|
|
|
sceneUrl = tmp.getString("url");//现场照片
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@ -135,6 +143,7 @@ public class YsDeviceService {
|
|
jsonObject.put("serveLat",lat);
|
|
jsonObject.put("serveLat",lat);
|
|
jsonObject.put("serveLon",lon);
|
|
jsonObject.put("serveLon",lon);
|
|
jsonObject.put("topicItem","preventFall");
|
|
jsonObject.put("topicItem","preventFall");
|
|
|
|
jsonObject.put("sceneImg",sceneUrl);
|
|
JSONObject jsonObjectParam = new JSONObject();
|
|
JSONObject jsonObjectParam = new JSONObject();
|
|
jsonObjectParam.put("order", jsonObject);
|
|
jsonObjectParam.put("order", jsonObject);
|
|
map.put("jsonData", jsonObjectParam.toJSONString());
|
|
map.put("jsonData", jsonObjectParam.toJSONString());
|