|
|
@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.hdkj.fhzg.optimization.response.OperationMetrics;
|
|
|
import com.hdkj.fhzg.optimization.response.StationGridMetrics;
|
|
|
import com.hdkj.fhzg.optimization.response.StationSvgResponse;
|
|
|
+import com.hdkj.lt.bf.entity.FhzgOptimizationFeederMetrics;
|
|
|
import com.hdkj.lt.bf.entity.convert.EntityToVOConvertor;
|
|
|
+import com.hdkj.lt.bf.service.FhzgOptimizationFeederMetricsService;
|
|
|
import com.hdkj.lt.bf.service.IXlRelService;
|
|
|
import com.hdkj.lt.core.bizms.modle.po.DwdShbDsFeederBase;
|
|
|
import com.hdkj.lt.core.bizms.modle.po.XlRel;
|
|
|
@@ -32,11 +34,14 @@ public class OptimizationApplication {
|
|
|
|
|
|
private final IXlRelService xlRelService;
|
|
|
private final DwdShbDsFeederBaseService feederBaseService;
|
|
|
+ private final FhzgOptimizationFeederMetricsService feederMetricsService;
|
|
|
|
|
|
- public List<StationSvgResponse> getStationSvg() {
|
|
|
- List<DwdShbDsFeederBase> feederListByMaintOrg = feederBaseService.getFeederListByMaintOrg("60FDC66B3FC143DC9C39001215DDCC61");
|
|
|
- Map<String, String> stationMap = feederListByMaintOrg.stream().collect(Collectors.toMap(DwdShbDsFeederBase::getStartStationName, DwdShbDsFeederBase::getStartStation, (i, j) -> i));
|
|
|
- List<String> feederIdList = feederListByMaintOrg.stream().map(DwdShbDsFeederBase::getPsrId).collect(Collectors.toList());
|
|
|
+ public List<StationSvgResponse> getStationSvg(String maintOrg) {
|
|
|
+ List<DwdShbDsFeederBase> feederList = feederBaseService.lambdaQuery().eq(DwdShbDsFeederBase::getPsrState, "20")
|
|
|
+ .eq(DwdShbDsFeederBase::getPubPrivFlag, "0")
|
|
|
+ .eq(DwdShbDsFeederBase::getMaintOrg, maintOrg).list();
|
|
|
+ Map<String, String> stationMap = feederList.stream().collect(Collectors.toMap(DwdShbDsFeederBase::getStartStationName, DwdShbDsFeederBase::getStartStation, (i, j) -> i));
|
|
|
+ List<String> feederIdList = feederList.stream().map(DwdShbDsFeederBase::getPsrId).collect(Collectors.toList());
|
|
|
//有联络的线路
|
|
|
List<XlRel> contactFeederlist = xlRelService.list(new LambdaQueryWrapper<XlRel>().in(XlRel::getXlIdOne, feederIdList));
|
|
|
for (XlRel xlRel : contactFeederlist) {
|
|
|
@@ -45,7 +50,7 @@ public class OptimizationApplication {
|
|
|
}
|
|
|
Set<String> contactFeederIdlist = contactFeederlist.stream().map(XlRel::getXlIdOne).collect(Collectors.toSet());
|
|
|
//单辐射线路
|
|
|
- List<DwdShbDsFeederBase> collect = feederListByMaintOrg.stream().filter(i -> !contactFeederIdlist.contains(i.getPsrId())).collect(Collectors.toList());
|
|
|
+ List<DwdShbDsFeederBase> collect = feederList.stream().filter(i -> !contactFeederIdlist.contains(i.getPsrId())).collect(Collectors.toList());
|
|
|
for (DwdShbDsFeederBase dwdShbDsFeederBase : collect) {
|
|
|
XlRel xlRel = new XlRel();
|
|
|
xlRel.setId(String.valueOf(IdUtil.getSnowflakeNextId()));
|
|
|
@@ -60,136 +65,20 @@ public class OptimizationApplication {
|
|
|
|
|
|
|
|
|
public OperationMetrics getStationOperationMetrics(String stationId) {
|
|
|
- String json = "{\n" +
|
|
|
- " \"powerReliability\": {\n" +
|
|
|
- " \"totalScore\": 69,\n" +
|
|
|
- " \"theoreticalReliability\": 65,\n" +
|
|
|
- " \"lineConnectionRate\": 65,\n" +
|
|
|
- " \"lineN1PassRate\": 5,\n" +
|
|
|
- " \"mainTransformerNFailCount\": 1,\n" +
|
|
|
- " \"feederNFailCount\": 1\n" +
|
|
|
- " },\n" +
|
|
|
- " \"voltageQuality\": {\n" +
|
|
|
- " \"totalScore\": 75,\n" +
|
|
|
- " \"voltageViolationNodeCount\": 2,\n" +
|
|
|
- " \"voltageDeviationExceedIecCount\": 2\n" +
|
|
|
- " },\n" +
|
|
|
- " \"powerSupplyCapacity\": {\n" +
|
|
|
- " \"totalScore\": 96,\n" +
|
|
|
- " \"regionalMaxLoadRate\": 80,\n" +
|
|
|
- " \"regionalAvgLoadRate\": 80,\n" +
|
|
|
- " \"overloadLineCount\": 5,\n" +
|
|
|
- " \"lineLossComplianceRate\": 80,\n" +
|
|
|
- " \"lineLossNonComplianceCount\": 27,\n" +
|
|
|
- " \"powerFactorNonComplianceCount\": 27\n" +
|
|
|
- " },\n" +
|
|
|
- " \"gridStructure\": {\n" +
|
|
|
- " \"totalScore\": 78,\n" +
|
|
|
- " \"standardizedGrid\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 92\n" +
|
|
|
- " },\n" +
|
|
|
- " \"unreasonableConnection\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 90\n" +
|
|
|
- " },\n" +
|
|
|
- " \"capacityAbnormal\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 97\n" +
|
|
|
- " },\n" +
|
|
|
- " \"unreasonableStructure\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 95\n" +
|
|
|
- " }\n" +
|
|
|
- " }\n" +
|
|
|
- "}";
|
|
|
+ FhzgOptimizationFeederMetrics byId = feederMetricsService.getById(1);
|
|
|
+ String json = byId.getJsonResult();
|
|
|
return JSON.parseObject(json, OperationMetrics.class);
|
|
|
}
|
|
|
|
|
|
public OperationMetrics getFeederOperationMetrics(String feederId) {
|
|
|
- String json = "{\n" +
|
|
|
- " \"powerReliability\": {\n" +
|
|
|
- " \"totalScore\": 69,\n" +
|
|
|
- " \"theoreticalReliability\": 65,\n" +
|
|
|
- " \"lineConnectionRate\": 65,\n" +
|
|
|
- " \"lineN1PassRate\": 5,\n" +
|
|
|
- " \"feederNFailCount\": 1\n" +
|
|
|
- " },\n" +
|
|
|
- " \"voltageQuality\": {\n" +
|
|
|
- " \"totalScore\": 75,\n" +
|
|
|
- " \"voltageViolationNodeCount\": 2,\n" +
|
|
|
- " \"voltageDeviationExceedIecCount\": 2\n" +
|
|
|
- " },\n" +
|
|
|
- " \"powerSupplyCapacity\": {\n" +
|
|
|
- " \"totalScore\": 96,\n" +
|
|
|
- " \"regionalMaxLoadRate\": 80,\n" +
|
|
|
- " \"regionalAvgLoadRate\": 80,\n" +
|
|
|
- " \"overloadLineCount\": 5,\n" +
|
|
|
- " \"lineLossComplianceRate\": 80,\n" +
|
|
|
- " \"lineLossNonComplianceCount\": 27,\n" +
|
|
|
- " \"powerFactorNonComplianceCount\": 27\n" +
|
|
|
- " },\n" +
|
|
|
- " \"gridStructure\": {\n" +
|
|
|
- " \"totalScore\": 78,\n" +
|
|
|
- " \"standardizedGrid\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 92\n" +
|
|
|
- " },\n" +
|
|
|
- " \"unreasonableConnection\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 90\n" +
|
|
|
- " },\n" +
|
|
|
- " \"capacityAbnormal\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 97\n" +
|
|
|
- " },\n" +
|
|
|
- " \"unreasonableStructure\": {\n" +
|
|
|
- " \"issueCount\": 2,\n" +
|
|
|
- " \"score\": 95\n" +
|
|
|
- " }\n" +
|
|
|
- " }\n" +
|
|
|
- "}";
|
|
|
+ FhzgOptimizationFeederMetrics byId = feederMetricsService.getById(2);
|
|
|
+ String json = byId.getJsonResult();
|
|
|
return JSON.parseObject(json, OperationMetrics.class);
|
|
|
}
|
|
|
|
|
|
public StationGridMetrics getStationGridMetrics(String stationId) {
|
|
|
- String json = "{\n" +
|
|
|
- " \"operationStatusAssessment\": {\n" +
|
|
|
- " \"totalScore\": 69,\n" +
|
|
|
- " \"lineN1PassRate\": 5,\n" +
|
|
|
- " \"mainTransformerNFailCount\": 1,\n" +
|
|
|
- " \"feederNFailCount\": 1\n" +
|
|
|
- " },\n" +
|
|
|
- " \"standardizedGrid\": {\n" +
|
|
|
- " \"totalScore\": 69,\n" +
|
|
|
- " \"connectionStandardizationRate\": 5,\n" +
|
|
|
- " \"mainSectionStandardizationRate\": 1,\n" +
|
|
|
- " \"excessivePowerSupplyRadiusCount\": 1,\n" +
|
|
|
- " \"unreasonableSegmentCount\": 5,\n" +
|
|
|
- " \"distributionAutomationInsufficientCount\": 1\n" +
|
|
|
- " },\n" +
|
|
|
- " \"unreasonableConnection\": {\n" +
|
|
|
- " \"totalScore\": 75,\n" +
|
|
|
- " \"lineNoConnectionRate\": 5,\n" +
|
|
|
- " \"noInterstationConnectionCount\": 1,\n" +
|
|
|
- " \"unreasonableConnectionPointCount\": 1,\n" +
|
|
|
- " \"feederSameBusConnectionCount\": 2,\n" +
|
|
|
- " \"excessiveConnectionPointCount\": 2\n" +
|
|
|
- " },\n" +
|
|
|
- " \"capacityAbnormal\": {\n" +
|
|
|
- " \"totalScore\": 96,\n" +
|
|
|
- " \"lineExceedStandardCapacityRate\": 80,\n" +
|
|
|
- " \"loadGroupCapacityAbnormalRate\": 80\n" +
|
|
|
- " },\n" +
|
|
|
- " \"unreasonableStructure\": {\n" +
|
|
|
- " \"totalScore\": 75,\n" +
|
|
|
- " \"lineSingleRadiationRate\": 5,\n" +
|
|
|
- " \"feederMainLampHangingCount\": 1,\n" +
|
|
|
- " \"feederLargeBranchCount\": 1,\n" +
|
|
|
- " \"mainChokePointCount\": 2,\n" +
|
|
|
- " \"overlengthFeederCount\": 2\n" +
|
|
|
- " }\n" +
|
|
|
- "}";
|
|
|
+ FhzgOptimizationFeederMetrics byId = feederMetricsService.getById(3);
|
|
|
+ String json = byId.getJsonResult();
|
|
|
return JSON.parseObject(json, StationGridMetrics.class);
|
|
|
}
|
|
|
}
|