Procházet zdrojové kódy

指标项重新定义

raojiang před 2 měsíci
rodič
revize
cb59097e9b

+ 0 - 13
api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/request/FeederGroupRequest.java

@@ -1,13 +0,0 @@
-package com.hdkj.fhzg.optimization.request;
-
-import lombok.Data;
-
-/**
- * @author rj
- * @date 2026/5/22 17:34
- * @description
- */
-@Data
-public class FeederGroupRequest {
-    private String feederGroupId;
-}

+ 3 - 2
api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/request/FeederMetricsRequest.java → api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/request/MetricsRequest.java

@@ -4,10 +4,11 @@ import lombok.Data;
 
 /**
  * @author rj
- * @date 2026/5/23 18:53
+ * @date 2026/6/2 15:00
  * @description
  */
 @Data
-public class FeederMetricsRequest {
+public class MetricsRequest {
+    private String maintOrgId;
     private String feederId;
 }

+ 0 - 157
api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/response/FeederGroupMetrics.java

@@ -1,157 +0,0 @@
-package com.hdkj.fhzg.optimization.response;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.math.BigDecimal;
-
-/**
- * @author rj
- * @date 2026/5/22 17:26
- * @description
- */
-@Data
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class FeederGroupMetrics {
-
-    //运行问题
-    private OperationIssue operationIssue;
-
-    //时户数影响
-    private Reliability reliability;
-
-    //网损影响
-    private NetworkLossImpact networkLossImpact;
-
-    //网架结构问题
-    private NetworkStructureIssue networkStructureIssue;
-
-    /**
-     * 运行问题
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    @JsonInclude(JsonInclude.Include.NON_NULL)
-    public static class OperationIssue {
-
-        //运行问题分数
-        private BigDecimal operationIssueScore;
-
-        //重过载线路数
-        private Integer overloadLineCount;
-
-        //区域平均负载率
-        private Double avgLoadRate;
-
-        //电压越限节点数
-        private Integer voltageViolationNodeCount;
-
-        //整站N-1不通过数量
-        private Integer stationN1FailCount;
-
-        //馈线N-1不通过数量
-        private Integer feederN1FailCount;
-
-        //线路N-1通过率
-        private Double lineN1PassRate;
-    }
-
-    /**
-     * 可靠性
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    @JsonInclude(JsonInclude.Include.NON_NULL)
-    public static class Reliability {
-
-        //可靠性得分
-        private BigDecimal reliabilityScore;
-
-        //理论可靠性
-        private BigDecimal theoreticalReliability;
-
-        //停电线路数
-        private Double outageLineCount;
-
-        //停电配变数
-        private Double outageTransformerCount;
-
-        //影响低压用户总数
-        private Double affectedLowVoltageUserCount;
-
-        //重要/敏感用户失电数
-        private Double importantSensitiveUserLossCount;
-    }
-
-    /**
-     * 网损影响
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    @JsonInclude(JsonInclude.Include.NON_NULL)
-    public static class NetworkLossImpact {
-
-        //网损影响得分
-        private BigDecimal networkLossImpactScore;
-        //总网损
-        private Double totalNetworkLoss;
-
-        //网损不达标数量
-        private Double networkLossNonCompliantCount;
-
-        //网损达标率
-        private Double networkLossCompliantRate;
-
-        //功率因数不达标线路数
-        private Double powerFactorNonCompliantLineCount;
-    }
-
-    /**
-     * 网架结构问题
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    @JsonInclude(JsonInclude.Include.NON_NULL)
-    public static class NetworkStructureIssue {
-
-        //网架结构问题得分
-        private BigDecimal networkStructureIssueScore;
-        //单辐射线路数
-        private Double singleRadiationLineCount;
-
-        //线路联络率
-        private Double lineContactRate;
-
-        //复杂联络线路数
-        private Double complexContactLineCount;
-
-        //供电半径超标线路数
-        private Double powerRadiusExceedLineCount;
-
-        //大分支数量
-        private Double largeBranchCount;
-
-        //负荷组分段数不合理线路数
-        private Double unreasonableSegmentCount;
-
-        //负荷组用户数或容量异常
-        private Double abnormalLoadGroupCount;
-
-        //整线装机容量过大
-        private Double excessiveInstalledCapacityCount;
-
-        //整线挂接用户超80
-        private Double userExceed80Count;
-    }
-}

+ 0 - 207
api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/response/FeederMetricsResponse.java

@@ -1,207 +0,0 @@
-package com.hdkj.fhzg.optimization.response;
-
-/**
- * @author rj
- * @date 2026/5/23 18:51
- * @description
- */
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.math.BigDecimal;
-
-/**
- * 电网运行分析结果
- */
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class FeederMetricsResponse {
-
-    /**
-     * 运行问题
-     */
-    private OperationIssue operationIssue;
-
-    /**
-     * 可靠性
-     */
-    private Reliability reliability;
-
-    /**
-     * 网损影响
-     */
-    private NetworkLossImpact networkLossImpact;
-
-    /**
-     * 网架结构问题
-     */
-    private NetworkStructureIssue networkStructureIssue;
-
-    /**
-     * 运行问题
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    public static class OperationIssue {
-
-        //运行问题得分
-        private BigDecimal operationIssueScore;
-        /**
-         * 线路当前负载率
-         */
-        private BigDecimal currentLineLoadRate;
-
-        /**
-         * 电流越限线段数
-         */
-        private Integer currentOverlimitSegmentCount;
-
-        /**
-         * 电压越限节点数
-         */
-        private Integer voltageViolationNodeCount;
-
-        /**
-         * 转供裕度不足的对侧线路数
-         */
-        private Integer insufficientTransferCapacityLineCount;
-
-        /**
-         * 线路N-1校验
-         */
-        private Boolean lineN1Check;
-    }
-
-    /**
-     * 可靠性
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    public static class Reliability {
-
-        /**
-         * 可靠性得分
-         */
-        private BigDecimal reliabilityScore;
-
-        /**
-         * 线路状态
-         */
-        private String lineStatus;
-
-        /**
-         * 停电配变数
-         */
-        private Integer outageTransformerCount;
-
-        /**
-         * 理论可靠性
-         */
-        private BigDecimal theoreticalReliability;
-
-        /**
-         * 影响低压用户总数
-         */
-        private Integer affectedLowVoltageUserCount;
-
-        /**
-         * 重要/敏感用户失电数
-         */
-        private Integer importantSensitiveUserLossCount;
-    }
-
-    /**
-     * 网损影响
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    public static class NetworkLossImpact {
-
-        //网损影响得分
-        private BigDecimal networkLossImpactScore;
-        /**
-         * 有功网损值
-         */
-        private BigDecimal activePowerLoss;
-
-        /**
-         * 网损率
-         */
-        private BigDecimal lossRate;
-
-
-        /**
-         * 出口功率因数
-         */
-        private BigDecimal exportPowerFactor;
-
-    }
-
-    /**
-     * 网架结构问题
-     */
-    @Data
-    @Builder
-    @NoArgsConstructor
-    @AllArgsConstructor
-    public static class NetworkStructureIssue {
-
-        //网架结构问题得分
-        private BigDecimal networkStructureIssueScore;
-
-        /**
-         * 线路接线类型
-         */
-        private String lineConnectionType;
-
-        /**
-         * 线路联络开关数量
-         */
-        private Integer lineContactSwitchCount;
-
-        /**
-         * 整线装机容量
-         */
-        private BigDecimal totalInstalledCapacity;
-
-
-        /**
-         * 整线挂接用户总数
-         */
-        private Integer lineUserCount;
-
-
-        /**
-         * 负荷组用户数或容量异常
-         */
-        private String abnormalLoadGroupCount;
-
-        /**
-         * 负荷组分段数
-         */
-        private Integer loadGroupSegmentCount;
-
-
-        /**
-         * 大分支数量
-         */
-        private Integer largeBranchCount;
-
-        /**
-         * 线路供电半径
-         */
-        private BigDecimal linePowerSupplyRadius;
-
-    }
-}

