This commit is contained in:
wuweida 2022-05-07 18:21:24 +08:00
parent 05527114d9
commit c46036c450
1 changed files with 32 additions and 0 deletions

View File

@ -324,8 +324,40 @@ 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);
}
}
}
}
//查询视频点播巡检结果
public void listChannelPlayStates(Map<String,Object> map){