diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java index 7d34a5d..abc1038 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java @@ -15,7 +15,8 @@ public interface FunctionConstants { @AllArgsConstructor enum TypeEnum { /**跳转页面**/ - JUMP("1") + JUMP("1"), + PARAMS("2") ; @Getter private String type; diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ExtraVO.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ExtraVO.java index c736e30..92174e8 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ExtraVO.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ExtraVO.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.util.Map; /** * @Author: huangxing @@ -14,7 +15,7 @@ import java.io.Serializable; @ApiModel("响应内容") public class ExtraVO implements Serializable { - @ApiModelProperty("交互类型 1:打开页面,2:打开链接") + @ApiModelProperty("交互类型 1:打开页面,2:打开链接,3:参数传递") private String type; @ApiModelProperty("若为弹窗,则返回路由") @@ -26,4 +27,7 @@ public class ExtraVO implements Serializable { @ApiModelProperty("是否立即跳转") private boolean isImmediatelyJump = true; + @ApiModelProperty("附带参数") + private Map params; + } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClient.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClient.java index 89a9f98..b29e3e2 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClient.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClient.java @@ -18,10 +18,15 @@ public interface IStationVideoTypeClient { String API_PREFIX = "/feign/station/videoType"; String LIST_BY_STATION_ID = API_PREFIX + "/listByStationId"; String LIST = API_PREFIX + "/list"; + String GET_BY_ID = API_PREFIX + "/getById"; + String GET_RTSP_ADDRESS_BY_ID = API_PREFIX + "/getRtspAddressById"; @PostMapping(LIST_BY_STATION_ID) List listByStationId(@RequestParam("stationId") String stationId); @GetMapping(LIST) R> list(StationVideoTypeEntity req); + + @GetMapping(GET_BY_ID) + R getById(@RequestParam Long id); } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClientFallback.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClientFallback.java index 3d43046..5ee3541 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClientFallback.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/feign/IStationVideoTypeClientFallback.java @@ -21,4 +21,10 @@ public class IStationVideoTypeClientFallback implements IStationVideoTypeClient public R> list(StationVideoTypeEntity req) { return R.fail("远程调用失败!"); } + + @Override + public R getById(Long id) { + return R.fail("远程调用失败!"); + } + } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeUrl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeUrl.java index 122dbce..c8248dd 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeUrl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeUrl.java @@ -19,4 +19,6 @@ public class BigModelInvokeUrl { private String deleteAssistant; + private String updateVideo; + } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java index 1eb206f..b1d0573 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java @@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.HttpServletRequest; import java.util.List; +import java.util.Map; /** * @Author: huangxing @@ -19,6 +20,8 @@ public interface IInteractiveService { R ask(String question,String sessionId,String userId); + void updateVideo(Map request); + List getAnswerBySessionIds(String sessionIds); Boolean authentication(String stationId, String userId, String funcCode); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IParamsService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IParamsService.java new file mode 100644 index 0000000..aee914a --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IParamsService.java @@ -0,0 +1,14 @@ +package com.hnac.hzims.bigmodel.interactive.service; + +import com.hnac.hzims.bigmodel.entity.FunctionEntity; + +import java.util.Map; + +/** + * @Author: huangxing + * @Date: 2024/05/09 08:50 + */ +public interface IParamsService { + String dealJumpTypeFunction(FunctionEntity function, Map args); + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java index 3dc22fb..2bb4ffc 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java @@ -11,6 +11,7 @@ import com.hnac.hzims.bigmodel.function.service.IFunctionService; import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq; import com.hnac.hzims.bigmodel.interactive.service.IInteractiveService; import com.hnac.hzims.bigmodel.interactive.service.IJumpPageService; +import com.hnac.hzims.bigmodel.interactive.service.IParamsService; import com.hnac.hzims.bigmodel.interactive.vo.AnswerVO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -49,6 +50,8 @@ public class InteractiveServiceImpl implements IInteractiveService { private final IJumpPageService jumpPageService; + private final IParamsService paramsService; + private final IFunctionService functionService; private final BigModelInvokeUrl bigModelInvokeUrl; @@ -72,11 +75,14 @@ public class InteractiveServiceImpl implements IInteractiveService { switch (typeEnum) { // 页面跳转 case JUMP: - String extra = jumpPageService.dealJumpTypeFunction(function, req.getFunctionArgs()); - Assert.isTrue(StringUtil.isNotBlank(extra) && Func.isNotEmpty(extra), () -> { + String jumpExtra = jumpPageService.dealJumpTypeFunction(function, req.getFunctionArgs()); + Assert.isTrue(StringUtil.isNotBlank(jumpExtra) && Func.isNotEmpty(jumpExtra), () -> { throw new ServiceException("解析" + function.getName() + "函数失败!"); }); - return R.data(extra); + return R.data(jumpExtra); + case PARAMS: + String paramExtra = paramsService.dealJumpTypeFunction(function, req.getFunctionArgs()); + return R.data(paramExtra); default: throw new ServiceException("函数解析失败!"); } @@ -111,6 +117,15 @@ public class InteractiveServiceImpl implements IInteractiveService { } @Override + public void updateVideo(Map request) { + HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getUpdateVideo()) + .body(JSON.toJSONString(request)).execute(); + Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> { + throw new ServiceException("远程调用大模型【更新实时监控】接口失败!"); + }); + } + + @Override public List getAnswerBySessionIds(String sessionIds) { Map params = new HashMap<>(); params.put("ids",Func.toStrList(",",sessionIds).toArray()); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java index b3e2fdf..9ff11d3 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java @@ -36,8 +36,6 @@ public class JumpRouteJoinStrategy { switch(routeEnum) { case OPEN_SCADA: return this.getScadaExtra(args,function); - case OPEN_VIDEO: - return this.getVideoExtra(args,function); default: break; } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamStrategy.java new file mode 100644 index 0000000..d1928c3 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamStrategy.java @@ -0,0 +1,69 @@ +package com.hnac.hzims.bigmodel.interactive.service.impl; + +import com.hnac.hzims.bigmodel.entity.FunctionEntity; +import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; +import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants; +import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; +import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; +import com.hnac.hzims.operational.station.feign.IStationVideoTypeClient; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringUtil; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; + +/** + * @Author: huangxing + * @Date: 2024/05/09 08:56 + */ +@Component +@Slf4j +@AllArgsConstructor +public class ParamStrategy { + + private final IStationVideoTypeClient videoClient; + + /** + * 解析发送参数方式函数 + * @param function 函数 + * @param args 大模型识别参数 + * @return 前端传参EXTRA + */ + public ExtraVO resolve(FunctionEntity function, Map args) { + FuncRouteEnum routeEnum = FuncRouteEnum.getEnumByFuncCode(function.getCode()); + if(Func.isNotEmpty(routeEnum)) { + switch(routeEnum) { + case OPEN_VIDEO: + return this.getVideoExtra(args); + default: + break; + } + } + return null; + } + + private ExtraVO getVideoExtra(Map args) { + // 跳转页面逻辑 + ExtraVO extraVO = new ExtraVO(); + String id = args.get("canvas_id"); + if(StringUtil.isNotBlank(id) && Func.isNotEmpty(id)) { + R videoR = videoClient.getById(Long.valueOf(id)); + if(videoR.isSuccess()) { + StationVideoTypeEntity video = videoR.getData(); + extraVO.setType(FunctionConstants.TypeEnum.PARAMS.getType()); + Map params = new HashMap<>(); + params.put("videoHost", video.getVideoHost()); + params.put("pointCode", video.getPointCode()); + params.put("appKey", video.getAppKey()); + params.put("appSecret", video.getAppSecret()); + params.put("liveSourceAddress",video.getLiveSourceAddress()); + extraVO.setParams(params); + } + } + return extraVO; + } +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamsServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamsServiceImpl.java new file mode 100644 index 0000000..dd462c6 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamsServiceImpl.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.bigmodel.interactive.service.impl; + +import com.alibaba.fastjson.JSON; +import com.hnac.hzims.bigmodel.entity.FuncParamEntity; +import com.hnac.hzims.bigmodel.entity.FunctionEntity; +import com.hnac.hzims.bigmodel.interactive.service.IParamsService; +import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springframework.stereotype.Service; +import org.springframework.util.Assert; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * @Author: huangxing + * @Date: 2024/05/09 08:51 + */ +@Service +@Slf4j +@AllArgsConstructor +public class ParamsServiceImpl implements IParamsService { + + private final ParamStrategy strategy; + + @Override + public String dealJumpTypeFunction(FunctionEntity function, Map args) { + // 跳转页面逻辑 + ExtraVO extraVO = strategy.resolve(function,args); + return JSON.toJSONString(extraVO); + } +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/UpdateStationVO.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/UpdateStationVO.java new file mode 100644 index 0000000..3ed167a --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/UpdateStationVO.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.bigmodel.interactive.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author: huangxing + * @Date: 2024/05/09 09:50 + */ +@Data +public class UpdateStationVO implements Serializable { + + /**站点ID**/ + private String id; + + /**站点名称**/ + private String name; + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/UpdateUsualVO.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/UpdateUsualVO.java new file mode 100644 index 0000000..88a9c73 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/UpdateUsualVO.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.bigmodel.interactive.vo; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author: huangxing + * @Date: 2024/05/09 09:53 + */ +@Data +public class UpdateUsualVO implements Serializable { + + /**站点ID**/ + @JSONField(name = "station_id") + private String stationId; + + /**业务ID**/ + private String id; + + /**业务名称**/ + private String name; + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java index 5f3752f..a8cc9a7 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java @@ -4,9 +4,13 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.hnac.hzims.bigmodel.interactive.service.IInteractiveService; import com.hnac.hzims.bigmodel.interactive.vo.AnswerVO; +import com.hnac.hzims.bigmodel.interactive.vo.UpdateStationVO; +import com.hnac.hzims.bigmodel.interactive.vo.UpdateUsualVO; import com.hnac.hzims.bigmodel.websocket.service.InteractiveWsService; import com.hnac.hzims.bigmodel.websocket.sessionManager.InteractiveSessionManager; +import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; +import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzims.operational.station.feign.IStationVideoTypeClient; import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.v5.project.ProjectClient; @@ -25,7 +29,9 @@ import org.springframework.stereotype.Component; import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketSession; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ThreadPoolExecutor; import java.util.stream.Collectors; @@ -54,8 +60,33 @@ public class InteractiveSchedule { private final ScadaClient scadaClient; + private final IStationClient stationClient; + private final static String HZIMS_BIGMODEL_ASK_KEY = "hzims:bigmodel:ask:key"; +// @XxlJob(GET_INTERACTIVE_RESULT) +// public ReturnT execute(String params) { +// String resultKey = ParamCache.getValue(GET_INTERACTIVE_RESULT); +// Set keySet = redisTemplate.keys(resultKey + "*"); +// keySet.parallelStream().forEach(key -> { +// // 根据Key获取sessionId +// List keySplits = Func.toStrList(":", key); +// String sessionId = keySplits.get(2); +// // 查询websocket是否存在连接session +// WebSocketSession session = InteractiveSessionManager.get(sessionId); +// if(session == null) { +// return; +// } +// TextMessage message = new TextMessage(JSON.toJSONString(redisTemplate.opsForValue().get(key))); +// Boolean sendResult = wsService.sendMessage(sessionId, message); +// Assert.isTrue(sendResult, () -> { +// throw new ServiceException(key + "推送消息失败,推送消息体为:" + JSON.toJSONString(redisTemplate.opsForValue().get(key))); +// }); +// redisTemplate.delete(key); +// }); +// return ReturnT.SUCCESS; +// } + @XxlJob(GET_INTERACTIVE_RESULT) public ReturnT getInteractiveResult(String params) { Object json = redisTemplate.opsForValue().get(HZIMS_BIGMODEL_ASK_KEY); @@ -85,11 +116,36 @@ public class InteractiveSchedule { @XxlJob(SYNCHRONOUS_VIDEO_INSTRUCT) public ReturnT synchronousVideoInstruct(String params) { + Map request = new HashMap<>(2); + // 获取站点列表 + R> stationsR = stationClient.list(new StationEntity()); + if(!stationsR.isSuccess() || CollectionUtil.isEmpty(stationsR.getData())) { + XxlJobLogger.log("获取站点列表失败!"); + return ReturnT.FAIL; + } + List updateStationList = stationsR.getData().stream().map(station -> { + UpdateStationVO stationVO = new UpdateStationVO(); + stationVO.setId(station.getCode()); + stationVO.setName(station.getName()); + return stationVO; + }).collect(Collectors.toList()); + request.put("stations", updateStationList); + // 获取视频列表 R> videoListR = videoClient.list(new StationVideoTypeEntity()); - if(videoListR.isSuccess()) { - List stationVideoList = videoListR.getData(); - //TODO 同步站点视频指令 + if(!videoListR.isSuccess() || CollectionUtil.isEmpty(videoListR.getData())) { + XxlJobLogger.log("获取视频列表失败!"); + return ReturnT.FAIL; } + List updateUsualList = videoListR.getData().stream().map(video -> { + UpdateUsualVO usualVO = new UpdateUsualVO(); + usualVO.setStationId(video.getStationId()); + usualVO.setId(String.valueOf(video.getId())); + usualVO.setName(video.getName()); + return usualVO; + }).collect(Collectors.toList()); + request.put("videos", updateUsualList); + // 同步指令 + interactiveService.updateVideo(request); return ReturnT.SUCCESS; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationVideoTypeClient.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationVideoTypeClient.java index 5dc44b2..2aadb78 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationVideoTypeClient.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationVideoTypeClient.java @@ -9,10 +9,7 @@ import com.hnac.hzims.operational.station.service.IStationVideoTypeService; import lombok.AllArgsConstructor; import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -38,4 +35,10 @@ public class StationVideoTypeClient implements IStationVideoTypeClient { QueryWrapper queryWrapper = Condition.getQueryWrapper(req); return R.data(stationVideoTypeService.list(queryWrapper)); } + + @Override + @GetMapping(GET_BY_ID) + public R getById(@RequestParam Long id) { + return R.data(stationVideoTypeService.getById(id,0)); + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java index 3862dff..24da4a6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java @@ -81,4 +81,6 @@ public interface IStationVideoTypeService extends BaseService deviceMap.get(c.getString("encodeDevIndexCode")))); } + @Override + public String getRtspAddressByVideo(StationVideoTypeEntity req) { + return null; + } + private HikVideoAreaTreeVO generateAreaTree(Map> videoAreaMapByParent,HikVideoAreaVO area) { HikVideoAreaTreeVO parentTree = BeanUtil.copy(area,HikVideoAreaTreeVO.class); if(CollectionUtil.isNotEmpty(videoAreaMapByParent.get(area.getIndexCode()))) {