1.修改全景稳态告警数据不一致问题 2.初步修改在线监测功能
This commit is contained in:
@@ -51,6 +51,9 @@ public interface CommTerminalGeneralClient {
|
|||||||
@PostMapping("deptGetLine")
|
@PostMapping("deptGetLine")
|
||||||
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
@PostMapping("deptGetAllLine")
|
||||||
|
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetAllLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ public class CommTerminalGeneralClientFallbackFactory implements FallbackFactory
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<DeptGetChildrenMoreDTO>> deptGetAllLine(DeptGetLineParam deptGetLineParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据单位获取all监测点信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<DeptGetSubStationDTO>> deptSubStation(DeptGetLineParam deptGetLineParam) {
|
public HttpResult<List<DeptGetSubStationDTO>> deptSubStation(DeptGetLineParam deptGetLineParam) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站", throwable.toString());
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ public class LineDevGetDTO {
|
|||||||
|
|
||||||
private String pointName;
|
private String pointName;
|
||||||
|
|
||||||
|
private Integer lineRunFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置监测点索引集合
|
* 装置监测点索引集合
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ package com.njcn.device.pq.api;
|
|||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.pq.api.fallback.DeviceTreeClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.DeviceTreeClientFallbackFactory;
|
||||||
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
|
||||||
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
||||||
@@ -11,6 +13,8 @@ import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -51,4 +55,7 @@ public interface LineIntegrityClient {
|
|||||||
|
|
||||||
@PostMapping("/lineDataQuality")
|
@PostMapping("/lineDataQuality")
|
||||||
HttpResult<List<LineDataQualityDTO>> getLineDataQuality(@RequestBody LineDataQualityParam lineDataQualityParam);
|
HttpResult<List<LineDataQualityDTO>> getLineDataQuality(@RequestBody LineDataQualityParam lineDataQualityParam);
|
||||||
|
|
||||||
|
@PostMapping("/noData")
|
||||||
|
HttpResult<List<OnlineMonitorVo>> getNoData(@RequestBody LineBaseQueryParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -54,6 +55,12 @@ public class LineIntegrityClientFallbackFactory implements FallbackFactory<LineI
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<OnlineMonitorVo>> getNoData(LineBaseQueryParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取监测点数据完成性为0的数据", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OnlineMonitorVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("负责单位")
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
@ApiModelProperty("变电站名称")
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测对象类型")
|
||||||
|
private String monitorObjType;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测对象名称")
|
||||||
|
private String monitorObj;
|
||||||
|
|
||||||
|
@ApiModelProperty("指标类型 ")
|
||||||
|
private String target;
|
||||||
|
|
||||||
|
@ApiModelProperty("累计天数")
|
||||||
|
private Integer lastDay;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -108,8 +108,17 @@ public class CommTerminalController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("deptGetAllLine")
|
||||||
|
@ApiOperation("根据单位获取监测点信息(all line)")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiImplicitParam(name = "deptGetLineParam", value = "请求体", required = true)
|
||||||
|
public HttpResult<List<DeptGetChildrenMoreDTO>> deptGetAllLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
|
||||||
|
TimeInterval timer = new TimeInterval();
|
||||||
|
String methodDescribe = getMethodDescribe("deptGetLine");
|
||||||
|
List<DeptGetChildrenMoreDTO> result = commTerminalService.deptGetAllLine(deptGetLineParam);
|
||||||
|
log.info("运行时长" + timer.intervalSecond());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.LineIntegrityDataVO;
|
import com.njcn.device.pq.pojo.vo.LineIntegrityDataVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
||||||
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
||||||
import com.njcn.device.pq.service.LineIntegrityDataService;
|
import com.njcn.device.pq.service.LineIntegrityDataService;
|
||||||
@@ -159,4 +160,14 @@ public class LineIntegrityDataController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rate, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rate, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/noData")
|
||||||
|
@ApiOperation("监测点数据完整性为0的数据(冀北)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数实体", required = true)
|
||||||
|
public HttpResult<List<OnlineMonitorVo>> getNoData(@RequestBody LineBaseQueryParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getNoData");
|
||||||
|
List<OnlineMonitorVo> rate = irStatIntegrityDService.getNoData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rate, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,11 +40,10 @@ public interface CommTerminalService {
|
|||||||
*/
|
*/
|
||||||
List<DeptGetChildrenMoreDTO> deptGetLine(DeptGetLineParam deptGetLineParam);
|
List<DeptGetChildrenMoreDTO> deptGetLine(DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
List<DeptGetChildrenMoreDTO> deptGetAllLine(DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
List<LineDevGetDTO> deptGetLineByIdList(List<String> monitorIds);
|
List<LineDevGetDTO> deptGetLineByIdList(List<String> monitorIds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
|||||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -37,4 +38,6 @@ public interface IRStatIntegrityDService extends IMppService<RStatIntegrityD> {
|
|||||||
Boolean saveOrUpdateData(List<MonitorIntegrityDTO> monitorIntegrityDTOList);
|
Boolean saveOrUpdateData(List<MonitorIntegrityDTO> monitorIntegrityDTOList);
|
||||||
|
|
||||||
DeviceOnlineRate getData(DeviceInfoParam.BusinessParam param);
|
DeviceOnlineRate getData(DeviceInfoParam.BusinessParam param);
|
||||||
|
|
||||||
|
List<OnlineMonitorVo> getNoData(LineBaseQueryParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,45 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeptGetChildrenMoreDTO> deptGetAllLine(DeptGetLineParam deptGetLineParam) {
|
||||||
|
List<DeptGetChildrenMoreDTO> result = new ArrayList<>();
|
||||||
|
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
||||||
|
Map<String, String> deptMap = temDept.stream().collect(Collectors.toMap(DeptGetBase::getUnitId, DeptGetBase::getUnitName));
|
||||||
|
Map<String, List<LineDevGetDTO>> map = deptLineService.lineDevAllGet(filterDataTypeNew(deptGetLineParam.getServerName()),
|
||||||
|
1,deptGetLineParam.getLineRunFlag(),deptGetLineParam.getIsUpToGrid());
|
||||||
|
temDept.forEach(item -> {
|
||||||
|
DeptGetChildrenMoreDTO deptGetChildrenMoreDTO = new DeptGetChildrenMoreDTO();
|
||||||
|
deptGetChildrenMoreDTO.setUnitId(item.getUnitId());
|
||||||
|
deptGetChildrenMoreDTO.setUnitName(item.getUnitName());
|
||||||
|
deptGetChildrenMoreDTO.setUnitChildrenList(item.getUnitChildrenList());
|
||||||
|
deptGetChildrenMoreDTO.setDeptLevel(item.getDeptLevel());
|
||||||
|
List<String> deptIds = item.getUnitChildrenList();
|
||||||
|
if (CollectionUtil.isNotEmpty(deptIds)) {
|
||||||
|
List<LineDevGetDTO> lineList = new ArrayList<>();
|
||||||
|
deptIds.forEach(i -> {
|
||||||
|
if (map.containsKey(i)) {
|
||||||
|
map.get(i).forEach(x->{
|
||||||
|
if(deptMap.containsKey(x.getUnitId())){
|
||||||
|
x.setUnitName(deptMap.get(x.getUnitId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
lineList.addAll(map.get(i));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//去重
|
||||||
|
ArrayList<LineDevGetDTO> collect = lineList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
|
||||||
|
Comparator.comparing(LineDevGetDTO::getPointId)
|
||||||
|
)), ArrayList::new));
|
||||||
|
|
||||||
|
deptGetChildrenMoreDTO.setLineBaseList(collect);
|
||||||
|
}
|
||||||
|
result.add(deptGetChildrenMoreDTO);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LineDevGetDTO> deptGetLineByIdList(List<String> monitorIds) {
|
public List<LineDevGetDTO> deptGetLineByIdList(List<String> monitorIds) {
|
||||||
return lineMapper.getMonitorListDetail(monitorIds);
|
return lineMapper.getMonitorListDetail(monitorIds);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ package com.njcn.device.pq.service.impl;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
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.conditions.query.QueryWrapper;
|
||||||
@@ -26,6 +25,7 @@ import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
|||||||
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatIntegrityVO;
|
import com.njcn.device.pq.pojo.vo.RStatIntegrityVO;
|
||||||
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
import com.njcn.device.pq.pojo.vo.common.DeviceOnlineRate;
|
||||||
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
||||||
@@ -196,6 +196,11 @@ public class RStatIntegrityDServiceImpl extends MppServiceImpl<RStatIntegrityDMa
|
|||||||
return rate;
|
return rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OnlineMonitorVo> getNoData(LineBaseQueryParam param) {
|
||||||
|
return this.baseMapper.getNoData(param.getLineIds(), param.getStartTime(), param.getEndTime());
|
||||||
|
}
|
||||||
|
|
||||||
private BigDecimal calculateIntegrityRate(List<RStatIntegrityVO> lineIntegrityRateInfo, List<String> deviceIds) {
|
private BigDecimal calculateIntegrityRate(List<RStatIntegrityVO> lineIntegrityRateInfo, List<String> deviceIds) {
|
||||||
List<RStatIntegrityVO> list = lineIntegrityRateInfo.stream().filter(x -> deviceIds.contains(x.getLineIndex())).collect(Collectors.toList());
|
List<RStatIntegrityVO> list = lineIntegrityRateInfo.stream().filter(x -> deviceIds.contains(x.getLineIndex())).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(list)) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
|||||||
|
|
||||||
List<LineDevGetDTO> lineDevGet(@Param("list")List<Integer> devType,@Param("type")Integer type,@Param("lineRunFlag") Integer lineRunFlag);
|
List<LineDevGetDTO> lineDevGet(@Param("list")List<Integer> devType,@Param("type")Integer type,@Param("lineRunFlag") Integer lineRunFlag);
|
||||||
|
|
||||||
|
List<LineDevGetDTO> lineDevAllGet(@Param("list")List<Integer> devType,@Param("type")Integer type,@Param("lineRunFlag") Integer lineRunFlag, @Param("lineType") Integer lineType);
|
||||||
|
|
||||||
List<TerminalGetBase> orgSubStationGet(@Param("list")List<Integer> devType);
|
List<TerminalGetBase> orgSubStationGet(@Param("list")List<Integer> devType);
|
||||||
|
|
||||||
List<TerminalGetBase.Extend> orgSubStationInfoGet(@Param("list")List<Integer> devType,
|
List<TerminalGetBase.Extend> orgSubStationInfoGet(@Param("list")List<Integer> devType,
|
||||||
|
|||||||
@@ -74,6 +74,71 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="lineDevAllGet" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||||
|
select
|
||||||
|
<!--监测点-->
|
||||||
|
<if test="type == 1">
|
||||||
|
pq_dept_line.id unitId,
|
||||||
|
point.id pointId,
|
||||||
|
lineDetail.Time_Interval as timeInterval,
|
||||||
|
lineDetail.load_type lineTag,
|
||||||
|
lineDetail.Run_Flag as lineRunFlag,
|
||||||
|
dic.id voltageLevel,
|
||||||
|
dev.id devId,
|
||||||
|
device.com_flag comFlag,
|
||||||
|
1 as lineType,
|
||||||
|
0 as type,
|
||||||
|
lineDetail.obj_id,
|
||||||
|
lineDetail.monitor_flag as isUpToGrid,
|
||||||
|
point.name pointName
|
||||||
|
</if>
|
||||||
|
<!--母线-->
|
||||||
|
<if test="type == 2">
|
||||||
|
DISTINCT
|
||||||
|
pq_dept_line.id unitId,
|
||||||
|
dic.id voltageLevel,
|
||||||
|
voltage.id pointId,
|
||||||
|
point.id devId
|
||||||
|
</if>
|
||||||
|
<!--装置-->
|
||||||
|
<if test="type == 3">
|
||||||
|
DISTINCT
|
||||||
|
pq_dept_line.id unitId,
|
||||||
|
dev.id devId,
|
||||||
|
dic.id voltageLevel,
|
||||||
|
1 as type ,
|
||||||
|
device.update_time,
|
||||||
|
device.Com_Flag as comFlag
|
||||||
|
</if>
|
||||||
|
from pq_dept_line pq_dept_line
|
||||||
|
inner join pq_line point on pq_dept_line.line_id = point.id
|
||||||
|
inner join pq_line_detail lineDetail on point.id = lineDetail.id
|
||||||
|
inner join pq_line voltage on point.pid = voltage.id
|
||||||
|
inner join pq_voltage pq_voltage on voltage.id = pq_voltage.id
|
||||||
|
inner join sys_dict_data dic on pq_voltage.Scale= dic.id
|
||||||
|
inner join pq_line dev on voltage.pid = dev.id
|
||||||
|
inner join pq_device device on dev.id = device.id
|
||||||
|
where device.Dev_Model = 1
|
||||||
|
and point.state = 1
|
||||||
|
and device.Dev_Data_Type in
|
||||||
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
<if test="lineRunFlag!=null ">
|
||||||
|
and lineDetail.Run_Flag = #{lineRunFlag}
|
||||||
|
</if>
|
||||||
|
<if test="lineType!=null and lineType!=''">
|
||||||
|
<choose>
|
||||||
|
<when test="lineType == 0">
|
||||||
|
and lineDetail.Monitor_Id is not null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and (lineDetail.Monitor_Id is null or lineDetail.Monitor_Id = '')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="orgSubStationGet" resultType="com.njcn.device.biz.pojo.dto.TerminalGetBase">
|
<select id="orgSubStationGet" resultType="com.njcn.device.biz.pojo.dto.TerminalGetBase">
|
||||||
select
|
select
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public interface DeptLineService extends IService<DeptLine> {
|
|||||||
*/
|
*/
|
||||||
Map<String, List<LineDevGetDTO>> lineDevGet(List<Integer> devType,Integer type,Integer lineRunFlag);
|
Map<String, List<LineDevGetDTO>> lineDevGet(List<Integer> devType,Integer type,Integer lineRunFlag);
|
||||||
|
|
||||||
|
Map<String, List<LineDevGetDTO>> lineDevAllGet(List<Integer> devType,Integer type,Integer lineRunFlag, Integer lineType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取根据单位分组的变电站集合信息
|
* 获取根据单位分组的变电站集合信息
|
||||||
|
|||||||
@@ -169,6 +169,12 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
|||||||
return deptLines.stream().collect(Collectors.groupingBy(LineDevGetDTO::getUnitId));
|
return deptLines.stream().collect(Collectors.groupingBy(LineDevGetDTO::getUnitId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<LineDevGetDTO>> lineDevAllGet(List<Integer> devDataType, Integer type, Integer lineRunFlag, Integer lineType) {
|
||||||
|
List<LineDevGetDTO> deptLines = deptLineMapper.lineDevAllGet(devDataType, type, lineRunFlag,lineType);
|
||||||
|
return deptLines.stream().collect(Collectors.groupingBy(LineDevGetDTO::getUnitId));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, List<TerminalGetBase>> orgSubStationGet(List<Integer> devDataType) {
|
public Map<String, List<TerminalGetBase>> orgSubStationGet(List<Integer> devDataType) {
|
||||||
List<TerminalGetBase> deptLines = deptLineMapper.orgSubStationGet(devDataType);
|
List<TerminalGetBase> deptLines = deptLineMapper.orgSubStationGet(devDataType);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
|||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.po.LineDataIntegrity;
|
import com.njcn.device.pq.pojo.po.LineDataIntegrity;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatIntegrityVO;
|
import com.njcn.device.pq.pojo.vo.RStatIntegrityVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -56,4 +57,10 @@ public interface RStatIntegrityDMapper extends MppBaseMapper<RStatIntegrityD> {
|
|||||||
*/
|
*/
|
||||||
List<RStatIntegrityVO> getLineIntegrityRateInfo(@Param("lineIds")List<String> lineIds,@Param("startTime")String startTime,@Param("endTime")String endTime);
|
List<RStatIntegrityVO> getLineIntegrityRateInfo(@Param("lineIds")List<String> lineIds,@Param("startTime")String startTime,@Param("endTime")String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取监测点数据完整性为0的数据
|
||||||
|
* @author xy
|
||||||
|
* @date 2025/12/10
|
||||||
|
*/
|
||||||
|
List<OnlineMonitorVo> getNoData(@Param("lineIds")List<String> lineIds, @Param("startTime")String startTime, @Param("endTime")String endTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,4 +110,41 @@
|
|||||||
group by line_index
|
group by line_index
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getNoData" resultType="OnlineMonitorVo">
|
||||||
|
SELECT DISTINCT
|
||||||
|
t6.`Name` gdName,
|
||||||
|
t5.`Name` subName,
|
||||||
|
t4.`Name` deviceName,
|
||||||
|
t1.line_index lineId,
|
||||||
|
t2.`Name` lineName,
|
||||||
|
t8.`Name` monitorObjType,
|
||||||
|
t7.Obj_Name monitorObj,
|
||||||
|
count(t1.time_id) lastDay
|
||||||
|
FROM
|
||||||
|
r_stat_integrity_d t1
|
||||||
|
left join pq_line t2 on t1.line_index = t2.Id
|
||||||
|
left join pq_line t3 on t2.Pid = t3.Id
|
||||||
|
left join pq_line t4 on t3.Pid = t4.Id
|
||||||
|
left join pq_line t5 on t4.Pid = t5.Id
|
||||||
|
left join pq_line t6 on t5.Pid = t6.Id
|
||||||
|
left join pq_line_detail t7 on t1.line_index = t7.Id
|
||||||
|
left join sys_dict_data t8 on t7.Load_Type = t8.Id
|
||||||
|
WHERE
|
||||||
|
t1.real_time = 0
|
||||||
|
<if test="lineIds!=null and lineIds.size > 0">
|
||||||
|
and line_index in
|
||||||
|
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test=" startTime != null and startTime !=''">
|
||||||
|
and time_id >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
and time_id <= #{endTime}
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
line_index
|
||||||
|
order by lastDay desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ public interface RStatLimitTargetDMapper extends BaseMapper<RStatLimitTargetDPO>
|
|||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime);
|
@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
List<RStatLimitTargetVO> getSumTargetDetails2(@Param("ids") List<String> ids,
|
||||||
|
@Param("startTime") String startTime,
|
||||||
|
@Param("endTime") String endTime);
|
||||||
|
|
||||||
List<RStatLimitTargetCountVO> getSumTargetCountDayes(@Param("ids") List<String> ids,
|
List<RStatLimitTargetCountVO> getSumTargetCountDayes(@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime);
|
@Param("endTime") String endTime);
|
||||||
|
|||||||
@@ -491,6 +491,149 @@
|
|||||||
GROUP BY time_id,my_index) A
|
GROUP BY time_id,my_index) A
|
||||||
GROUP BY A.lineId
|
GROUP BY A.lineId
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getSumTargetDetails2" resultType="com.njcn.harmonic.pojo.vo.RStatLimitTargetVO">
|
||||||
|
SELECT
|
||||||
|
A.lineId,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.freqDevOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) freqDevOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.flickerOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) flickerOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.voltageDevOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) voltageDevOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.ubalanceOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) ubalanceOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.uaberranceOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) uaberranceOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.iNegOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) iNegOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.uharmOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) uharmOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.iharmOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) iharmOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.inuharmOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) inuharmOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.allOvertime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) allOvertime,
|
||||||
|
SUM(
|
||||||
|
CASE
|
||||||
|
WHEN A.flickerAllTime > 0
|
||||||
|
THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) flickerAllTime
|
||||||
|
FROM
|
||||||
|
(SELECT
|
||||||
|
DISTINCT my_index AS lineId,
|
||||||
|
SUM(freq_dev_overtime) AS freqDevOvertime,
|
||||||
|
SUM(flicker_overtime) AS flickerOvertime,
|
||||||
|
SUM(voltage_dev_overtime) AS voltageDevOvertime,
|
||||||
|
SUM(ubalance_overtime) AS ubalanceOvertime,
|
||||||
|
SUM(uaberrance_overtime) AS uaberranceOvertime,
|
||||||
|
SUM(i_neg_overtime) AS iNegOvertime,
|
||||||
|
SUM(flicker_all_time) AS flickerAllTime,
|
||||||
|
SUM(
|
||||||
|
IF(
|
||||||
|
(
|
||||||
|
uaberrance_overtime + uharm_2_overtime + uharm_3_overtime + uharm_4_overtime + uharm_5_overtime + uharm_6_overtime + uharm_7_overtime + uharm_8_overtime + uharm_9_overtime + uharm_10_overtime + uharm_11_overtime + uharm_12_overtime + uharm_13_overtime + uharm_14_overtime + uharm_15_overtime + uharm_16_overtime + uharm_17_overtime + uharm_18_overtime + uharm_19_overtime + uharm_20_overtime + uharm_21_overtime + uharm_22_overtime + uharm_23_overtime + uharm_24_overtime + uharm_25_overtime
|
||||||
|
) > 0,
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
) AS uharmOvertime,
|
||||||
|
SUM(
|
||||||
|
IF(
|
||||||
|
(
|
||||||
|
iharm_2_overtime + iharm_3_overtime + iharm_4_overtime + iharm_5_overtime + iharm_6_overtime + iharm_7_overtime + iharm_8_overtime + iharm_9_overtime + iharm_10_overtime + iharm_11_overtime + iharm_12_overtime + iharm_13_overtime + iharm_14_overtime + iharm_15_overtime + iharm_16_overtime + iharm_17_overtime + iharm_18_overtime + iharm_19_overtime + iharm_20_overtime + iharm_21_overtime + iharm_22_overtime + iharm_23_overtime + iharm_24_overtime + iharm_25_overtime
|
||||||
|
) > 0,
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
) AS iharmOvertime,
|
||||||
|
SUM(
|
||||||
|
IF(
|
||||||
|
(
|
||||||
|
inuharm_1_overtime + inuharm_2_overtime + inuharm_3_overtime + inuharm_4_overtime + inuharm_5_overtime + inuharm_6_overtime + inuharm_7_overtime + inuharm_8_overtime + inuharm_9_overtime + inuharm_10_overtime + inuharm_11_overtime + inuharm_12_overtime + inuharm_13_overtime + inuharm_14_overtime + inuharm_15_overtime + inuharm_16_overtime
|
||||||
|
) > 0,
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
) AS inuharmOvertime,
|
||||||
|
SUM(
|
||||||
|
IF(
|
||||||
|
(
|
||||||
|
freq_dev_overtime + flicker_overtime + voltage_dev_overtime + ubalance_overtime + uaberrance_overtime + i_neg_overtime + uharm_2_overtime + uharm_3_overtime + uharm_4_overtime + uharm_5_overtime + uharm_6_overtime + uharm_7_overtime + uharm_8_overtime + uharm_9_overtime + uharm_10_overtime + uharm_11_overtime + uharm_12_overtime + uharm_13_overtime + uharm_14_overtime + uharm_15_overtime + uharm_16_overtime + uharm_17_overtime + uharm_18_overtime + uharm_19_overtime + uharm_20_overtime + uharm_21_overtime + uharm_22_overtime + uharm_23_overtime + uharm_24_overtime + uharm_25_overtime + iharm_2_overtime + iharm_3_overtime + iharm_4_overtime + iharm_5_overtime + iharm_6_overtime + iharm_7_overtime + iharm_8_overtime + iharm_9_overtime + iharm_10_overtime + iharm_11_overtime + iharm_12_overtime + iharm_13_overtime + iharm_14_overtime + iharm_15_overtime + iharm_16_overtime + iharm_17_overtime + iharm_18_overtime + iharm_19_overtime + iharm_20_overtime + iharm_21_overtime + iharm_22_overtime + iharm_23_overtime + iharm_24_overtime + iharm_25_overtime + inuharm_1_overtime + inuharm_2_overtime + inuharm_3_overtime + inuharm_4_overtime + inuharm_5_overtime + inuharm_6_overtime + inuharm_7_overtime + inuharm_8_overtime + inuharm_9_overtime + inuharm_10_overtime + inuharm_11_overtime + inuharm_12_overtime + inuharm_13_overtime + inuharm_14_overtime + inuharm_15_overtime + inuharm_16_overtime
|
||||||
|
) > 0,
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
) AS allOvertime
|
||||||
|
FROM
|
||||||
|
r_stat_limit_target_d
|
||||||
|
<where>
|
||||||
|
and time_id between #{startTime} and #{endTime}
|
||||||
|
<if test=" ids != null and ids.size > 0">
|
||||||
|
AND my_index IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY my_index) A
|
||||||
|
GROUP BY A.lineId
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getSumTargetCountDayes" resultType="com.njcn.harmonic.pojo.vo.RStatLimitTargetCountVO">
|
<select id="getSumTargetCountDayes" resultType="com.njcn.harmonic.pojo.vo.RStatLimitTargetCountVO">
|
||||||
SELECT
|
SELECT
|
||||||
A.lineId,
|
A.lineId,
|
||||||
|
|||||||
@@ -349,31 +349,51 @@ public class GridServiceImpl implements IGridService {
|
|||||||
List<RStatDataPltDPO> list4 = getList4(lineList, param.getStartTime(), param.getEndTime());
|
List<RStatDataPltDPO> list4 = getList4(lineList, param.getStartTime(), param.getEndTime());
|
||||||
List<RStatDataVD> list5 = getList5(lineList, param.getStartTime(), param.getEndTime());
|
List<RStatDataVD> list5 = getList5(lineList, param.getStartTime(), param.getEndTime());
|
||||||
if (CollUtil.isNotEmpty(list1)) {
|
if (CollUtil.isNotEmpty(list1)) {
|
||||||
List<Double> d = list1.stream().map(o -> o.getFreqDev().doubleValue()).collect(Collectors.toList());
|
//List<Double> d = list1.stream().map(o -> o.getFreqDev().doubleValue()).collect(Collectors.toList());
|
||||||
|
List<Double> d = list1.stream()
|
||||||
|
.map(o -> o.getFreqDev().doubleValue())
|
||||||
|
.filter(value -> value >= -7.5 && value <= 7.5)
|
||||||
|
.collect(Collectors.toList());
|
||||||
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
||||||
vo1.setAvg(PubUtils.doubleRound(2, avg));
|
vo1.setAvg(PubUtils.doubleRound(2, avg));
|
||||||
vo1.setSd(targetSd(d, avg));
|
vo1.setSd(targetSd(d, avg));
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(list2)) {
|
if (CollUtil.isNotEmpty(list2)) {
|
||||||
List<Double> d = list2.stream().map(o -> o.getVuDev().doubleValue()).collect(Collectors.toList());
|
//List<Double> d = list2.stream().map(o -> o.getVuDev().doubleValue()).collect(Collectors.toList());
|
||||||
|
List<Double> d = list2.stream()
|
||||||
|
.map(o -> o.getVuDev().doubleValue())
|
||||||
|
.filter(value -> value >= -90 && value <= 50)
|
||||||
|
.collect(Collectors.toList());
|
||||||
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
||||||
vo2.setAvg(PubUtils.doubleRound(2, avg));
|
vo2.setAvg(PubUtils.doubleRound(2, avg));
|
||||||
vo2.setSd(targetSd(d, avg));
|
vo2.setSd(targetSd(d, avg));
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(list3)) {
|
if (CollUtil.isNotEmpty(list3)) {
|
||||||
List<Double> d = list3.stream().map(o -> o.getVThd().doubleValue()).collect(Collectors.toList());
|
//List<Double> d = list3.stream().map(o -> o.getVThd().doubleValue()).collect(Collectors.toList());
|
||||||
|
List<Double> d = list3.stream()
|
||||||
|
.map(o -> o.getVThd().doubleValue())
|
||||||
|
.filter(value -> value >= 0 && value <= 50)
|
||||||
|
.collect(Collectors.toList());
|
||||||
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
||||||
vo3.setAvg(PubUtils.doubleRound(2, avg));
|
vo3.setAvg(PubUtils.doubleRound(2, avg));
|
||||||
vo3.setSd(targetSd(d, avg));
|
vo3.setSd(targetSd(d, avg));
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(list5)) {
|
if (CollUtil.isNotEmpty(list5)) {
|
||||||
List<Double> d = list1.stream().map(o -> o.getVUnbalance().doubleValue()).collect(Collectors.toList());
|
//List<Double> d = list5.stream().map(o -> o.getVUnbalance().doubleValue()).collect(Collectors.toList());
|
||||||
|
List<Double> d = list5.stream()
|
||||||
|
.map(o -> o.getVUnbalance().doubleValue())
|
||||||
|
.filter(value -> value >= 0 && value <= 40)
|
||||||
|
.collect(Collectors.toList());
|
||||||
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
||||||
vo4.setAvg(PubUtils.doubleRound(2, avg));
|
vo4.setAvg(PubUtils.doubleRound(2, avg));
|
||||||
vo4.setSd(targetSd(d, avg));
|
vo4.setSd(targetSd(d, avg));
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(list4)) {
|
if (CollUtil.isNotEmpty(list4)) {
|
||||||
List<Double> d = list4.stream().map(RStatDataPltDPO::getPlt).collect(Collectors.toList());
|
//List<Double> d = list4.stream().map(RStatDataPltDPO::getPlt).collect(Collectors.toList());
|
||||||
|
List<Double> d = list4.stream()
|
||||||
|
.map(RStatDataPltDPO::getPlt)
|
||||||
|
.filter(value -> value >= 0 && value <= 20)
|
||||||
|
.collect(Collectors.toList());
|
||||||
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
double avg = d.stream().collect(Collectors.averagingDouble(x -> x));
|
||||||
vo5.setAvg(PubUtils.doubleRound(2, avg));
|
vo5.setAvg(PubUtils.doubleRound(2, avg));
|
||||||
vo5.setSd(targetSd(d, avg));
|
vo5.setSd(targetSd(d, avg));
|
||||||
@@ -481,20 +501,25 @@ public class GridServiceImpl implements IGridService {
|
|||||||
List<EvaluationLevelVo.EvaluationDetail> result = new ArrayList<>();
|
List<EvaluationLevelVo.EvaluationDetail> result = new ArrayList<>();
|
||||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||||
deptGetLineParam.setLineRunFlag(0);
|
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetAllLine(deptGetLineParam).getData();
|
||||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
|
||||||
//获取监测点集合
|
//获取监测点集合
|
||||||
Map<String, List<String>> lineMap = this.getLineMap(list, param.getIsUpToGrid(), null);
|
Map<String, List<String>> lineMap = this.getLineMap(list, param.getIsUpToGrid(), null);
|
||||||
List<String> lineList = lineMap.values().stream()
|
List<String> lineList = lineMap.values().stream()
|
||||||
.flatMap(List::stream)
|
.flatMap(List::stream)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
Map<String, List<String>> lineMap2 = this.getLineMap(list, param.getIsUpToGrid(), null,0);
|
||||||
|
List<String> lineList2 = lineMap2.values().stream()
|
||||||
|
.flatMap(List::stream)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
List<RStatLimitTargetVO> overLimitList = new ArrayList<>();
|
List<RStatLimitTargetVO> overLimitList = new ArrayList<>();
|
||||||
if (CollUtil.isNotEmpty(lineList)) {
|
if (CollUtil.isNotEmpty(lineList)) {
|
||||||
//获取监测点越限集合
|
//获取监测点越限集合
|
||||||
overLimitList .addAll(rStatLimitTargetDMapper.getSumTargetDetails(lineList,
|
overLimitList.addAll(rStatLimitTargetDMapper.getSumTargetDetails2(lineList,
|
||||||
param.getStartTime(),
|
param.getStartTime(),
|
||||||
param.getEndTime())) ;
|
param.getEndTime()));
|
||||||
}
|
}
|
||||||
//获取部门
|
//获取部门
|
||||||
List<DeptDTO> deptList = deptFeignClient.getDepSonDetailByDeptId(param.getDeptIndex()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDepSonDetailByDeptId(param.getDeptIndex()).getData();
|
||||||
@@ -541,12 +566,13 @@ public class GridServiceImpl implements IGridService {
|
|||||||
if (lineMap.containsKey(item.getId())) {
|
if (lineMap.containsKey(item.getId())) {
|
||||||
if (CollUtil.isNotEmpty(lineMap.get(item.getId()))) {
|
if (CollUtil.isNotEmpty(lineMap.get(item.getId()))) {
|
||||||
List<String> ll = lineMap.get(item.getId());
|
List<String> ll = lineMap.get(item.getId());
|
||||||
detail.setOnlineNum(ll.size());
|
List<String> lll = lineMap2.get(item.getId());
|
||||||
|
detail.setOnlineNum(lll.size());
|
||||||
//筛选当前部门下监测点的超标数据
|
//筛选当前部门下监测点的超标数据
|
||||||
List<RStatLimitTargetVO> list2 = overLimitList.stream().filter(it -> ll.contains(it.getLineId())).collect(Collectors.toList());
|
List<RStatLimitTargetVO> list2 = overLimitList.stream().filter(it -> ll.contains(it.getLineId())).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(list2)) {
|
if (CollUtil.isNotEmpty(list2)) {
|
||||||
//筛选出9项指标(电压偏差、频率偏差、电压总谐波畸变率、电压闪变、三相电压不平衡度、负序电流、谐波电流、间谐波电压、谐波电压)超标监测点
|
//筛选出9项指标(电压偏差、频率偏差、电压总谐波畸变率、电压闪变、三相电压不平衡度、负序电流、谐波电流、间谐波电压、谐波电压)超标监测点
|
||||||
long allNum = list2.stream().filter(o -> o.getAllOvertime() > 0 || o.getFlickerAllTime() > 0).count();
|
long allNum = list2.stream().filter(o -> o.getAllOvertime() > 0 || o.getFlickerAllTime() > 0 ).count();
|
||||||
detail.setOverNum((int) allNum);
|
detail.setOverNum((int) allNum);
|
||||||
detail.setOverRatio(PubUtils.doubleRound(2, detail.getOverNum() * 100.0 / detail.getOnlineNum()));
|
detail.setOverRatio(PubUtils.doubleRound(2, detail.getOverNum() * 100.0 / detail.getOnlineNum()));
|
||||||
//筛选出电压偏差超标监测点
|
//筛选出电压偏差超标监测点
|
||||||
@@ -599,6 +625,9 @@ public class GridServiceImpl implements IGridService {
|
|||||||
Integer day9 = list2.stream().max(Comparator.comparingInt(RStatLimitTargetVO::getInuharmOvertime)).get().getInuharmOvertime();
|
Integer day9 = list2.stream().max(Comparator.comparingInt(RStatLimitTargetVO::getInuharmOvertime)).get().getInuharmOvertime();
|
||||||
detail9.setOverNum((int) num9);
|
detail9.setOverNum((int) num9);
|
||||||
detail9.setOverDay(day9);
|
detail9.setOverDay(day9);
|
||||||
|
} else {
|
||||||
|
detail.setOverNum(0);
|
||||||
|
detail.setOverRatio(0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1043,4 +1072,35 @@ public class GridServiceImpl implements IGridService {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, List<String>> getLineMap(List<DeptGetChildrenMoreDTO> list, Integer type, String voltage, Integer runFlag) {
|
||||||
|
Map<String, List<String>> map = new HashMap<>();
|
||||||
|
list.forEach(it -> {
|
||||||
|
// 默认不过滤
|
||||||
|
Predicate<LineDevGetDTO> uploadFilter = item -> true;
|
||||||
|
if (Objects.equals(type, 1)) {
|
||||||
|
uploadFilter = item -> Objects.equals(item.getIsUpToGrid(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Predicate<LineDevGetDTO> voltageFilter = item -> true;
|
||||||
|
if (!Objects.isNull(voltage) && !Objects.equals(voltage, "")) {
|
||||||
|
voltageFilter = item -> Objects.equals(item.getVoltageLevel(), voltage);
|
||||||
|
}
|
||||||
|
|
||||||
|
Predicate<LineDevGetDTO> runFlagFilter = item -> true;
|
||||||
|
if (!Objects.isNull(runFlag)) {
|
||||||
|
voltageFilter = item -> Objects.equals(item.getLineRunFlag(), runFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 组合两个过滤条件
|
||||||
|
Predicate<LineDevGetDTO> combinedFilter = uploadFilter.and(voltageFilter);
|
||||||
|
Predicate<LineDevGetDTO> combinedFilter2 = combinedFilter.and(runFlagFilter);
|
||||||
|
map.put(it.getUnitId(), it.getLineBaseList().stream()
|
||||||
|
.filter(combinedFilter2)
|
||||||
|
.map(LineDevGetDTO::getPointId)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
});
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ import java.math.BigDecimal;
|
|||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|||||||
@@ -46,12 +46,15 @@ public class OnlineParam extends BaseParam implements Serializable {
|
|||||||
@ApiModelProperty(value = "告警阈值")
|
@ApiModelProperty(value = "告警阈值")
|
||||||
private Integer alarmThreshold;
|
private Integer alarmThreshold;
|
||||||
|
|
||||||
@ApiModelProperty(value = "数据类型")
|
// @ApiModelProperty(value = "数据类型")
|
||||||
private Integer dataType;
|
// private Integer dataType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "监测点类型 0:电网侧 1:非电网侧")
|
@ApiModelProperty(value = "监测点类型 0:电网侧 1:非电网侧")
|
||||||
private String lineType;
|
private String lineType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "问题类型 0:完整性为0的监测点数据 1:异常数据 2:越限数据")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public static class ReportParam extends OnlineParam {
|
public static class ReportParam extends OnlineParam {
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.njcn.supervision.controller.device;
|
package com.njcn.supervision.controller.device;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.supervision.pojo.param.device.OnlineParam;
|
import com.njcn.supervision.pojo.param.device.OnlineParam;
|
||||||
import com.njcn.supervision.pojo.vo.device.LineLimitDetailVo;
|
import com.njcn.supervision.pojo.vo.device.LineLimitDetailVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.OnlineVo;
|
|
||||||
import com.njcn.supervision.service.device.ILineWarningService;
|
import com.njcn.supervision.service.device.ILineWarningService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -68,9 +67,9 @@ public class LineWarningController extends BaseController {
|
|||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@ApiOperation("分页查询在线监测数据")
|
@ApiOperation("分页查询在线监测数据")
|
||||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
public HttpResult<Page<OnlineVo>> lineWarningList(@RequestBody @Validated OnlineParam param) {
|
public HttpResult<List<OnlineMonitorVo>> lineWarningList(@RequestBody @Validated OnlineParam param) {
|
||||||
String methodDescribe = getMethodDescribe("lineWarningList");
|
String methodDescribe = getMethodDescribe("lineWarningList");
|
||||||
Page<OnlineVo> list = lineWarningService.getLineWarningList(param);
|
List<OnlineMonitorVo> list = lineWarningService.getLineWarningList(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.supervision.pojo.param.device.OnlineParam;
|
import com.njcn.supervision.pojo.param.device.OnlineParam;
|
||||||
import com.njcn.supervision.pojo.po.device.LineWarning;
|
import com.njcn.supervision.pojo.po.device.LineWarning;
|
||||||
import com.njcn.supervision.pojo.vo.device.LineLimitDetailVo;
|
import com.njcn.supervision.pojo.vo.device.LineLimitDetailVo;
|
||||||
@@ -35,7 +36,7 @@ public interface ILineWarningService extends IService<LineWarning> {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Page<OnlineVo> getLineWarningList(OnlineParam param);
|
List<OnlineMonitorVo> getLineWarningList(OnlineParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起预告警单
|
* 发起预告警单
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
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.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||||
@@ -19,8 +17,11 @@ import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
|||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pq.api.DeptLineFeignClient;
|
import com.njcn.device.pq.api.DeptLineFeignClient;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
|
import com.njcn.device.pq.api.LineIntegrityClient;
|
||||||
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
|
||||||
import com.njcn.device.pq.pojo.vo.ReportLineInfoVo;
|
import com.njcn.device.pq.pojo.vo.ReportLineInfoVo;
|
||||||
import com.njcn.harmonic.api.RStatLimitRateDClient;
|
import com.njcn.harmonic.api.RStatLimitRateDClient;
|
||||||
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
||||||
@@ -40,7 +41,6 @@ import com.njcn.supervision.pojo.param.device.OnlineParam;
|
|||||||
import com.njcn.supervision.pojo.po.device.LineWarning;
|
import com.njcn.supervision.pojo.po.device.LineWarning;
|
||||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||||
import com.njcn.supervision.pojo.vo.device.LineLimitDetailVo;
|
import com.njcn.supervision.pojo.vo.device.LineLimitDetailVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.OnlineVo;
|
|
||||||
import com.njcn.supervision.service.device.ILineWarningService;
|
import com.njcn.supervision.service.device.ILineWarningService;
|
||||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
@@ -48,7 +48,6 @@ import com.njcn.system.enums.DicDataEnum;
|
|||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.web.factory.PageFactory;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -67,7 +66,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static java.util.regex.Pattern.*;
|
import static java.util.regex.Pattern.compile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -97,6 +96,7 @@ public class LineWarningServiceImpl extends MppServiceImpl<LineWarningMapper, Li
|
|||||||
private final DataHarmRateVMapper dataHarmRateVMapper;
|
private final DataHarmRateVMapper dataHarmRateVMapper;
|
||||||
private final DataInHarmVMapper dataInHarmVMapper;
|
private final DataInHarmVMapper dataInHarmVMapper;
|
||||||
private final DataPltMapper dataPltMapper;
|
private final DataPltMapper dataPltMapper;
|
||||||
|
private final LineIntegrityClient lineIntegrityClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -216,42 +216,76 @@ public class LineWarningServiceImpl extends MppServiceImpl<LineWarningMapper, Li
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<OnlineVo> getLineWarningList(OnlineParam param) {
|
public List<OnlineMonitorVo> getLineWarningList(OnlineParam param) {
|
||||||
|
List<OnlineMonitorVo> result = new ArrayList<>();
|
||||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
deptGetLineParam.setDeptId(param.getDeptId());
|
deptGetLineParam.setDeptId(param.getDeptId());
|
||||||
deptGetLineParam.setServerName(ServerEnum.HARMONIC.getName());
|
deptGetLineParam.setServerName(ServerEnum.HARMONIC.getName());
|
||||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
deptGetLineParam.setLineRunFlag(0);
|
||||||
|
if (ObjectUtil.isNotNull(param.getLineType()) && !Objects.equals(param.getLineType(), "")) {
|
||||||
|
deptGetLineParam.setIsUpToGrid(Integer.valueOf(param.getLineType()));
|
||||||
|
}
|
||||||
|
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetAllLine(deptGetLineParam).getData();
|
||||||
List<String> lineList = list.stream()
|
List<String> lineList = list.stream()
|
||||||
.flatMap(dto -> dto.getLineBaseList().stream().map(LineDevGetDTO::getPointId))
|
.flatMap(dto -> dto.getLineBaseList().stream().map(LineDevGetDTO::getPointId))
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
QueryWrapper<LineWarning> queryWrapper = new QueryWrapper<>();
|
//数据完整性为0的数据
|
||||||
if (Objects.nonNull(param.getSearchBeginTime()) && Objects.nonNull(param.getSearchEndTime())) {
|
if (param.getDataType() == 0) {
|
||||||
queryWrapper.between("A.alarm_time", param.getSearchBeginTime(), param.getSearchEndTime());
|
LineBaseQueryParam par = new LineBaseQueryParam();
|
||||||
|
par.setLineIds(lineList);
|
||||||
|
par.setStartTime(param.getSearchBeginTime());
|
||||||
|
par.setEndTime(param.getSearchEndTime());
|
||||||
|
result = lineIntegrityClient.getNoData(par).getData();
|
||||||
}
|
}
|
||||||
//监测点id
|
//异常数据
|
||||||
if (CollUtil.isNotEmpty(lineList)) {
|
else if (param.getDataType() == 1) {
|
||||||
queryWrapper.in("A.line_id", lineList);
|
|
||||||
}
|
}
|
||||||
//监测点类型
|
//告警数据
|
||||||
if (StringUtils.isNotBlank(param.getLineType())) {
|
|
||||||
queryWrapper.eq("B.Power_Flag", Integer.parseInt(param.getLineType()));
|
|
||||||
}
|
|
||||||
//查询无数据的监测点
|
|
||||||
if (Objects.equals(param.getDataType(), 0)) {
|
|
||||||
queryWrapper.eq("A.target_type", "0");
|
|
||||||
}
|
|
||||||
//查询指标超标的监测点
|
|
||||||
else {
|
else {
|
||||||
queryWrapper.ge("A.over_limit_day", param.getAlarmThreshold());
|
|
||||||
if (CollUtil.isNotEmpty(param.getTargetList())) {
|
|
||||||
queryWrapper.in("A.target_type", param.getTargetList());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
queryWrapper.orderBy(true, true, "D.Name", "p4.Name", "p3.Name");
|
return result;
|
||||||
return this.baseMapper.page(new Page<>(PageFactory.getPageNum(param), PageFactory.getPageSize(param)), queryWrapper);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public Page<OnlineVo> getLineWarningList(OnlineParam param) {
|
||||||
|
// DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
|
// deptGetLineParam.setDeptId(param.getDeptId());
|
||||||
|
// deptGetLineParam.setServerName(ServerEnum.HARMONIC.getName());
|
||||||
|
// List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||||
|
// List<String> lineList = list.stream()
|
||||||
|
// .flatMap(dto -> dto.getLineBaseList().stream().map(LineDevGetDTO::getPointId))
|
||||||
|
// .distinct()
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// QueryWrapper<LineWarning> queryWrapper = new QueryWrapper<>();
|
||||||
|
// if (Objects.nonNull(param.getSearchBeginTime()) && Objects.nonNull(param.getSearchEndTime())) {
|
||||||
|
// queryWrapper.between("A.alarm_time", param.getSearchBeginTime(), param.getSearchEndTime());
|
||||||
|
// }
|
||||||
|
// //监测点id
|
||||||
|
// if (CollUtil.isNotEmpty(lineList)) {
|
||||||
|
// queryWrapper.in("A.line_id", lineList);
|
||||||
|
// }
|
||||||
|
// //监测点类型
|
||||||
|
// if (StringUtils.isNotBlank(param.getLineType())) {
|
||||||
|
// queryWrapper.eq("B.Power_Flag", Integer.parseInt(param.getLineType()));
|
||||||
|
// }
|
||||||
|
// //查询无数据的监测点
|
||||||
|
// if (Objects.equals(param.getDataType(), 0)) {
|
||||||
|
// queryWrapper.eq("A.target_type", "0");
|
||||||
|
// }
|
||||||
|
// //查询指标超标的监测点
|
||||||
|
// else {
|
||||||
|
// queryWrapper.ge("A.over_limit_day", param.getAlarmThreshold());
|
||||||
|
// if (CollUtil.isNotEmpty(param.getTargetList())) {
|
||||||
|
// queryWrapper.in("A.target_type", param.getTargetList());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// queryWrapper.orderBy(true, true, "D.Name", "p4.Name", "p3.Name");
|
||||||
|
// return this.baseMapper.page(new Page<>(PageFactory.getPageNum(param), PageFactory.getPageSize(param)), queryWrapper);
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void startReport(OnlineParam.ReportParam param) {
|
public void startReport(OnlineParam.ReportParam param) {
|
||||||
|
|||||||
Reference in New Issue
Block a user