冀北电网一张图功能调整
This commit is contained in:
@@ -102,4 +102,14 @@ public class GridController extends BaseController {
|
||||
List<EvaluationLevelVo.EvaluationDetail> result = gridService.getEvaluationDetail(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/qualifiedDetail")
|
||||
@ApiOperation("稳态指标合格率详情")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<EvaluationLevelVo.QualifiedDetail>> getQualifiedDetail(@RequestBody @Validated AssessParam param){
|
||||
String methodDescribe = getMethodDescribe("getQualifiedDetail");
|
||||
List<EvaluationLevelVo.QualifiedDetail> result = gridService.getQualifiedDetail(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +67,11 @@ public interface IGridService {
|
||||
*/
|
||||
List<EvaluationLevelVo.EvaluationDetail> getEvaluationDetail(AssessParam param);
|
||||
|
||||
/**
|
||||
* 稳态指标超标合格率详情
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<EvaluationLevelVo.QualifiedDetail> getQualifiedDetail(AssessParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||
import com.njcn.harmonic.mapper.*;
|
||||
import com.njcn.harmonic.pojo.param.hebeinorth.AssessParam;
|
||||
@@ -54,12 +56,13 @@ public class GridServiceImpl implements IGridService {
|
||||
private final RStatDataVDMapper statDataVDMapper;
|
||||
private final RStatDataPltDMapper statDataPltDMapper;
|
||||
private final RStatLimitTargetDMapper rStatLimitTargetDMapper;
|
||||
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
||||
|
||||
@Override
|
||||
public List<AssessVo> getAssessOverview(AssessParam param) {
|
||||
List<AssessVo> result = new ArrayList<>();
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptId());
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取所有监测点
|
||||
@@ -69,7 +72,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
//上报国网监测点
|
||||
if (Objects.equals(param.getLineType(), 1)){
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)){
|
||||
List<LineDetail> lineDetails = lineFeignClient.getLineDetail(lineList).getData();
|
||||
lineList = lineDetails.stream().filter(o-> Objects.equals(o.getMonitorFlag(), 1)).map(LineDetail::getId).collect(Collectors.toList());
|
||||
}
|
||||
@@ -102,7 +105,7 @@ public class GridServiceImpl implements IGridService {
|
||||
List<AssessDetailVo> result = new ArrayList<>();
|
||||
//查询部门监测点关系
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptId());
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取所有监测点
|
||||
@@ -112,7 +115,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
//上报国网监测点
|
||||
if (Objects.equals(param.getLineType(), 1)){
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)){
|
||||
List<LineDetail> lineDetails = lineFeignClient.getLineDetail(lineList).getData();
|
||||
lineList = lineDetails.stream().filter(o-> Objects.equals(o.getMonitorFlag(), 1)).map(LineDetail::getId).collect(Collectors.toList());
|
||||
}
|
||||
@@ -141,7 +144,7 @@ public class GridServiceImpl implements IGridService {
|
||||
List<EvaluationVo.Children> childrenList = new ArrayList<>();
|
||||
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptId());
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取所有监测点
|
||||
@@ -151,7 +154,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
//上报国网监测点
|
||||
if (Objects.equals(param.getLineType(), 1)){
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)){
|
||||
//获取国网监测点
|
||||
List<LineDetail> lineDetails = lineFeignClient.getLineDetail(lineList).getData();
|
||||
lineList = lineDetails.stream().filter(o-> Objects.equals(o.getMonitorFlag(), 1)).map(LineDetail::getId).collect(Collectors.toList());
|
||||
@@ -190,7 +193,7 @@ public class GridServiceImpl implements IGridService {
|
||||
public List<EvaluationLevelVo> getEvaluationData(AssessParam param) {
|
||||
List<EvaluationLevelVo> result = new ArrayList<>();
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptId());
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取符合电压等级的监测点
|
||||
@@ -201,7 +204,7 @@ public class GridServiceImpl implements IGridService {
|
||||
//监测点处理
|
||||
List<String> line = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(lineList)) {
|
||||
if (Objects.equals(param.getLineType(), 1)) {
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)) {
|
||||
line = lineList.stream().filter(o->Objects.equals(o.getIsUpToGrid(), 1)).map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
} else {
|
||||
line = lineList.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -267,7 +270,7 @@ public class GridServiceImpl implements IGridService {
|
||||
public List<EvaluationLevelVo.EvaluationRatio> evaluationRatio(AssessParam param) {
|
||||
List<EvaluationLevelVo.EvaluationRatio> result = new ArrayList<>();
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptId());
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取所有监测点数据
|
||||
@@ -277,7 +280,7 @@ public class GridServiceImpl implements IGridService {
|
||||
//筛选监测点
|
||||
List<String> line = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(lineList)) {
|
||||
if (Objects.equals(param.getLineType(), 1)) {
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)) {
|
||||
line = lineList.stream().filter(o->Objects.equals(o.getIsUpToGrid(), 1)).map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
} else {
|
||||
line = lineList.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -317,7 +320,7 @@ public class GridServiceImpl implements IGridService {
|
||||
public List<EvaluationLevelVo.EvaluationDetail> getEvaluationDetail(AssessParam param) {
|
||||
List<EvaluationLevelVo.EvaluationDetail> result = new ArrayList<>();
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptId());
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取所有监测点数据
|
||||
@@ -327,7 +330,7 @@ public class GridServiceImpl implements IGridService {
|
||||
//筛选监测点
|
||||
List<String> line = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(lineList)) {
|
||||
if (Objects.equals(param.getLineType(), 1)) {
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)) {
|
||||
line = lineList.stream().filter(o->Objects.equals(o.getIsUpToGrid(), 1)).map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
} else {
|
||||
line = lineList.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -406,6 +409,50 @@ public class GridServiceImpl implements IGridService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EvaluationLevelVo.QualifiedDetail> getQualifiedDetail(AssessParam param) {
|
||||
List<EvaluationLevelVo.QualifiedDetail> result = new ArrayList<>();
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setServerName("harmonic-boot");
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
//获取所有监测点数据
|
||||
Set<LineDevGetDTO> lineList = list.stream()
|
||||
.flatMap(item -> item.getLineBaseList().stream())
|
||||
.collect(Collectors.toSet());
|
||||
//筛选监测点
|
||||
List<String> line = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(lineList)) {
|
||||
if (Objects.equals(param.getIsUpToGrid(), 1)) {
|
||||
line = lineList.stream().filter(o->Objects.equals(o.getIsUpToGrid(), 1)).map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
} else {
|
||||
line = lineList.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
//获取基础台账信息
|
||||
List<BaseLineInfo> baseLineInfos = generalDeviceInfoClient.getBaseLineInfo(line).getData();
|
||||
//获取越限详情
|
||||
List<RStatLimitRateDPO> overLimitList = rStatLimitRateDMapper.getAssessTargetRate(line,param.getStartTime(),param.getEndTime());
|
||||
Map<String, List<RStatLimitRateDPO>> map = overLimitList.stream().collect(Collectors.groupingBy(RStatLimitRateDPO::getLineId));
|
||||
baseLineInfos.forEach(item->{
|
||||
EvaluationLevelVo.QualifiedDetail qualifiedDetail = new EvaluationLevelVo.QualifiedDetail();
|
||||
qualifiedDetail.setLineName(item.getLineName());
|
||||
qualifiedDetail.setSubstationName(item.getSubName());
|
||||
if(CollUtil.isNotEmpty(map.get(item.getId()))) {
|
||||
RStatLimitRateDPO item2 = map.get(item.getId()).get(0);
|
||||
if (!Objects.isNull(item2) && item2.getAllTime() > 0) {
|
||||
qualifiedDetail.setFreqDev(PubUtils.doubleRound(2,100.0-(item2.getFreqDevOvertime()*100.0/item2.getAllTime())));
|
||||
qualifiedDetail.setVDev(PubUtils.doubleRound(2,100.0-(item2.getVoltageDevOvertime()*100.0/item2.getAllTime())));
|
||||
qualifiedDetail.setVThd(PubUtils.doubleRound(2,100.0-(item2.getVoltageDevOvertime()*100.0/item2.getAllTime())));
|
||||
qualifiedDetail.setPlt(PubUtils.doubleRound(2,100.0-(item2.getFlickerOvertime()*100.0/item2.getAllTime())));
|
||||
qualifiedDetail.setUbalance(PubUtils.doubleRound(2,100.0-(item2.getUbalanceOvertime()*100.0/item2.getAllTime())));
|
||||
}
|
||||
result.add(qualifiedDetail);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监测点频率偏差 T相最大值\获取监测点三相电压不平衡度 T相最大值
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user