liwen 10 months ago
parent
commit
2f51b73e99
  1. 2
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java
  2. 5
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java
  3. 4
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java
  4. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java
  5. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java
  6. 17
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java
  7. 5
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/AlarmTabulateService.java
  8. 69
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java
  9. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  10. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java
  11. 15
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java
  12. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java

2
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java

@ -60,4 +60,6 @@ public interface AlarmConstants {
Integer STOP = 61; Integer STOP = 61;
List<Integer> START_STOP_ALARAM = Arrays.asList(START,STOP); List<Integer> START_STOP_ALARAM = Arrays.asList(START,STOP);
String VIDEO_SCHEDULED_TASK= "VideoScheduledTask"; String VIDEO_SCHEDULED_TASK= "VideoScheduledTask";
List<String> HZ3000_TYPES = Arrays.asList("0","1","2","3","4","5","6","7","8","9","10","11","12");
} }

5
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java

@ -3,6 +3,8 @@ package com.hnac.hzims.alarm.tabulate.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @author ysj * @author ysj
*/ */
@ -26,4 +28,7 @@ public class TabulateLevelVo {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private Integer soeType; private Integer soeType;
@ApiModelProperty(value = "告警类型")
private String types;
} }

4
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java

@ -417,8 +417,8 @@ public class EmInfoController extends BladeController {
@GetMapping("/hkVideoDevices") @GetMapping("/hkVideoDevices")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@ApiOperation(value = "海康视频设备获取") @ApiOperation(value = "海康视频设备获取")
public R<List<EmInfoEntity>> hkVideoDevices() { public R<List<EmInfoEntity>> hkVideoDevices(@RequestParam("deptId") Long deptId) {
return R.data(em_infoService.hkVideoDevices()); return R.data(em_infoService.hkVideoDevices(deptId));
} }
@GetMapping("/select") @GetMapping("/select")

2
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java

@ -91,7 +91,7 @@ public interface IEmInfoService extends BaseService<EmInfoEntity> {
List<EmInfoEntity> getVideoDeviceByEmCode(EmInfoEntity emInfo); List<EmInfoEntity> getVideoDeviceByEmCode(EmInfoEntity emInfo);
List<EmInfoEntity> hkVideoDevices(); List<EmInfoEntity> hkVideoDevices(Long deptId);
List<EmInfoEntity> deviceByPath(String emCode); List<EmInfoEntity> deviceByPath(String emCode);

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java

@ -966,9 +966,13 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
* @return * @return
*/ */
@Override @Override
public List<EmInfoEntity> hkVideoDevices() { public List<EmInfoEntity> hkVideoDevices(Long deptId) {
return this.list(Wrappers.<EmInfoEntity>lambdaQuery() QueryWrapper<EmInfoEntity> queryWrapper= new QueryWrapper<>();
.eq(EmInfoEntity::getEmType,4)); queryWrapper.lambda().eq(EmInfoEntity::getEmType,4);
if(ObjectUtil.isNotEmpty(deptId)){
queryWrapper.lambda().eq(EmInfoEntity::getDepartment,deptId);
}
return this.list(queryWrapper);
} }
/** /**

17
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java

@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService; import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService;
import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo;
import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO; import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -31,7 +32,7 @@ public class AlarmTabulateController extends BladeController {
@GetMapping("/early") @GetMapping("/early")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "智能预警", notes = "传入查询参数") @ApiOperation(value = "FDP智能预警", notes = "传入查询参数")
public R<IPage<StbAnalysisVO>> early(TabulateEarlyVo param, Query query) { public R<IPage<StbAnalysisVO>> early(TabulateEarlyVo param, Query query) {
return R.data(tabulateService.early(Condition.getPage(query), param)); return R.data(tabulateService.early(Condition.getPage(query), param));
} }
@ -42,4 +43,18 @@ public class AlarmTabulateController extends BladeController {
public R<IPage<Object>> level(TabulateLevelVo param, Query query) { public R<IPage<Object>> level(TabulateLevelVo param, Query query) {
return R.data(tabulateService.level(Condition.getPage(query), param)); return R.data(tabulateService.level(Condition.getPage(query), param));
} }
@GetMapping("/video")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "视频告警(海康)", notes = "视频告警(海康)")
public R<IPage<Object>> video(TabulateLevelVo param, Query query) {
return R.data(tabulateService.video(Condition.getPage(query), param));
}
@GetMapping("/hz3000")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "hz3000告警", notes = "hz3000告警")
public R<IPage<SoeData>> hz3000(TabulateLevelVo param, Query query) {
return R.data(tabulateService.hz3000(Condition.getPage(query), param));
}
} }

5
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/AlarmTabulateService.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo;
import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO; import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -15,4 +16,8 @@ public interface AlarmTabulateService {
IPage<StbAnalysisVO> early(IPage<StbAnalysisVO> page, TabulateEarlyVo param); IPage<StbAnalysisVO> early(IPage<StbAnalysisVO> page, TabulateEarlyVo param);
IPage<Object> level(IPage<Object> page, TabulateLevelVo param); IPage<Object> level(IPage<Object> page, TabulateLevelVo param);
IPage<Object> video(IPage<Object> page, TabulateLevelVo param);
IPage<SoeData> hz3000(IPage<SoeData> page, TabulateLevelVo param);
} }

69
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java

@ -1,9 +1,13 @@
package com.hnac.hzims.alarm.tabulate.service.impl; package com.hnac.hzims.alarm.tabulate.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.alarm.config.constants.AlarmConstants;
import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService; import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService;
import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo;
import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo;
import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient; import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient;
@ -13,15 +17,12 @@ import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.*;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.lang.reflect.Array;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Map;
/** /**
* @author ysj * @author ysj
@ -31,6 +32,8 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
public class AlarmTabulateServiceImpl implements AlarmTabulateService { public class AlarmTabulateServiceImpl implements AlarmTabulateService {
private final ISoeClient soeClient;
private final SoeDataClient soeDataClient; private final SoeDataClient soeDataClient;
private final DeviceDataClient deviceDataClient; private final DeviceDataClient deviceDataClient;
@ -51,7 +54,7 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService {
param.setEndTime(LocalDateTime.parse(tabulateEarly.getEndTime(), DateUtil.DATETIME_FORMATTER)); param.setEndTime(LocalDateTime.parse(tabulateEarly.getEndTime(), DateUtil.DATETIME_FORMATTER));
} }
param.setPage((int) page.getCurrent()); param.setPage((int) page.getCurrent());
param.setStation(tabulateEarly.getStationCode()); param.setStations(Collections.singletonList(tabulateEarly.getStationCode()));
param.setPageSize((int) page.getSize()); param.setPageSize((int) page.getSize());
Result<HzPage<StbAnalysisVO>> result = soeDataClient.pageStbAnalysis(param); Result<HzPage<StbAnalysisVO>> result = soeDataClient.pageStbAnalysis(param);
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData().getRecords())){ if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData().getRecords())){
@ -82,4 +85,56 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService {
page.setRecords((List<Object>) data.get("data")); page.setRecords((List<Object>) data.get("data"));
return page; return page;
} }
/**
* 视频告警
* @param page
* @param param
* @return
*/
@Override
public IPage<Object> video(IPage<Object> page, TabulateLevelVo param) {
Result<Map<String, Object>> result = deviceDataClient.getDeviceSoeData(param.getProjectId(),param.getDimension(),param.getId(),param.getSoeType(),param.getStartTime(),param.getEndTime(),
true,(int) page.getCurrent(),(int)page.getSize());
if(!result.isSuccess() || MapUtils.isEmpty(result.getData())){
return page;
}
Map<String,Object> data = result.getData();
page.setTotal((Long) data.get("total"));
page.setRecords((List<Object>) data.get("data"));
return page;
}
/**
* HZ3000告警
* @param page
* @param param
* @return
*/
@Override
public IPage<SoeData> hz3000(IPage<SoeData> page, TabulateLevelVo param) {
SoeQueryConditionByStation query = new SoeQueryConditionByStation();
query.setNeedPage(true);
query.setPage((int) page.getCurrent());
query.setLimit((int) page.getSize());
query.setStationIds(Collections.singletonList(param.getProjectId()));
if(StringUtil.isNotBlank(param.getTypes())){
query.setTypes(Func.toStrList(",",param.getTypes()));
}else {
query.setTypes(AlarmConstants.HZ3000_TYPES);
}
if(StringUtil.isNotBlank(param.getStartTime())){
query.setBeginTime(LocalDateTime.parse(param.getStartTime(),DateUtil.DATETIME_FORMATTER));
}
if(StringUtil.isNotBlank(param.getEndTime())){
query.setEndTime(LocalDateTime.parse(param.getEndTime(), DateUtil.DATETIME_FORMATTER));
}
Result<HzPage<SoeData>> result = soeClient.getByStationsAndTime(query);
if(!result.isSuccess() || ObjectUtil.isEmpty(result.getData()) || CollectionUtil.isEmpty(result.getData().getRecords())){
return page;
}
page.setTotal(result.getData().getTotal());
page.setRecords(result.getData().getRecords());
return page;
}
} }

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java

