Commit 48143440 authored by suhuiguang's avatar suhuiguang

1.摄像头表代码生成

parent fa7bfdc1
package com.yeejoin.amos.boot.biz.common.constants;
/**
* @author Administrator
*/
public class VideoConstant {
public static final String CODE_200 = "200";
public static final String CODE_10001 = "10001";
public static final String CODE_10005 = "10005";
public static final String CODE_10017 = "10017";
public static final String CODE_10030 = "10030";
public static final String CODE_49999 = "49999";
public static final String CODE_201 = "201";
public static final String CODE_401 = "401";
public static final String CODE_403 = "403";
public static final String CODE_404 = "404";
public static final String CODE_20001 = "20001";
}
package com.yeejoin.amos.boot.biz.common.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "CommonVideoDto", description = "通用视频信息")
public class CommonVideoDto {
private String key;
private String url;
private String type;
private String title;
private String thumb;
private String parent;
}
package com.yeejoin.amos.boot.biz.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
*
* <pre>
* 通用视频协议枚举
* </pre>
*
*/
@Getter
@AllArgsConstructor
public enum CommonVideoEnum {
HLS("2", "hls"),
IMG("3", "img");
private String code;
private String name;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static CommonVideoEnum getEnum(String code)
{
for (CommonVideoEnum status : CommonVideoEnum.values())
{
if (status.getCode().equals(code))
{
return status;
}
}
return null;
}
}
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.common.api.entity.BaseEnterpriseVideo;
/** /**
* 单位下摄像头表接口类 * 单位下摄像头表接口类
* *
......
//package com.yeejoin.amos.boot.module.common.api.service;
//
//import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
//
//import java.util.List;
//
///**
// * 数据字典 服务类
// *
// * @author tb
// * @date 2021-06-07
// */
//public interface IDataDictionaryService {
//
//
// Object getFireChemical(String type) throws Exception;
//
// Object gwmcDataDictionary(String type) throws Exception;
//
// List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
//}
...@@ -60,7 +60,7 @@ public class FirefightersContractController extends BaseController { ...@@ -60,7 +60,7 @@ public class FirefightersContractController extends BaseController {
SourceFileServiceImpl sourceFileService; SourceFileServiceImpl sourceFileService;
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time:10800}")
private long time; private long time;
/** /**
* 新增消防员合同 * 新增消防员合同
......
...@@ -63,7 +63,7 @@ public class FirefightersPostController extends BaseController { ...@@ -63,7 +63,7 @@ public class FirefightersPostController extends BaseController {
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time:10800}")
private long time; private long time;
/** /**
......
...@@ -56,7 +56,7 @@ public class FirefightersThoughtController extends BaseController { ...@@ -56,7 +56,7 @@ public class FirefightersThoughtController extends BaseController {
RedisUtils redisUtils; RedisUtils redisUtils;
@Autowired @Autowired
SourceFileServiceImpl sourceFileService; SourceFileServiceImpl sourceFileService;
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time:10800}")
private long time; private long time;
/** /**
* 新增消防员思想谈话记录 * 新增消防员思想谈话记录
......
//package com.yeejoin.amos.boot.module.common.biz.service;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
//
///**
// * @author DELL
// */
//public interface IDutyCarService extends IDutyCommonService {
//
// /**
// * 值班信息保存
// * @param dutyCarDto 对象
// * @return List<DutyCarDto>
// */
// DutyCarDto save(DutyCarDto dutyCarDto);
//
// /**
// * 更新
// * @param instanceId 实例id
// * @param dutyCarDto 业务对象
// * @return List<DutyCarDto>
// */
// DutyCarDto update(Long instanceId, DutyCarDto dutyCarDto);
//}
//package com.yeejoin.amos.boot.module.common.biz.service;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//
//import java.text.ParseException;
//import java.util.List;
//import java.util.Map;
//
///**
// * @author DELL
// */
//public interface IDutyCommonService {
// /**
// * 分页查询
// *
// * @param current 当前页
// * @param size 页大小
// * @param beginDate 开始日期
// * @param endDate 结束日期
// * @return IPage<Map < String, Object>>
// */
// IPage<Map<String, Object>> pageList(int current, int size, String beginDate, String endDate) throws ParseException;
//
// /**
// * 值班明细
// *
// * @param beginDate 开始日期
// * @param endDate 结束日期
// * @return ResponseModel
// */
// List<Map<String, Object>> statisticsDay(String beginDate, String endDate) throws ParseException;
//
// /**
// * 不分页查询
// *
// * @param beginDate 开始日期
// * @param endDate 结束日期
// * @return ResponseModel
// */
// List<Map<String, Object>> list(String beginDate, String endDate) throws ParseException;
//
// /**
// * 获取表单参数
// *
// * @return String
// */
// String getGroupCode();
//
// List downloadList(String beginDate, String endDate) throws ParseException;
//
// /**
// * 值班数据入库
// *
// * @param dataList 数据
// */
// void saveImportData(List<Map<String, Object>> dataList);
//
// /**
// * 删除值班数据
// *
// * @param instanceId 实例id
// * @return Boolean
// */
// Boolean deleteDutyData(Long instanceId);
//
// /**
// * 查询指定条件的值班人信息
// *
// * @param dutyDay 查询条件
// * @param shiftId 班次
// * @param postType 岗位
// * @return List<Map < String, Object>>
// */
// List<Map<String, Object>> dayDutyPersonList(String dutyDay, Long shiftId, String postType);
//
// /**
// * 查询当前值班人信息
// *
// * @return List<Map < String, Object>>
// */
// List<Map<String, Object>> listOnDutyPerson();
//}
//package com.yeejoin.amos.boot.module.common.biz.service;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
//
///**
// * @author DELL
// */
//public interface IDutyPersonService extends IDutyCommonService {
// /**
// * 保存
// *
// * @param dutyPersonDto 业务对象
// * @return List<DutyPersonDto>
// */
// DutyPersonDto save(DutyPersonDto dutyPersonDto);
//
//
// /**
// * 更新
// *
// * @param instanceId 实例id
// * @param dutyPersonDto 业务对象
// * @return List<DutyCarDto>
// */
// DutyPersonDto update(Long instanceId, DutyPersonDto dutyPersonDto);
//}
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.dto.CommonVideoDto;
import com.yeejoin.amos.boot.biz.common.enums.CommonVideoEnum;
import com.yeejoin.amos.boot.module.common.api.entity.BaseEnterpriseVideo; import com.yeejoin.amos.boot.module.common.api.entity.BaseEnterpriseVideo;
import com.yeejoin.amos.boot.module.common.api.mapper.BaseEnterpriseVideoMapper; import com.yeejoin.amos.boot.module.common.api.mapper.BaseEnterpriseVideoMapper;
import com.yeejoin.amos.boot.module.common.api.service.IBaseEnterpriseVideoService; import com.yeejoin.amos.boot.module.common.api.service.IBaseEnterpriseVideoService;
import com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseVideoDto; import com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseVideoDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import static com.yeejoin.amos.boot.biz.common.constants.VideoConstant.*;
import static com.yeejoin.amos.boot.biz.common.constants.VideoConstant.CODE_200;
/** /**
* 单位下摄像头表服务实现类 * 单位下摄像头表服务实现类
* *
...@@ -16,18 +29,104 @@ import java.util.List; ...@@ -16,18 +29,104 @@ import java.util.List;
* @date 2024-10-09 * @date 2024-10-09
*/ */
@Service @Service
@Slf4j
public class BaseEnterpriseVideoServiceImpl extends BaseService<BaseEnterpriseVideoDto,BaseEnterpriseVideo,BaseEnterpriseVideoMapper> implements IBaseEnterpriseVideoService { public class BaseEnterpriseVideoServiceImpl extends BaseService<BaseEnterpriseVideoDto,BaseEnterpriseVideo,BaseEnterpriseVideoMapper> implements IBaseEnterpriseVideoService {
@Value("${cylinder.video.default.image.url:/upload/tzs/cylinder/no-connect.png}")
private String defaultVideoUrl;
public List<CommonVideoDto> getUnitVideoUrl(String useUnitCode) {
List<CommonVideoDto> result = new ArrayList<CommonVideoDto>();
LambdaQueryWrapper<BaseEnterpriseVideo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BaseEnterpriseVideo::getUseUnitCode, useUnitCode);
BaseEnterpriseVideo cylinderUnitVideo = this.getBaseMapper().selectOne(wrapper);
if (null != cylinderUnitVideo) {
HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("appKey", cylinderUnitVideo.getAppKey());
requestInfo.put("appSecret", cylinderUnitVideo.getAppSecret());
String channelNos = cylinderUnitVideo.getChannelNo();
List<CommonVideoDto> channelNoList = JSONObject.parseArray(channelNos, CommonVideoDto.class);
try {
String accessTokenData = HttpUtil.post(cylinderUnitVideo.getTokenUrl(), requestInfo);
JSONObject jsonObject = JSON.parseObject(accessTokenData);
String msg = jsonObject.get("msg").toString();
String code = jsonObject.get("code").toString();
if (CODE_10001.equals(code) || CODE_10005.equals(code) || CODE_10017.equals(code) || CODE_10030.equals(code) || CODE_49999.equals(code)) {
String errorMsg = "code:" + code + "msg:" + msg + "appKey:" + cylinderUnitVideo.getAppKey() + "appSecret:" + cylinderUnitVideo.getAppSecret();
log.info("视频token获取失败errorMsg:{}", errorMsg);
this.setDefaultVideoIfConnectFailed(channelNoList, result);
return result;
}
if (CODE_200.equals(code)) {
String data = jsonObject.get("data").toString();
JSONObject objTokenJson = JSON.parseObject(data);
String accessToken = objTokenJson.get("accessToken").toString();
System.out.println(accessToken);
for (CommonVideoDto channelNo : channelNoList) {
HashMap<String, Object> requestVideosInfo = new HashMap<>();
requestVideosInfo.put("accessToken", accessToken);
requestVideosInfo.put("deviceSerial", cylinderUnitVideo.getDeviceSerial());
requestVideosInfo.put("channelNo", channelNo.getKey());
requestVideosInfo.put("protocol", cylinderUnitVideo.getProtocol());
requestVideosInfo.put("expireTime", cylinderUnitVideo.getExpireTime());
String videoData = HttpUtil.post(cylinderUnitVideo.getUrl(), requestVideosInfo);
JSONObject videoJsonObject = JSON.parseObject(videoData);
String msgVideo = videoJsonObject.get("msg").toString();
String codeVideo = videoJsonObject.get("code").toString();
if (CODE_201.equals(codeVideo) || CODE_401.equals(codeVideo) || CODE_403.equals(codeVideo) || CODE_404.equals(codeVideo) || CODE_20001.equals(codeVideo)) {
String errorMsg = "code:" + codeVideo + "msg:" + msgVideo + "appKey:" + cylinderUnitVideo.getAppKey() + "appSecret:" + cylinderUnitVideo.getAppSecret() + "accessToken:" + accessToken;
log.info("视频地址获取失败errorMsg:{}", errorMsg);
this.setDefaultChannelData(result, channelNo);
continue;
}
if (CODE_200.equals(codeVideo)) {
String dataS = videoJsonObject.get("data").toString();
JSONObject dd = JSON.parseObject(dataS);
String url = dd.get("url").toString();
CommonVideoDto commonVideoDto = new CommonVideoDto();
commonVideoDto.setUrl(url);
commonVideoDto.setKey(channelNo.getKey());
commonVideoDto.setType(CommonVideoEnum.getEnum(cylinderUnitVideo.getProtocol()).getName());
commonVideoDto.setTitle(channelNo.getTitle());
commonVideoDto.setThumb(channelNo.getThumb());
result.add(commonVideoDto);
}
}
}
} catch (Exception e) {
log.error(e.getMessage());
this.setDefaultVideoIfConnectFailed(channelNoList, result);
}
}
return result;
}
/** /**
* 分页查询 * 通道连接不上时,返回通道的默认图片
*
* @param result 返回连接的总通道
* @param channelNo 未连接的通道
*/ */
public Page<BaseEnterpriseVideoDto> queryForBaseEnterpriseVideoPage(Page<BaseEnterpriseVideoDto> page) { private void setDefaultChannelData(List<CommonVideoDto> result, CommonVideoDto channelNo) {
return this.queryForPage(page, null, false); CommonVideoDto commonVideoDto = new CommonVideoDto();
commonVideoDto.setUrl(channelNo.getThumb());
commonVideoDto.setKey(channelNo.getKey());
commonVideoDto.setType(CommonVideoEnum.IMG.getName());
commonVideoDto.setTitle(channelNo.getTitle());
commonVideoDto.setThumb(channelNo.getThumb());
result.add(commonVideoDto);
} }
/** /**
* 列表查询 示例 * 连接不上时返回的气通道信息
*
* @param commonVideoDtos 当前气瓶单位的所有通道
* @param result 返回的结果集合
*/ */
public List<BaseEnterpriseVideoDto> queryForBaseEnterpriseVideoList() { private void setDefaultVideoIfConnectFailed(List<CommonVideoDto> commonVideoDtos, List<CommonVideoDto> result) {
return this.queryForList("" , false); // 先情况防止数据重复
result.clear();
// 每个通道设备默认值
commonVideoDtos.forEach(channelNo -> this.setDefaultChannelData(result, channelNo));
} }
} }
\ No newline at end of file
//package com.yeejoin.amos.boot.module.common.biz.service.impl;
//
//
//import com.alibaba.fastjson.JSON;
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.yeejoin.amos.boot.biz.common.utils.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DataDictionaryDto;
//import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//import com.yeejoin.amos.boot.module.common.api.mapper.DataDictionaryMapper;
//import com.yeejoin.amos.boot.module.common.api.service.IDataDictionaryService;
//import org.typroject.tyboot.core.restful.utils.ResponseHelper;
//
//import java.util.Collection;
//import java.util.List;
//
///**
// * 数据字典 服务实现类
// *
// * @author tb
// * @date 2021-06-07
// */
//@Service
//public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, DataDictionary, DataDictionaryMapper> implements IDataDictionaryService {
// @Autowired
// RedisUtils redisUtils;
//
// @Value("${redis.cache.failure.time}")
// private long time;
//
//
// @Override
// public Object getFireChemical(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
// Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
// return obj;
// } else {
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
// "getName", "getParent", null);
// MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
// Me.setIsLeaf(false);
// Me.setChildren(menus);
// redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(Me), time);
// return Me;
// }
// }
//
// @Override
// public Object gwmcDataDictionary(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
// Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
// return obj;
// } else {
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
// redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
// return menus;
// }
// }
//
// public List<MenuFrom> getGWMCDataDictionary(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
// return menus;
//
// }
//}
...@@ -66,7 +66,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire ...@@ -66,7 +66,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Value("${fire-rescue}") @Value("${fire-rescue:1432549862557130753}")
private String fireRescueId; private String fireRescueId;
......
package com.yeejoin.amos.boot.module.statistics.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
/**
* @author Administrator
*/
@Data
public class UnitVideoDto extends BaseDto {
private String id;
private String name;
private String code;
private Long countNum;
}
package com.yeejoin.amos.boot.module.statistics.api.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author Administrator
* 树节点
*/
@Data
@ApiModel(value = "树节点")
public class TreeNodeVo {
@ApiParam(value = "节点唯一标识")
private String id;
@ApiParam(value = "节点名称")
private String name;
@ApiParam(value = "节点类型")
private String nodeType;
@ApiParam(value = "父id")
private String parentId;
@ApiParam(value = "节点code")
private String code;
@ApiParam(value = "字节点")
private List<TreeNodeVo> children = new ArrayList<>();
}
...@@ -30,9 +30,10 @@ import java.net.UnknownHostException; ...@@ -30,9 +30,10 @@ import java.net.UnknownHostException;
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableFeignClients @EnableFeignClients
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
@MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*", @MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*", "org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.module.**.api.service", "com.yeejoin.amos.boot.module.**.api.mapper",
"com.yeejoin.amos.boot.biz.common.dao.mapper"}) "com.yeejoin.amos.boot.biz.common.dao.mapper"})
@ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"}) @ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class AmosStatisticsApplication { public class AmosStatisticsApplication {
......
package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.biz.common.dto.CommonVideoDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.VideoServiceImpl;
import com.yeejoin.amos.boot.module.statistics.api.vo.TreeNodeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
/**
* @author suhuiguang
*/
@RestController
@Api(tags = "摄像头相关api")
@RequestMapping("/video")
public class VideoController {
private VideoServiceImpl videoService;
public VideoController(VideoServiceImpl videoService) {
this.videoService = videoService;
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "区域、单位、摄像头3级树接口", httpMethod = "POST")
@PostMapping(value = "/tree")
public ResponseModel<List<TreeNodeVo>> getVideoTree(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
List<TreeNodeVo> re = videoService.getVideoTree(dpFilterParamDto);
return ResponseHelper.buildResponse(re);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询指定区域下的单位列表接口,带摄像头数量统计-不分页", httpMethod = "GET")
@GetMapping(value = "/countByUnit")
public ResponseModel<List<? extends BaseDto>> getUnitList(@RequestParam(value = "code") String regionCode) {
List<? extends BaseDto> re = videoService.getUnitList(regionCode);
return ResponseHelper.buildResponse(re);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询指定单位下的摄像头列表接口-不分页", httpMethod = "GET")
@GetMapping(value = "/list")
public ResponseModel<List<CommonVideoDto>> getVideoList(@RequestParam(value = "code") String useUnitCode) {
List<CommonVideoDto> re = videoService.getVideoList(useUnitCode);
return ResponseHelper.buildResponse(re);
}
}
...@@ -99,6 +99,10 @@ public class StCommonServiceImpl { ...@@ -99,6 +99,10 @@ public class StCommonServiceImpl {
initReginCode(); initReginCode();
} }
public List<RegionModel> getRegionModels(){
return regionModels;
}
private void initReginCode() { private void initReginCode() {
Collection<RegionModel> result = Systemctl.regionClient.queryForTree(null).getResult(); Collection<RegionModel> result = Systemctl.regionClient.queryForTree(null).getResult();
result.forEach(r -> { result.forEach(r -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment