|
|
|
@ -3,6 +3,7 @@ package com.hnac.hzims.operational.station.controller;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
@ -11,10 +12,12 @@ import com.hnac.hzims.common.logs.enums.OperatorType;
|
|
|
|
|
import com.hnac.hzims.operational.station.dto.StationVideoTypeDTO; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.VideoConfigEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.response.HikDeviceResp; |
|
|
|
|
import com.hnac.hzims.operational.station.response.HikMonitorResp; |
|
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
|
import com.hnac.hzims.operational.station.service.IStationVideoTypeService; |
|
|
|
|
import com.hnac.hzims.operational.station.service.VideoConfigService; |
|
|
|
|
import com.hnac.hzims.operational.station.utils.ArtemisPostUtils; |
|
|
|
|
import com.hnac.hzims.operational.station.vo.StationVO; |
|
|
|
|
import com.hnac.hzims.operational.station.vo.StationVideoTypeVO; |
|
|
|
@ -56,6 +59,7 @@ public class StationVideoTypeController extends BladeController {
|
|
|
|
|
private final ISysClient sysClient; |
|
|
|
|
|
|
|
|
|
private final IStationService stationService; |
|
|
|
|
private final VideoConfigService videoConfigService; |
|
|
|
|
|
|
|
|
|
/** 秘钥appKey **/ |
|
|
|
|
@Value("${hzims.videoProperties.appKey}") |
|
|
|
@ -233,6 +237,43 @@ public class StationVideoTypeController extends BladeController {
|
|
|
|
|
page.getRecords().forEach(getFlvVideo); |
|
|
|
|
return R.data(page); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiLog |
|
|
|
|
@GetMapping("/getFlvVideoConfig") |
|
|
|
|
@ApiOperationSupport(order = 120) |
|
|
|
|
@ApiOperation(value = "获取Flv配置列表", notes = "获取Flv配置列表") |
|
|
|
|
public R getFlvVideoConfig(VideoConfigEntity req,Query query) { |
|
|
|
|
LambdaQueryWrapper<VideoConfigEntity> queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(VideoConfigEntity.class, req); |
|
|
|
|
IPage<VideoConfigEntity> page = videoConfigService.page(com.hnac.hzims.common.utils.Condition.getPage(query), queryWrapper); |
|
|
|
|
return R.data(page); |
|
|
|
|
} |
|
|
|
|
@ApiLog |
|
|
|
|
@PostMapping ("/updateFlvVideoConfig") |
|
|
|
|
@ApiOperationSupport(order = 120) |
|
|
|
|
@ApiOperation(value = "更新Flv配置列表", notes = "更新Flv配置列表") |
|
|
|
|
public R updateFlvVideoConfig(@RequestBody VideoConfigEntity req) { |
|
|
|
|
if (ObjectUtil.isNotEmpty(req)) { |
|
|
|
|
boolean b = videoConfigService.saveOrUpdate(req); |
|
|
|
|
if (b) { |
|
|
|
|
return R.success("更新视频配置成功"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return R.fail("更新视频配置失败"); |
|
|
|
|
} |
|
|
|
|
@ApiLog |
|
|
|
|
@PostMapping("/deleteFlvVideoConfig") |
|
|
|
|
@ApiOperationSupport(order = 120) |
|
|
|
|
@ApiOperation(value = "删除Flv配置列表", notes = "删除Flv配置列表") |
|
|
|
|
public R deleteFlvVideoConfig(@RequestBody List<String> ids) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(ids)) { |
|
|
|
|
boolean flag = videoConfigService.removeByIds(ids); |
|
|
|
|
if (flag) { |
|
|
|
|
return R.success("删除成功"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return R.fail("删除失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiLog |
|
|
|
|
@GetMapping("/getMonitorsByStation") |
|
|
|
|
@ApiOperationSupport(order = 130) |
|
|
|
|