1.冀北电网一张图

This commit is contained in:
wr
2024-05-04 18:44:26 +08:00
parent 5bd554172b
commit 5c613089e5
13 changed files with 198 additions and 54 deletions

View File

@@ -3,6 +3,7 @@ package com.njcn.event.controller.majornetwork;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pq.pojo.param.GridDiagramParam;
@@ -10,6 +11,7 @@ import com.njcn.device.pq.pojo.vo.GridDiagramVO;
import com.njcn.event.pojo.vo.EventDetailVO;
import com.njcn.event.service.majornetwork.RmpEventDetailService;
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -51,4 +53,13 @@ public class GridDiagramEventController extends BaseController {
List<EventDetailVO> eventDetailByList = rmpEventDetailService.getEventDetailByList(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventDetailByList, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getEventDetailByLineId")
@ApiOperation("根据监测点获取暂态短时中断和暂态赞升暂降")
public HttpResult<RMpEventDetailMPO> getEventDetailByLineId(@RequestBody StatisticsBizBaseParam param) {
String methodDescribe = getMethodDescribe("getEventDetailByLineId");
RMpEventDetailMPO eventDetailByLine = rmpEventDetailService.getEventDetailByLine(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventDetailByLine, methodDescribe);
}
}

View File

@@ -0,0 +1,16 @@
package com.njcn.event.mapper.majornetwork;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
/**
* <p>
* 监测点暂态指标超标明细月表 Mapper 接口
* </p>
*
* @author wr
* @since 2024-05-04
*/
public interface RMpEventDetailMMapper extends BaseMapper<RMpEventDetailMPO> {
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.event.mapper.majornetwork.RMpEventDetailMMapper">
</mapper>

View File

@@ -163,17 +163,19 @@ public class ReportServiceImpl implements ReportService {
//查区域
List<GeneralDeviceDTO> data = generalDeviceInfoClient.getPracticalAllDeviceInfo(businessParam).getData();
List<String> lineIds = data.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
List<GeneralVO> generalVOS = new ArrayList<>();
if(CollUtil.isNotEmpty(lineIds)){
HashMap<String, Object> condMap = new HashMap<>();
condMap.put("startTime", DateUtil.beginOfDay(DateUtil.parse(businessParam.getSearchBeginTime())).toString());
condMap.put("endTime", DateUtil.endOfDay(DateUtil.parse(businessParam.getSearchEndTime())).toString());
condMap.put("ids", lineIds);
condMap.put(DicDataEnum.VOLTAGE_DIP.getCode(), dictMap.get(DicDataEnum.VOLTAGE_DIP.getCode())); //电压暂降
condMap.put(DicDataEnum.SHORT_INTERRUPTIONS.getCode(), dictMap.get(DicDataEnum.SHORT_INTERRUPTIONS.getCode())); //短时中断
condMap.put(DicDataEnum.VOLTAGE_RISE.getCode(), dictMap.get(DicDataEnum.VOLTAGE_RISE.getCode())); //电压暂升
//根据id把所有的数据查询出来
generalVOS = eventDetailMapper.ListEventType(condMap);
}
HashMap<String, Object> condMap = new HashMap<>();
condMap.put("startTime", DateUtil.beginOfDay(DateUtil.parse(businessParam.getSearchBeginTime())).toString());
condMap.put("endTime", DateUtil.endOfDay(DateUtil.parse(businessParam.getSearchEndTime())).toString());
condMap.put("ids", lineIds);
condMap.put(DicDataEnum.VOLTAGE_DIP.getCode(), dictMap.get(DicDataEnum.VOLTAGE_DIP.getCode())); //电压暂降
condMap.put(DicDataEnum.SHORT_INTERRUPTIONS.getCode(), dictMap.get(DicDataEnum.SHORT_INTERRUPTIONS.getCode())); //短时中断
condMap.put(DicDataEnum.VOLTAGE_RISE.getCode(), dictMap.get(DicDataEnum.VOLTAGE_RISE.getCode())); //电压暂升
//根据id把所有的数据查询出来
List<GeneralVO> generalVOS = eventDetailMapper.ListEventType(condMap);
GeneralVO generalVO;
List<GeneralVO> list = new ArrayList<>();

View File

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.dto.SimpleDTO;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
@@ -32,6 +33,7 @@ import com.njcn.device.pq.pojo.param.GridDiagramParam;
import com.njcn.device.pq.pojo.vo.AreaLineInfoVO;
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
import com.njcn.event.enums.EventResponseEnum;
import com.njcn.event.mapper.majornetwork.RMpEventDetailMMapper;
import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
import com.njcn.event.pojo.param.UniversalFrontEndParam;
import com.njcn.event.pojo.po.RmpEventDetailPO;
@@ -39,6 +41,7 @@ import com.njcn.event.pojo.vo.*;
import com.njcn.event.service.majornetwork.EventDetailService;
import com.njcn.event.service.majornetwork.RmpEventDetailService;
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.enums.DicDataEnum;
import com.njcn.system.enums.DicDataTypeEnum;
@@ -86,6 +89,9 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
private final GeneralDeviceInfoClient generalDeviceInfoClient;
private final CommTerminalGeneralClient commTerminalGeneralClient;
private final RMpEventDetailMMapper eventDetailMMapper;
/**
* 获取暂态事件明细
*
@@ -378,6 +384,16 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
return info;
}
@Override
public RMpEventDetailMPO getEventDetailByLine(StatisticsBizBaseParam param) {
RMpEventDetailMPO rMpEventDetailMPO = eventDetailMMapper.selectOne(new LambdaQueryWrapper<RMpEventDetailMPO>()
.eq(RMpEventDetailMPO::getMeasurementPointId, param.getId())
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpEventDetailMPO::getDataDate, DateUtil.beginOfDay(DateUtil.parse(param.getStartTime())))
.le(StrUtil.isNotBlank(param.getEndTime()), RMpEventDetailMPO::getDataDate, DateUtil.endOfDay(DateUtil.parse(param.getEndTime())))
);
return rMpEventDetailMPO;
}
private Double setData(GridDiagramVO gridDiagramVO, List<String> gwLineAllIds, List<RmpEventDetailPO> list) {
List<Double> asGwDouble = list.stream()

View File

@@ -2,6 +2,7 @@ package com.njcn.event.service.majornetwork;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.device.pq.pojo.param.GridDiagramParam;
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
import com.njcn.event.pojo.param.UniversalFrontEndParam;
@@ -10,6 +11,7 @@ import com.njcn.event.pojo.vo.AdvanceEventDetailVO;
import com.njcn.event.pojo.vo.EventDetailVO;
import com.njcn.event.pojo.vo.RmpEventDetailVO;
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.system.pojo.po.DictData;
import com.njcn.web.pojo.param.BaseParam;
@@ -62,4 +64,13 @@ public interface RmpEventDetailService extends IService<RmpEventDetailPO> {
GridDiagramVO getEventLevelEvaluation(StatSubstationBizBaseParam param);
List<EventDetailVO> getEventDetailByList(GridDiagramParam param);
/**
* @Description: 根据监测点获取暂态短时中断和暂态赞升暂降
* @param param
* @return: java.util.List<java.lang.String>
* @Author: wr
* @Date: 2024/5/4 17:08
*/
RMpEventDetailMPO getEventDetailByLine(StatisticsBizBaseParam param);
}