Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 12 months ago
parent
commit
5add3d24a1
  1. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java
  2. 15
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java

@ -215,11 +215,12 @@ public class StationVideoTypeController extends BladeController {
public R<List<JSONObject>> getHikVisionStations() { public R<List<JSONObject>> getHikVisionStations() {
return R.data(stationVideoTypeService.getHikVisionStations()); return R.data(stationVideoTypeService.getHikVisionStations());
} }
@ApiLog @ApiLog
@GetMapping("/getHikVideo") @GetMapping("/getFlvVideos")
@ApiOperationSupport(order = 120) @ApiOperationSupport(order = 120)
@ApiOperation(value = "获取海康视频区域列表", notes = "获取海康视频区域列表") @ApiOperation(value = "获取海康视频区域列表", notes = "获取海康视频区域列表")
public R getVideoMonitor(StationVideoTypeEntity req,Query query) { public R getFlvVideos(StationVideoTypeEntity req,Query query) {
LambdaQueryWrapper<StationVideoTypeEntity> queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(StationVideoTypeEntity.class, req); LambdaQueryWrapper<StationVideoTypeEntity> queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(StationVideoTypeEntity.class, req);
IPage<StationVideoTypeEntity> page = stationVideoTypeService.page(com.hnac.hzims.common.utils.Condition.getPage(query), queryWrapper); IPage<StationVideoTypeEntity> page = stationVideoTypeService.page(com.hnac.hzims.common.utils.Condition.getPage(query), queryWrapper);
Consumer<StationVideoTypeEntity> getFlvVideo = video -> { Consumer<StationVideoTypeEntity> getFlvVideo = video -> {

15
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

@ -48,6 +48,21 @@ public class ObjectUtils {
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"second",time.getSecond()); result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"second",time.getSecond());
} }
} }
else if(value instanceof Date) {
DateTimeToMap dateTimeToMap = field.getAnnotation(DateTimeToMap.class);
Date time = (Date) value;
if(ObjectUtil.isEmpty(dateTimeToMap)) {
result.put(field.getName(),DateUtil.format(time,DateUtil.PATTERN_DATETIME));
}
else {
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"year",time.getYear());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"month",time.getMonth());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"day",time.getDay());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"hour",time.getHours());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"minute",time.getMinutes());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"second",time.getSeconds());
}
}
}); });
return result; return result;
} }

Loading…
Cancel
Save