|  |  |  | 
|---|
|  |  |  | import com.doumee.core.haikang.model.param.request.event.parks.EventPlatformRequest; | 
|---|
|  |  |  | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitIccmRequest; | 
|---|
|  |  |  | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; | 
|---|
|  |  |  | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; | 
|---|
|  |  |  | import com.doumee.core.haikang.service.HKService; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.dao.web.response.platformReport.CarmeraListVO; | 
|---|
|  |  |  | import com.doumee.service.business.third.BoardService; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DESUtil; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Device; | 
|---|
|  |  |  | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import springfox.documentation.annotations.Cacheable; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | private HkSyncPlatformsServiceImpl hkSyncPlatformsService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private HkSyncDeviceServiceImpl hkSyncDeviceService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private BoardService boardService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private HkSyncParkServiceImpl hkSyncParkService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | String hkToken = DESUtil.generateTokenToHk(loginUserInfo.getUsername(),Integer.valueOf( | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_TOKEN_VALIDITY).getCode() | 
|---|
|  |  |  | ),redisTemplate); | 
|---|
|  |  |  | String url = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HTTPS).getCode() + | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HOST).getCode() | 
|---|
|  |  |  | String url = (systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HTTPS).getCode() + | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HOST).getCode()) | 
|---|
|  |  |  | + HKService.getMenuUrl(type,hkToken); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | if(redisTemplate!=null&& jwtProperties!=null){ | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(result); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("【海康】获取全部监控区域树形结构") | 
|---|
|  |  |  | @PostMapping("/regionList") | 
|---|
|  |  |  | public ApiResponse<List<PageRegionInfoResponse> > getRegionList(HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token ){ | 
|---|
|  |  |  | CarmeraListVO param  =new CarmeraListVO(); | 
|---|
|  |  |  | param.setWithCameras(0); | 
|---|
|  |  |  | List<PageRegionInfoResponse>  result = new ArrayList<>(); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | //            result = boardService.getRegionTree( param); | 
|---|
|  |  |  | //------TODO---------测试模拟数据----start----- | 
|---|
|  |  |  | for (int i = 0; i < 5; i++) { | 
|---|
|  |  |  | PageRegionInfoResponse t = new PageRegionInfoResponse(); | 
|---|
|  |  |  | t.setName("总区域_"+i); | 
|---|
|  |  |  | t.setIndexCode(i+"_code"); | 
|---|
|  |  |  | t.setChildList(new ArrayList<>()); | 
|---|
|  |  |  | for (int j = 0; j < 5; j++) { | 
|---|
|  |  |  | PageRegionInfoResponse t1 = new PageRegionInfoResponse(); | 
|---|
|  |  |  | t1.setName("子区域_"+i+"_"+j); | 
|---|
|  |  |  | t1.setIndexCode(i+"_"+j+"_ChildCode"); | 
|---|
|  |  |  | t1.setParentIndexCode(t.getIndexCode()); | 
|---|
|  |  |  | t.getChildList().add(t1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | result.add(t); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //------TODO---------测试模拟数据----end----- | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ApiResponse.success(result); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("【海康】设置LED屏文案") | 
|---|