This commit is contained in:
parent
05527114d9
commit
c46036c450
|
@ -324,8 +324,40 @@ public class MonitorService {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forEntity == null) return;
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//查询视频点播巡检结果
|
//查询视频点播巡检结果
|
||||||
public void listChannelPlayStates(Map<String,Object> map){
|
public void listChannelPlayStates(Map<String,Object> map){
|
||||||
|
|
Loading…
Reference in New Issue