This commit is contained in:
parent
05527114d9
commit
c46036c450
|
@ -324,7 +324,39 @@ public class MonitorService {
|
|||
}
|
||||
|
||||
if (forEntity == null) return;
|
||||
List<Map> results = forEntity.getBody();
|
||||
|
||||
// log.debug("response {}", JSONObject.toJSONString(results));
|
||||
String sep = "->";
|
||||
|
||||
for (Map result : results) {
|
||||
Boolean isParent = (Boolean) result.get("isParent");
|
||||
|
||||
if (isParent){
|
||||
CameraOrgan cameraOrgan = JSONObject.parseObject(JSONObject.toJSONString(result), CameraOrgan.class);
|
||||
|
||||
cameraOrgenMapper.insert(cameraOrgan);
|
||||
|
||||
videoService((String) result.get("id"),path + sep + result.get("name"));
|
||||
}else {
|
||||
if (result.get("channelId") != null){
|
||||
CameraChannel cameraChannel = JSONObject.parseObject(JSONObject.toJSONString(result), CameraChannel.class);
|
||||
|
||||
String id = (String)result.get("parentId");
|
||||
|
||||
if (path != null && path.startsWith(sep)) {
|
||||
path = path.substring(sep.length());
|
||||
}
|
||||
cameraChannel.setNodeName(path);
|
||||
|
||||
cameraChannel.setParentId(id);
|
||||
|
||||
cameraChannelMapper.insert(cameraChannel);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//查询视频点播巡检结果
|
||||
|
|
Loading…
Reference in New Issue