+ 74 - 0
api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/response/OperationMetrics.java

@@ -0,0 +1,74 @@
+package com.hdkj.fhzg.optimization.response;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+/**
+ * @author rj
+ * @date 2026/6/2 14:44
+ * @description
+ */
+@Data
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class OperationMetrics {
+
+    private PowerReliability powerReliability;      // 供电可靠性
+    private VoltageQuality voltageQuality;          // 电压质量
+    private PowerSupplyCapacity powerSupplyCapacity; // 供电能力
+    private GridStructure gridStructure;            // 网架结构问题
+
+    // 供电可靠性
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class PowerReliability {
+        private Integer totalScore;                     // 总评分
+        private Integer theoreticalReliability;         // 理论可靠性
+        private Integer lineConnectionRate;             // 10kV线路联络率
+        private Integer lineN1PassRate;                 // 10kV线路N-1通过率
+        private Integer mainTransformerNFailCount;      // 主变N-1不通过数量
+        private Integer feederNFailCount;               // 馈线N-1不通过数量
+    }
+
+    // 电压质量
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class VoltageQuality {
+        private Integer totalScore;                         // 总评分
+        private Integer voltageViolationNodeCount;          // 电压越限节点数
+        private Integer voltageDeviationExceedIecCount;     // 电压偏差超出IEC标准用户数
+    }
+
+    // 供电能力
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class PowerSupplyCapacity {
+        private Integer totalScore;                         // 总评分
+        private Integer regionalMaxLoadRate;                // 区域最大负载率
+        private Integer regionalAvgLoadRate;                // 区域平均负载率
+        private Integer overloadLineCount;                  // 10kV线路重过载条数
+        private Integer lineLossComplianceRate;             // 网损达标率
+        private Integer lineLossNonComplianceCount;         // 网损不达标线路数
+        private Integer powerFactorNonComplianceCount;      // 功率因数不达标线路数
+    }
+
+    // 网架结构问题
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class GridStructure {
+        private Integer totalScore;                         // 总评分
+        private GridStructureItem standardizedGrid;         // 标准化网架
+        private GridStructureItem unreasonableConnection;   // 联络不合理
+        private GridStructureItem capacityAbnormal;         // 容量异常
+        private GridStructureItem unreasonableStructure;    // 结构不合理
+    }
+
+    // 网架结构问题项
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class GridStructureItem {
+        private Integer issueCount;   // 问题项数量
+        private Integer score;        // 评分
+    }
+
+}
+

