1.单位变电站公共方法

This commit is contained in:
wr
2024-02-27 15:14:37 +08:00
parent b45fe4c040
commit 7c7c66280d
20 changed files with 264 additions and 25 deletions

View File

@@ -45,6 +45,10 @@ public class TractionStationParam {
@NotBlank(message = "铁路线路名称不可为空")
private String railwayLineName;
@ApiModelProperty(name = "railwayType", value = "铁路线路类型")
@NotBlank(message = "铁路线路类型不可为空")
private String railwayType;
@ApiModelProperty(name = "connetGroupWay", value = "牵引站变压器接线方式")
@NotBlank(message = "牵引站变压器接线方式不可为空")
private String connetGroupWay;

View File

@@ -48,7 +48,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 电压偏差严重度
*/
private Integer vdevSeverity;
private Double vdevSeverity;
/**
* 频率偏差告警情况(0:否 1:是)
@@ -58,7 +58,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 频率偏差严重度
*/
private Integer freqSeverity;
private Double freqSeverity;
/**
* 三相电压不平衡度告警情况(0:否 1:是)
@@ -68,7 +68,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 三相电压不平衡严重度
*/
private Integer unbalanceSeverity;
private Double unbalanceSeverity;
/**
* 谐波电压告警情况(0:否 1:是)
@@ -78,7 +78,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 谐波电压严重度
*/
private Integer vSeverity;
private Double vSeverity;
/**
* 闪变告警情况(0:否 1:是)
@@ -88,7 +88,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 闪变严重度
*/
private Integer flickerSeverity;
private Double flickerSeverity;
/**
* 电压暂降告警情况(0:否 1:是)
@@ -98,7 +98,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 电压暂降严重度
*/
private Integer sagSeverity;
private Double sagSeverity;
/**
* 短时中断告警情况(0:否 1:是)
@@ -108,7 +108,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
/**
* 短时中断严重度
*/
private Integer interruptSeverity;
private Double interruptSeverity;
/**
* 稳态指标评级结果0 较差 1中等 2较好

View File

@@ -57,7 +57,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 电压偏差严重度
*/
@ApiModelProperty(name = "vdevSeverity", value = "电压偏差严重度")
private Integer vdevSeverity;
private Double vdevSeverity;
/**
* 频率偏差告警情况(0:否 1:是)
@@ -69,7 +69,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 频率偏差严重度
*/
@ApiModelProperty(name = "freqSeverity", value = "频率偏差严重度")
private Integer freqSeverity;
private Double freqSeverity;
/**
* 三相电压不平衡度告警情况(0:否 1:是)
@@ -81,7 +81,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 三相电压不平衡度严重度
*/
@ApiModelProperty(name = "unbalanceSeverity", value = "三相电压不平衡度严重度")
private Integer unbalanceSeverity;
private Double unbalanceSeverity;
/**
* 谐波电压告警情况(0:否 1:是)
@@ -93,7 +93,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 谐波电压严重度
*/
@ApiModelProperty(name = "vSeverity", value = "谐波电压严重度")
private Integer vSeverity;
private Double vSeverity;
/**
* 闪变告警情况(0:否 1:是)
@@ -105,7 +105,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 闪变严重度
*/
@ApiModelProperty(name = "flickerSeverity", value = "闪变严重度")
private Integer flickerSeverity;
private Double flickerSeverity;
/**
* 电压暂降告警情况(0:否 1:是)
@@ -117,7 +117,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 电压暂降告严重度
*/
@ApiModelProperty(name = "sagSeverity", value = "电压暂降严重度")
private Integer sagSeverity;
private Double sagSeverity;
/**
* 短时中断告警情况(0:否 1:是)
@@ -130,7 +130,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
* 短时中断严重度
*/
@ApiModelProperty(name = "interruptSeverity", value = "短时中断告严重度")
private Integer interruptSeverity;
private Double interruptSeverity;
/**
* 稳态指标评级结果0 较差 1中等 2较好

View File

@@ -126,6 +126,19 @@ public class CommTerminalController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
/**
* 根据单位获取所有变电站详细信息
* @param deptGetLineParam
* @return
*/
@PostMapping("/deptGetSubStationInfo")
@ApiOperation("根据单位获取所有变电站详细信息")
@ApiImplicitParam(name = "deptGetLineParam", value = "请求体", required = true)
public HttpResult<List<DeptGetSubStationDTO.Info>> deptGetSubStationInfo(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
String methodDescribe = getMethodDescribe("deptGetSubStationInfo");
List<DeptGetSubStationDTO.Info> result = commTerminalService.deptSubStationInfo(deptGetLineParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
/**
* 根据单位获取所有母线
* @author cdf

View File

@@ -108,4 +108,11 @@ public interface CommTerminalService {
List<BusBarAndHisMonitorDTO> getBusBarAndHisMonitor();
/**
* 根据部门获取各变电站信息
* @param deptGetLineParam
* @return
*/
List<DeptGetSubStationDTO.Info> deptSubStationInfo(DeptGetLineParam deptGetLineParam);
}

View File

@@ -790,4 +790,68 @@ public class CommTerminalServiceImpl implements CommTerminalService {
return result;
}
@Override
public List<DeptGetSubStationDTO.Info> deptSubStationInfo(DeptGetLineParam deptGetLineParam) {
List<DeptGetSubStationDTO.Info> result = new ArrayList<>();
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
//获取监测点信息
List<PmsStatationStatInfoDTO> statationStatInfo = statationStatMapper.getStatationStatInfo(new PmsStatationStatInfoParam());
Map<String, List<PmsStatationStatInfoDTO>> statationAndMonitorMap = statationStatInfo.stream().collect(Collectors.groupingBy(PmsStatationStatInfoDTO::getOrgId));
// List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(null, 0);
// Map<String, List<PmsMonitorBaseDTO>> mapPms = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getOrgId));
temDept.forEach(item -> {
DeptGetSubStationDTO.Info deptGetSubStationDTO = new DeptGetSubStationDTO.Info();
deptGetSubStationDTO.setUnitId(item.getUnitId());
deptGetSubStationDTO.setUnitName(item.getUnitName());
deptGetSubStationDTO.setUnitChildrenList(item.getUnitChildrenList());
deptGetSubStationDTO.setDeptLevel(item.getDeptLevel());
List<String> deptIds = item.getUnitChildrenList();
if (CollectionUtil.isNotEmpty(deptIds)) {
List<SubGetBase> subList = new ArrayList<>();
List<SubGetBase> subListPw = new ArrayList<>();
SubGetBase subGetBase;
for (String deptId : deptIds) {
if (statationAndMonitorMap.containsKey(deptId)) {
//获取部门下变电信息
List<PmsStatationStatInfoDTO> sub = statationAndMonitorMap.get(deptId);
Map<String, List<PmsStatationStatInfoDTO>> subMap = sub.stream()
.collect(Collectors.groupingBy(x->x.getPowerId()+"_"+x.getPowerName()+"_"+x.getPowerVoltageLevel()));
for (Map.Entry<String, List<PmsStatationStatInfoDTO>> stringListEntry : subMap.entrySet()) {
String[] split = stringListEntry.getKey().split("_");
subGetBase=new SubGetBase();
subGetBase.setId(split[0]);
subGetBase.setName(split[1]);
subGetBase.setVoltageLevel(split[2]);
List<String> monitorIds = stringListEntry.getValue().stream().map(PmsStatationStatInfoDTO::getMonitorId).distinct().collect(Collectors.toList());
subGetBase.setUnitChildrenList(monitorIds);
subList.add(subGetBase);
}
}
// if (mapPms.containsKey(deptId)) {
// //获取部门下变电信息
// List<PmsMonitorBaseDTO> sub = mapPms.get(deptId);
// Map<String, List<PmsMonitorBaseDTO>> subMap = sub.stream()
// .collect(Collectors.groupingBy(x->x.getPowerrId()+"_"+x.getVoltageLevel()));
// for (Map.Entry<String, List<PmsMonitorBaseDTO>> stringListEntry : subMap.entrySet()) {
// String[] split = stringListEntry.getKey().split("_");
// subGetBase=new SubGetBase();
// subGetBase.setId(split[0]);
// subGetBase.setVoltageLevel(split[1]);
// List<String> monitorIds = stringListEntry.getValue().stream().map(PmsMonitorBaseDTO::getMonitorId).distinct().collect(Collectors.toList());
// subGetBase.setUnitChildrenList(monitorIds);
// subListPw.add(subGetBase);
// }
// }
}
deptGetSubStationDTO.setStationIds(subList);
}
result.add(deptGetSubStationDTO);
});
return result;
}
}