@ -199,4 +199,12 @@ public class StationController extends BladeController {
public R<List<StationEntity>> select(@RequestParam(value = "type", required = false) Integer type, @RequestParam(value = "serveType", required = false) Integer serveType) { public R<List<StationEntity>> select(@RequestParam(value = "type", required = false) Integer type, @RequestParam(value = "serveType", required = false) Integer serveType) {
return R.data(stationService.select(type, serveType)); return R.data(stationService.select(type, serveType));
} }
@ApiLog
@GetMapping("/accessHydropower")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "接入水电站点列表查询", notes = "")
public R<List<StationEntity>> accessHydropower() {
return R.data(stationService.accessHydropower());
}
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java

@ -127,4 +127,6 @@ public interface IStationService extends BaseService<StationEntity> {
@Override @Override
boolean updateById(StationEntity req); boolean updateById(StationEntity req);
List<StationEntity> accessHydropower();
} }

15
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.operational.station.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.fdp.feign.IQuestionClient; import com.hnac.hzims.fdp.feign.IQuestionClient;
@ -52,7 +53,6 @@ import org.springframework.util.Assert;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask; import java.util.concurrent.FutureTask;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -730,6 +730,19 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
} }
/** /**
* 接入水电站点查询
* @return
*/
@Override
public List<StationEntity> accessHydropower() {
QueryWrapper<StationEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StationEntity::getDataOrigin,HomePageConstant.DATA_ORIGIN);
queryWrapper.lambda().eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE);
queryWrapper.lambda().eq(StationEntity::getType,HomePageConstant.HYDROPOWER);
return this.list(queryWrapper);
}
/**
* 删除新建站点时绑定的数据项目智能诊断站点 * 删除新建站点时绑定的数据项目智能诊断站点
* *
* @param idList id集合 * @param idList id集合

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java

@ -179,6 +179,9 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ if(ObjectUtil.isNotEmpty(workTask.getGroupId())){
wrapper.eq("CREATE_DEPT",workTask.getDeptId()); wrapper.eq("CREATE_DEPT",workTask.getDeptId());
} }
if(ObjectUtil.isNotEmpty(workTask.getTaskName())){
wrapper.eq("TASK_NAME",workTask.getTaskName());
}
return super.page(page, wrapper); return super.page(page, wrapper);
} }

Loading…
Cancel
Save