+ 80 - 0
api/load-transfer-bf-api/src/main/java/com/hdkj/fhzg/optimization/response/StationGridMetrics.java

@@ -0,0 +1,80 @@
+package com.hdkj.fhzg.optimization.response;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * @author rj
+ * @date 2026/6/2 14:47
+ * @description
+ */
+@Data
+@Accessors(chain = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class StationGridMetrics {
+    private OperationStatusAssessment operationStatusAssessment; // 运行状态评估
+    private StandardizedGrid standardizedGrid;                   // 标准化网架
+    private UnreasonableConnection unreasonableConnection;       // 联络不合理
+    private CapacityAbnormal capacityAbnormal;                   // 容量异常
+    private UnreasonableStructure unreasonableStructure;         // 结构不合理
+
+
+    // 运行状态评估
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class OperationStatusAssessment {
+        private Integer totalScore;                       // 总评分
+        private Integer lineN1PassRate;                   // 10kV线路N-1通过率
+        private Integer mainTransformerNFailCount;        // 主变N-1不通过数量
+        private Integer feederNFailCount;                 // 馈线N-1不通过数量
+
+    }
+
+    // 标准化网架
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class StandardizedGrid {
+        private Integer totalScore;                       // 总评分
+        private Integer connectionStandardizationRate;    // 10kV接线标准化率
+        private Integer mainSectionStandardizationRate;   // 主干线截面标准化率
+        private Integer excessivePowerSupplyRadiusCount;  // 供电半径过长
+        private Integer unreasonableSegmentCount;          // 分段数不合理线路数
+        private Integer distributionAutomationInsufficientCount; // 配电自动化有效覆盖不足
+    }
+
+    // 联络不合理
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class UnreasonableConnection {
+        private Integer totalScore;                       // 总评分
+        private Integer lineNoConnectionRate;              // 线路无联络
+        private Integer noInterstationConnectionCount;     // 站间无联络线路数
+        private Integer unreasonableConnectionPointCount;  // 联络点设置不合理
+        private Integer feederSameBusConnectionCount;      // 馈线同母线联络
+        private Integer excessiveConnectionPointCount;     // 联络点过多
+    }
+
+    // 容量异常
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class CapacityAbnormal {
+        private Integer totalScore;                       // 总评
+        private Integer lineExceedStandardCapacityRate;    // 线路装接容量超标准
+        private Integer loadGroupCapacityAbnormalRate;     // 负荷组容量异常
+    }
+
+    // 结构不合理
+    @Data
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public static class UnreasonableStructure {
+        private Integer totalScore;                       // 总评分
+        private Integer lineSingleRadiationRate;           // 线路单辐射
+        private Integer feederMainLampHangingCount;        // 馈线主干"挂灯笼"
+        private Integer feederLargeBranchCount;            // 馈线存在大分支
+        private Integer mainChokePointCount;               // 主干卡脖子
+        private Integer overlengthFeederCount;             // 超长馈线
+    }
+}
+
+

+ 128 - 63
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/application/OptimizationApplication.java

@@ -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);
+    }
 }

