|
|
@@ -1,15 +1,13 @@
|
|
|
package com.hdkj.lt.bf.application;
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.hdkj.fhzg.optimization.response.FeederMetricsResponse;
|
|
|
+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.*;
|
|
|
import com.hdkj.lt.bf.entity.convert.EntityToVOConvertor;
|
|
|
-import com.hdkj.lt.bf.entity.dto.FeederSectionDTO;
|
|
|
-import com.hdkj.lt.bf.mapper.FeederTopoMapper;
|
|
|
-import com.hdkj.lt.bf.service.*;
|
|
|
+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;
|
|
|
import com.hdkj.lt.core.sys.service.DwdShbDsFeederBaseService;
|
|
|
@@ -17,7 +15,6 @@ import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
@@ -35,13 +32,6 @@ public class OptimizationApplication {
|
|
|
|
|
|
private final IXlRelService xlRelService;
|
|
|
private final DwdShbDsFeederBaseService feederBaseService;
|
|
|
- private final FhzgElectricalModelConductorService conductorService;
|
|
|
- private final FhzgElectricalModelNodeService nodeService;
|
|
|
- private final FhzgElectricalModelTransformerService transformerService;
|
|
|
- private final FhzgElectricalModelSwitchService switchService;
|
|
|
- private final FhzgElectricalModelInjectionService injectionService;
|
|
|
- private final FhzgElectricalModelSectionService sectionService;
|
|
|
- private final FeederTopoMapper feederTopoMapper;
|
|
|
|
|
|
public List<StationSvgResponse> getStationSvg() {
|
|
|
List<DwdShbDsFeederBase> feederListByMaintOrg = feederBaseService.getFeederListByMaintOrg("60FDC66B3FC143DC9C39001215DDCC61");
|
|
|
@@ -68,63 +58,138 @@ public class OptimizationApplication {
|
|
|
return EntityToVOConvertor.INSTANCE.toStationSvgResponseList(contactFeederlist);
|
|
|
}
|
|
|
|
|
|
- public FeederMetricsResponse getFeederMetrics(String feederId) {
|
|
|
+
|
|
|
+ public OperationMetrics getStationOperationMetrics(String stationId) {
|
|
|
String json = "{\n" +
|
|
|
- " \"operationIssue\": {\n" +
|
|
|
- " \"operationIssueScore\": 90.16,\n" +
|
|
|
- " \"currentLineLoadRate\": 31.25,\n" +
|
|
|
- " \"currentOverlimitSegmentCount\": 0,\n" +
|
|
|
- " \"voltageViolationNodeCount\": 0,\n" +
|
|
|
- " \"insufficientTransferCapacityLineCount\": 0,\n" +
|
|
|
- " \"lineN1Check\": true\n" +
|
|
|
+ " \"powerReliability\": {\n" +
|
|
|
+ " \"totalScore\": 69,\n" +
|
|
|
+ " \"theoreticalReliability\": 65,\n" +
|
|
|
+ " \"lineConnectionRate\": 65,\n" +
|
|
|
+ " \"lineN1PassRate\": 5,\n" +
|
|
|
+ " \"mainTransformerNFailCount\": 1,\n" +
|
|
|
+ " \"feederNFailCount\": 1\n" +
|
|
|
" },\n" +
|
|
|
- " \"reliability\": {\n" +
|
|
|
- " \"reliabilityScore\": 85.63,\n" +
|
|
|
- " \"lineStatus\": \"正常运行\",\n" +
|
|
|
- " \"outageTransformerCount\": 0,\n" +
|
|
|
- " \"theoreticalReliability\": 100,\n" +
|
|
|
- " \"affectedLowVoltageUserCount\": 0,\n" +
|
|
|
- " \"importantSensitiveUserLossCount\": 0\n" +
|
|
|
+ " \"voltageQuality\": {\n" +
|
|
|
+ " \"totalScore\": 75,\n" +
|
|
|
+ " \"voltageViolationNodeCount\": 2,\n" +
|
|
|
+ " \"voltageDeviationExceedIecCount\": 2\n" +
|
|
|
" },\n" +
|
|
|
- " \"networkLossImpact\": {\n" +
|
|
|
- " \"networkLossImpactScore\": 91.00,\n" +
|
|
|
- " \"activePowerLoss\": 12.12,\n" +
|
|
|
- " \"lossRate\": 1.03,\n" +
|
|
|
- " \"exportPowerFactor\": 0.00\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" +
|
|
|
- " \"networkStructureIssue\": {\n" +
|
|
|
- " \"networkStructureIssueScore\": 0.00,\n" +
|
|
|
- " \"lineConnectionType\": \"架空多分段单联络\",\n" +
|
|
|
- " \"lineContactSwitchCount\": 1,\n" +
|
|
|
- " \"totalInstalledCapacity\": 8430.00,\n" +
|
|
|
- " \"lineUserCount\": 0,\n" +
|
|
|
- " \"abnormalLoadGroupCount\": \"Count_b\",\n" +
|
|
|
- " \"loadGroupSegmentCount\": 0,\n" +
|
|
|
- " \"largeBranchCount\": 0,\n" +
|
|
|
- " \"linePowerSupplyRadius\": 23.41\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" +
|
|
|
"}";
|
|
|
- FeederMetricsResponse feederMetrics = JSON.parseObject(json, FeederMetricsResponse.class);
|
|
|
-
|
|
|
- return feederMetrics;
|
|
|
+ return JSON.parseObject(json, OperationMetrics.class);
|
|
|
}
|
|
|
|
|
|
- public FeederSectionDTO getFeederSectionData(String feederId, Date date) {
|
|
|
- //目前仅长阳15DKX-5800一条断面
|
|
|
- FhzgElectricalModelSection section = sectionService.getOne(new LambdaQueryWrapper<FhzgElectricalModelSection>().eq(FhzgElectricalModelSection::getFeederId, feederId));
|
|
|
- String sectionId = section.getSectionId();
|
|
|
- List<FhzgElectricalModelConductor> conductorList = conductorService.list(new LambdaQueryWrapper<FhzgElectricalModelConductor>().eq(FhzgElectricalModelConductor::getSectionId, sectionId));
|
|
|
- List<FhzgElectricalModelNode> nodeList = nodeService.list(new LambdaQueryWrapper<FhzgElectricalModelNode>().eq(FhzgElectricalModelNode::getSectionId, sectionId));
|
|
|
- List<FhzgElectricalModelTransformer> transformerList = transformerService.list(new LambdaQueryWrapper<FhzgElectricalModelTransformer>().eq(FhzgElectricalModelTransformer::getSectionId, sectionId));
|
|
|
- List<FhzgElectricalModelSwitch> switchList = switchService.list(new LambdaQueryWrapper<FhzgElectricalModelSwitch>().eq(FhzgElectricalModelSwitch::getSectionId, sectionId));
|
|
|
- List<FhzgElectricalModelInjection> injectionList = injectionService.list(new LambdaQueryWrapper<FhzgElectricalModelInjection>().eq(FhzgElectricalModelInjection::getSectionId, sectionId));
|
|
|
- return new FeederSectionDTO().setSection(section)
|
|
|
- .setNodeList(nodeList)
|
|
|
- .setTransformerList(transformerList)
|
|
|
- .setSwitchList(switchList)
|
|
|
- .setConductorList(conductorList)
|
|
|
- .setInjectionList(injectionList);
|
|
|
+ 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" +
|
|
|
+ "}";
|
|
|
+ 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" +
|
|
|
+ "}";
|
|
|
+ return JSON.parseObject(json, StationGridMetrics.class);
|
|
|
+ }
|
|
|
}
|