Merge branch 'master' of http://118.24.27.47:1024/Mr.Song/SmartUrbanRural
# Conflicts: # src/main/java/com/xkrs/model/entity/DeviceManagement.java
This commit is contained in:
commit
53b6898daa
@ -136,46 +136,33 @@ public class TestController {
|
||||
@GetMapping("/getPaging")
|
||||
public boolean getPaging( String para) {
|
||||
String forecastWeather = ManagementUtil.getPaging(para);
|
||||
/*List<Map<String, String>> listObjectFir = (List<Map<String, String>>) JSONArray.parse(forecastWeather);
|
||||
List<Map<String, String>> listObjectFir = (List<Map<String, String>>) JSONArray.parse(forecastWeather);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode jsonNode = objectMapper.readTree(message);
|
||||
JsonNode jsonNode = null;
|
||||
try {
|
||||
jsonNode = objectMapper.readTree(forecastWeather);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String method = jsonNode.get("method").asText();
|
||||
if("vms.alarm.msg".equals(method)){
|
||||
JsonNode info = jsonNode.get("info");
|
||||
Fire fire = new Fire();
|
||||
DeviceManagement fire = new DeviceManagement();
|
||||
fire.setDeviceName(info.get("deviceName").asText());
|
||||
fire.setDeviceCode(info.get("deviceCode").asText());
|
||||
fire.setChannelSeq(info.get("channelSeq").asText());
|
||||
fire.setUnitType(info.get("unitType").asText());
|
||||
fire.setNodeType(info.get("nodeType").asText());
|
||||
fire.setNodeCode(info.get("nodeCode").asText());
|
||||
String alarmCode = info.get("alarmCode").asText();
|
||||
fire.setAlarmCode(alarmCode);
|
||||
fire.setAlarmStat(info.get("alarmStat").asText());
|
||||
fire.setAlarmType(info.get("alarmType").asText());
|
||||
fire.setAlarmGrade(info.get("alarmGrade").asText());
|
||||
fire.setAlarmPicture(info.get("alarmPicture").asText());
|
||||
String modifyTime = DateTimeUtil.timeMillisToString(Long.parseLong(info.get("alarmDate").asText()));
|
||||
fire.setAlarmDate(modifyTime);
|
||||
fire.setAlarmSourceName(info.get("alarmSourceName").asText());
|
||||
fire.setAlarmLongitude(info.get("gpsX").asText());
|
||||
fire.setAlarmLatitude(info.get("gpsY").asText());
|
||||
fire.setAltitude(info.get("altitude").asText());
|
||||
fire.setFireDistance(info.get("fireDistance").asText());
|
||||
fire.setFireId(info.get("fsid").asText());
|
||||
fire.setFireState("0");
|
||||
fire.setDeviceSn(info.get("deviceSn").asText());
|
||||
fire.setDeviceCategory(Integer.valueOf(info.get("deviceCategory").asText()));
|
||||
fire.setDeviceType(Integer.valueOf(info.get("deviceType").asText()));
|
||||
fire.setDeviceManufacturer(info.get("deviceManufacturer").asText());
|
||||
fire.setDeviceModel(info.get("deviceModel").asText());
|
||||
fire.setDeviceIp(info.get("deviceIp").asText());
|
||||
fire.setDevicePort(Integer.valueOf(info.get("devicePort").asText()));
|
||||
fire.setOwnerCode(info.get("ownerCode").asText());
|
||||
//fire.setOwnerOrgName(Integer.valueOf(info.get("ownerOrgName").asText()));
|
||||
fire.setIsOnline(Integer.valueOf(info.get("isOnline").asText()));
|
||||
fire.setSubSystem(info.get("subSystem").asText());
|
||||
fire.setDevExt(info.get("devExt").asText());
|
||||
}
|
||||
*//* for (int i=0;i<listObjectFir.size();i++)
|
||||
{
|
||||
DeviceManagement deviceManagement=new DeviceManagement();
|
||||
deviceManagement.setDeviceName(listObjectFir.size();
|
||||
|
||||
}*//*
|
||||
|
||||
*//* for (Map<String,<String> mapList : listObjectFir) {
|
||||
for (Map.Entry entry : mapList.entrySet()) {
|
||||
System.out.println(entry.getKey() + " " + entry.getValue());
|
||||
}
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user