+ 0 - 1
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/controller/optimization/FeederGroupController.java

@@ -1,6 +1,5 @@
 package com.hdkj.lt.bf.controller.optimization;
 
-import com.hdkj.fhzg.optimization.request.FeederGroupRequest;
 import com.hdkj.fhzg.optimization.request.FeederRequest;
 import com.hdkj.fhzg.optimization.response.FeederGroupTreeNode;
 import com.hdkj.hussar.ApiResponse;

+ 26 - 52
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/controller/optimization/OptimizationController.java

@@ -1,10 +1,8 @@
 package com.hdkj.lt.bf.controller.optimization;
 
-import com.alibaba.fastjson.JSON;
-import com.hdkj.fhzg.optimization.request.FeederGroupRequest;
-import com.hdkj.fhzg.optimization.request.FeederMetricsRequest;
-import com.hdkj.fhzg.optimization.response.FeederGroupMetrics;
-import com.hdkj.fhzg.optimization.response.FeederMetricsResponse;
+import com.hdkj.fhzg.optimization.request.MetricsRequest;
+import com.hdkj.fhzg.optimization.response.OperationMetrics;
+import com.hdkj.fhzg.optimization.response.StationGridMetrics;
 import com.hdkj.fhzg.optimization.response.StationSvgResponse;
 import com.hdkj.hussar.ApiResponse;
 import com.hdkj.lt.bf.application.OptimizationApplication;
@@ -32,66 +30,42 @@ public class OptimizationController {
 
 
     /**
-     * 获取接线组指标数据
+     * 获取站间联络图运行优化指标数据
      *
      * @return
      */
-    @PostMapping("/getFeederGroupMetrics")
-    public ApiResponse<FeederGroupMetrics> getFeederGroupMetrics(@RequestBody FeederGroupRequest request) {
-        String json = "{\n" +
-                "  \"operationIssue\": {\n" +
-                "    \"operationIssueScore\": 0.00,\n" +
-                "    \"overloadLineCount\": 0,\n" +
-                "    \"avgLoadRate\": 0.00,\n" +
-                "    \"voltageViolationNodeCount\": 0,\n" +
-                "    \"stationN1FailCount\": 0,\n" +
-                "    \"feederN1FailCount\": 0,\n" +
-                "    \"lineN1PassRate\": 0.00\n" +
-                "  },\n" +
-                "  \"reliability\": {\n" +
-                "    \"reliabilityScore\": 0.00,\n" +
-                "    \"theoreticalReliability\": 0.00,\n" +
-                "    \"outageLineCount\": 0.00,\n" +
-                "    \"outageTransformerCount\": 0.00,\n" +
-                "    \"affectedLowVoltageUserCount\": 0.00,\n" +
-                "    \"importantSensitiveUserLossCount\": 0.00\n" +
-                "  },\n" +
-                "  \"networkLossImpact\": {\n" +
-                "    \"networkLossImpactScore\": 0.00,\n" +
-                "    \"totalNetworkLoss\": 0.00,\n" +
-                "    \"networkLossNonCompliantCount\": 0.00,\n" +
-                "    \"networkLossCompliantRate\": 0.00,\n" +
-                "    \"powerFactorNonCompliantLineCount\": 0.00\n" +
-                "  },\n" +
-                "  \"networkStructureIssue\": {\n" +
-                "    \"networkStructureIssueScore\": 0.00,\n" +
-                "    \"singleRadiationLineCount\": 0.00,\n" +
-                "    \"lineContactRate\": 0.00,\n" +
-                "    \"complexContactLineCount\": 0.00,\n" +
-                "    \"powerRadiusExceedLineCount\": 0.00,\n" +
-                "    \"largeBranchCount\": 0.00,\n" +
-                "    \"unreasonableSegmentCount\": 0.00,\n" +
-                "    \"abnormalLoadGroupCount\": 0.00,\n" +
-                "    \"excessiveInstalledCapacityCount\": 0.00,\n" +
-                "    \"userExceed80Count\": 0.00\n" +
-                "  }\n" +
-                "}";
-        FeederGroupMetrics feederGroupMetrics = JSON.parseObject(json, FeederGroupMetrics.class);
-        return ApiResponse.success(feederGroupMetrics);
+    @PostMapping("/getStationOperationMetrics")
+    public ApiResponse<OperationMetrics> getStationOperationMetrics(@RequestBody MetricsRequest request) {
+        OperationMetrics stationMetrics = optimizationApplication.getStationOperationMetrics(request.getMaintOrgId());
+        return ApiResponse.success(stationMetrics);
     }
 
 
     /**
-     * 获取单线指标数据
+     * 获取单线运行优化指标数据
      *
      * @return
      */
-    @PostMapping("/getFeederMetrics")
-    public ApiResponse<FeederMetricsResponse> getFeederMetrics(@RequestBody FeederMetricsRequest request) {
-        FeederMetricsResponse feederMetrics = optimizationApplication.getFeederMetrics(request.getFeederId());
+    @PostMapping("/getFeederOperationMetrics")
+    public ApiResponse<OperationMetrics> getFeederOperationMetrics(@RequestBody MetricsRequest request) {
+        OperationMetrics feederMetrics = optimizationApplication.getFeederOperationMetrics(request.getFeederId());
         return ApiResponse.success(feederMetrics);
     }
 
+    /**
+     * 获取站间联络图网架优化指标数据
+     *
+     * @return
+     */
+    @PostMapping("/getStationGridMetrics")
+    public ApiResponse<StationGridMetrics> getStationGridMetrics(@RequestBody MetricsRequest request) {
+        StationGridMetrics stationGridMetrics = optimizationApplication.getStationGridMetrics(request.getMaintOrgId());
+        return ApiResponse.success(stationGridMetrics);
+    }
+
+
+
+
     /**
      * 获取站间联络图渲染数据
      *