合并代码
This commit is contained in:
21
pom.xml
21
pom.xml
@@ -23,6 +23,7 @@
|
|||||||
<module>pqs-advance</module>
|
<module>pqs-advance</module>
|
||||||
<module>pqs-prepare</module>
|
<module>pqs-prepare</module>
|
||||||
<module>pqs-process</module>
|
<module>pqs-process</module>
|
||||||
|
<module>pqs-algorithm</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>灿能微服务生态系统</name>
|
<name>灿能微服务生态系统</name>
|
||||||
@@ -41,15 +42,17 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!--中间件目标地址-->
|
<!--中间件目标地址-->
|
||||||
<!-- <middle.server.url>198.120.100.195</middle.server.url>-->
|
<!-- <middle.server.url>198.120.100.195</middle.server.url>-->
|
||||||
<middle.server.url>192.168.1.28</middle.server.url>
|
<middle.server.url>192.168.1.31</middle.server.url>
|
||||||
<!--微服务模块发布地址-->
|
<!--微服务模块发布地址-->
|
||||||
<service.server.url>192.168.1.29</service.server.url>
|
<!-- <service.server.url>198.120.100.195</service.server.url>-->
|
||||||
|
<service.server.url>192.168.1.111</service.server.url>
|
||||||
<!--docker仓库地址-->
|
<!--docker仓库地址-->
|
||||||
<docker.server.url>192.168.1.13</docker.server.url>
|
<docker.server.url>192.168.1.13</docker.server.url>
|
||||||
<!--nacos的ip:port-->
|
<!--nacos的ip:port-->
|
||||||
<nacos.url>${middle.server.url}:18848</nacos.url>
|
<nacos.url>${middle.server.url}:18848</nacos.url>
|
||||||
<!--服务器发布内容为空-->
|
<!--服务器发布内容为空-->
|
||||||
<nacos.namespace></nacos.namespace>
|
<nacos.namespace></nacos.namespace>
|
||||||
|
<!-- <nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>-->
|
||||||
<!-- <nacos.namespace>ba3ba5d1-3480-4755-8b87-6b1fce16201c</nacos.namespace>-->
|
<!-- <nacos.namespace>ba3ba5d1-3480-4755-8b87-6b1fce16201c</nacos.namespace>-->
|
||||||
<!-- <nacos.namespace>f6df4a49-39cb-4355-a8fd-8aeb0c537eb1</nacos.namespace>-->
|
<!-- <nacos.namespace>f6df4a49-39cb-4355-a8fd-8aeb0c537eb1</nacos.namespace>-->
|
||||||
<!--sentinel:port-->
|
<!--sentinel:port-->
|
||||||
@@ -63,7 +66,7 @@
|
|||||||
<docker.repostory>${docker.server.url}:8090</docker.repostory>
|
<docker.repostory>${docker.server.url}:8090</docker.repostory>
|
||||||
<!--docker远程项目仓库名-->
|
<!--docker远程项目仓库名-->
|
||||||
<docker.registry.name>njcn</docker.registry.name>
|
<docker.registry.name>njcn</docker.registry.name>
|
||||||
<docker.operate>install</docker.operate>
|
<docker.operate>test</docker.operate>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
@@ -78,7 +81,10 @@
|
|||||||
<mybatis.version>2.1.3</mybatis.version>
|
<mybatis.version>2.1.3</mybatis.version>
|
||||||
<druid.version>1.2.5</druid.version>
|
<druid.version>1.2.5</druid.version>
|
||||||
<mysql.version>8.0.19</mysql.version>
|
<mysql.version>8.0.19</mysql.version>
|
||||||
|
<oracle.version>21.6.0.0</oracle.version>
|
||||||
|
<orai18n.version>21.1.0.0</orai18n.version>
|
||||||
<mybatis-plus.version>3.4.2</mybatis-plus.version>
|
<mybatis-plus.version>3.4.2</mybatis-plus.version>
|
||||||
|
<dynamic-datasource.version>3.5.1</dynamic-datasource.version>
|
||||||
<mybatis-plus.jeffreyning.version>1.5.1-RELEASE</mybatis-plus.jeffreyning.version>
|
<mybatis-plus.jeffreyning.version>1.5.1-RELEASE</mybatis-plus.jeffreyning.version>
|
||||||
<mybatis-plus-generator.version>3.5.1</mybatis-plus-generator.version>
|
<mybatis-plus-generator.version>3.5.1</mybatis-plus-generator.version>
|
||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
@@ -191,7 +197,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.oracle.database.nls</groupId>
|
<groupId>com.oracle.database.nls</groupId>
|
||||||
<artifactId>orai18n</artifactId>
|
<artifactId>orai18n</artifactId>
|
||||||
<version>21.1.0.0</version>
|
<version>${orai18n.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- mybatis-plus -->
|
<!-- mybatis-plus -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -343,6 +349,13 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 多数据源切换,当数据源为oracle时需要使用 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
<version>${dynamic-datasource.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -51,6 +51,13 @@ public interface DistributionMonitorClient {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("distributionMonitorList")
|
@PostMapping("distributionMonitorList")
|
||||||
HttpResult<List<DistributionMonitor>> distributionMonitorList(@RequestBody List<String> monitorIds);
|
HttpResult<List<DistributionMonitor>> distributionMonitorList(@RequestBody List<String> monitorIds);
|
||||||
|
/**
|
||||||
|
* @Description: 获取配网所有监测点数据
|
||||||
|
* @Param: []
|
||||||
|
* @return: com.njcn.common.pojo.response.HttpResult<java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2022/12/13
|
||||||
|
*/
|
||||||
|
@PostMapping("distributionMonitorListByCondition")
|
||||||
|
public HttpResult<List<DistributionMonitor>> distributionMonitorListByCondition(@RequestParam("orgId")String orgId,@RequestParam("monitorSort")String monitorSort);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,12 @@ public interface PwMonitorClient {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/getPwMonitorList")
|
@PostMapping("/getPwMonitorList")
|
||||||
HttpResult<List<PwPmsMonitorDTO>> getPwMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
|
HttpResult<List<PwPmsMonitorDTO>> getPwMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分布式光伏配网所有监测点信息
|
||||||
|
* @param pwPmsMonitorParam 参数条件
|
||||||
|
* @return 配网所有监测点信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/getPwPhotovoltaicMonitorList")
|
||||||
|
HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ public class DistributionMonitorClientFallbackFactory implements FallbackFactory
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<DistributionMonitor>> distributionMonitorListByCondition(@RequestParam("orgId")String orgId,@RequestParam("monitorSort")String monitorSort) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取配网所有监测点", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ public class PwMonitorClientFallbackFactory implements FallbackFactory<PwMonitor
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "获取配网所有监测点信息", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "获取配网所有监测点信息", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取分布式光伏配网所有监测点信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.njcn.device.pms.pojo.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (PmsTractionStation)实体类
|
* (PmsTractionStation)实体类
|
||||||
@@ -22,6 +22,10 @@ public class PmsTractionStationDTO implements Serializable {
|
|||||||
* 牵引站名称
|
* 牵引站名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
/**
|
||||||
|
* 铁路类型
|
||||||
|
*/
|
||||||
|
private Integer railwayType;
|
||||||
/**
|
/**
|
||||||
* 组织机构名称
|
* 组织机构名称
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +81,7 @@ public class PmsTractionStationDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建日期
|
* 创建日期
|
||||||
*/
|
*/
|
||||||
private Date createdDate;
|
private LocalDateTime createdDate;
|
||||||
/**
|
/**
|
||||||
* 用户标签
|
* 用户标签
|
||||||
*/
|
*/
|
||||||
@@ -97,7 +101,7 @@ public class PmsTractionStationDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private Date createTime;
|
private LocalDateTime createTime;
|
||||||
/**
|
/**
|
||||||
* 更新用户
|
* 更新用户
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +109,7 @@ public class PmsTractionStationDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
private Date updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.device.pms.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <专项分析-入参>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SpecialAnalysisParam {
|
||||||
|
|
||||||
|
// @ApiModelProperty(name = "id", value = "按单位统计,id为单位索引")
|
||||||
|
// private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "type", value = "类型(0-风电场 1-光伏电站 2冶炼负荷)")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据传参
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class CompareDateParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "year", value = "年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "month", value = "月份")
|
||||||
|
private List<String> month;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 数据传参
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class CompareParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "powerVoltageLevel", value = "电压等级")
|
||||||
|
private List<String> powerVoltageLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "year", value = "年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "month", value = "月份")
|
||||||
|
private List<String> month;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 牵引站台账数据质量问题-核查详情(RStatTractionStationAccountDetail)实体类
|
* 台账数据质量问题-核查详情(RStatTractionStationAccountDetail)实体类
|
||||||
*
|
*
|
||||||
* @author yzh
|
* @author yzh
|
||||||
* @since 2022-11-09 09:42:42
|
* @since 2022-11-09 09:42:42
|
||||||
|
|||||||
@@ -0,0 +1,222 @@
|
|||||||
|
package com.njcn.device.pms.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专项分析
|
||||||
|
* @author wr
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SpecialAnalysisMonitorVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "specialAnalysisVOList", value = "监测点信息")
|
||||||
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> specialAnalysisVOList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级分布(监测点)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "voltageLevelMap", value = "电压等级分布(监测点)")
|
||||||
|
List<Map<String,String>> voltageLevelMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同环比详细数据
|
||||||
|
*/
|
||||||
|
// @ApiModelProperty(name = "compareVOMap", value = "同比环比详细数据")
|
||||||
|
// Map<String,CompareVO> compareVOMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class SpecialAnalysisVO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "id", value = "监测点ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "name", value = "监测点名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站ID(外键)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "powerrId", value = "电站ID(外键)")
|
||||||
|
private String powerrId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "powerrName", value = "变电站名称")
|
||||||
|
private String powerrName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "longitude", value = "经度")
|
||||||
|
private Double longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "latitude", value = "维度")
|
||||||
|
private Double latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级(字典)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "voltageLevel", value = "电压等级(字典)")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点容量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "capacity", value = "监测点容量")
|
||||||
|
private Double capacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点标签
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "monitorTag", value = "监测点标签")
|
||||||
|
private String monitorTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的监测终端编号(外键)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "terminalId", value = "关联的监测终端编号(外键)")
|
||||||
|
private String terminalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据比较
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class CompareVO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "tractionStation", value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "tractionStation", value = "牵引站数量")
|
||||||
|
private String tractionStation;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "num", value = "监测点数量")
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "ytbSumNum", value = "同比数量")
|
||||||
|
private String ytbSumNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "yhbSumNum", value = "环比数量")
|
||||||
|
private String yhbSumNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "sameNum", value = "监测点数量同比")
|
||||||
|
private String sameNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "ringNum", value = "监测点数量环比")
|
||||||
|
private String ringNum;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接线类型详细信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class WiringTypeDetail {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "connet_group_way", value = "接线类型")
|
||||||
|
private String connetGroupWay;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "num", value = "牵引站数量")
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "rateAvg", value = "负载量(平均值)")
|
||||||
|
private String rateAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "rate95", value = "负载量(95值)")
|
||||||
|
private String rate95;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "rate99", value = "负载量(99值)")
|
||||||
|
private String rate99;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class CompareDetailVO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风电场 same同比 ring环比
|
||||||
|
*/
|
||||||
|
private String sumNum;
|
||||||
|
private String ytbSumNum;
|
||||||
|
private String yhbSumNum;
|
||||||
|
private String sameNum;
|
||||||
|
private String ringNum;
|
||||||
|
private String capacity;
|
||||||
|
private String ytbCapacity;
|
||||||
|
private String yhbCapacity;
|
||||||
|
private String sameCapacity;
|
||||||
|
private String ringCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏电站 same同比 ring环比
|
||||||
|
*/
|
||||||
|
private String sumNum2;
|
||||||
|
private String ytbSumNum2;
|
||||||
|
private String yhbSumNum2;
|
||||||
|
private String sameNum2;
|
||||||
|
private String ringNum2;
|
||||||
|
private String capacity2;
|
||||||
|
private String ytbCapacity2;
|
||||||
|
private String yhbCapacity2;
|
||||||
|
private String sameCapacity2;
|
||||||
|
private String ringCapacity2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电气化铁路 same同比 ring环比
|
||||||
|
*/
|
||||||
|
private String sumNum3;
|
||||||
|
private String ytbSumNum3;
|
||||||
|
private String yhbSumNum3;
|
||||||
|
private String sameNum3;
|
||||||
|
private String ringNum3;
|
||||||
|
private String capacity3;
|
||||||
|
private String ytbCapacity3;
|
||||||
|
private String yhbCapacity3;
|
||||||
|
private String sameCapacity3;
|
||||||
|
private String ringCapacity3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冶炼负荷 same同比 ring环比
|
||||||
|
*/
|
||||||
|
private String sumNum4;
|
||||||
|
private String ytbSumNum4;
|
||||||
|
private String yhbSumNum4;
|
||||||
|
private String sameNum4;
|
||||||
|
private String ringNum4;
|
||||||
|
private String capacity4;
|
||||||
|
private String ytbCapacity4;
|
||||||
|
private String yhbCapacity4;
|
||||||
|
private String sameCapacity4;
|
||||||
|
private String ringCapacity4;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -60,7 +60,25 @@ public class PwMonitorController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分布式光伏配网所有监测点信息
|
||||||
|
*
|
||||||
|
* @param pwPmsMonitorParam 参数条件
|
||||||
|
* @return 配网所有监测点信息
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getPwPhotovoltaicMonitorList")
|
||||||
|
@ApiOperation("获取分布式光伏配网所有监测点信息")
|
||||||
|
@ApiImplicitParam(name = "pwPmsMonitorParam",value = "获取分布式光伏配网所有监测点信息",required = true)
|
||||||
|
public HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(@RequestBody @Validated PwPmsMonitorParam pwPmsMonitorParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getPwPhotovoltaicMonitorList");
|
||||||
|
List<PwPmsMonitorDTO> monitorList = iPwMonitorService.getPwPhotovoltaicMonitorList(pwPmsMonitorParam);
|
||||||
|
if (CollectionUtil.isEmpty(monitorList)) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorList, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.njcn.device.pms.pojo.vo.DoubleUserVO;
|
|||||||
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -76,6 +77,25 @@ public class DistributionMonitorController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按部门获取旗下配网所有监测点(分一类,二类,三类)
|
||||||
|
* @author clam
|
||||||
|
* @date 2022/11/29
|
||||||
|
*/
|
||||||
|
@PostMapping("distributionMonitorListByCondition")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("按部门获取旗下配网所有监测点(分一类,二类,三类)")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "orgId", value = "机构编号", required = true),
|
||||||
|
@ApiImplicitParam(name = "monitorSort", value = "监测点分类",required = true),
|
||||||
|
|
||||||
|
})
|
||||||
|
public HttpResult<List<DistributionMonitor>> distributionMonitorListByCondition(@RequestParam("orgId")String orgId,@RequestParam("monitorSort")String monitorSort){
|
||||||
|
String methodDescribe = getMethodDescribe("distributionMonitorList");
|
||||||
|
List<DistributionMonitor> res = iDistributionMonitorService.distributionMonitorListByCondition(orgId,monitorSort);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定组织下的发电用电用户
|
* 获取指定组织下的发电用电用户
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
package com.njcn.device.pms.controller.majornetwork;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||||
|
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||||
|
import com.njcn.device.pms.service.majornetwork.SpecialAnalysisService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 专项分析-地图展示数据
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2022-11-30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "专项分析-地图展示数据")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/SpecialAnalysisController")
|
||||||
|
public class SpecialAnalysisController extends BaseController {
|
||||||
|
|
||||||
|
private final SpecialAnalysisService specialAnalysisService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专项分析-地图展示数据
|
||||||
|
*
|
||||||
|
* @param param 前端传入参数
|
||||||
|
* @return 专项分析-地图展示数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/getMapDisplay")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("地图展示数据-地图监测点(风电场,光伏电站,冶炼负荷)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||||
|
public HttpResult<SpecialAnalysisMonitorVO> getMapDisplay(@RequestBody SpecialAnalysisParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getMapDisplay");
|
||||||
|
SpecialAnalysisMonitorVO sm= specialAnalysisService.getMonitorList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专项分析-地图展示数据
|
||||||
|
*
|
||||||
|
* @param param 前端传入参数
|
||||||
|
* @return 专项分析-地图展示数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/getYoYList")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("地图展示数据-数据同比环比(风电场,光伏电站,冶炼负荷)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||||
|
public HttpResult<SpecialAnalysisMonitorVO.CompareDetailVO> getYoYList(@RequestBody SpecialAnalysisParam.CompareDateParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getYoYList");
|
||||||
|
SpecialAnalysisMonitorVO.CompareDetailVO vo = specialAnalysisService.getYoYList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专项分析-地图展示数据
|
||||||
|
*
|
||||||
|
* @param param 前端传入参数
|
||||||
|
* @return 专项分析-地图展示数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/getDisplayRailway")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("地图展示数据-地图监测点(电气化铁路)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||||
|
public HttpResult<List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> getDisplayRailway(@RequestBody SpecialAnalysisParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getDisplayRailway");
|
||||||
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> sm= specialAnalysisService.getDisplayRailway(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专项分析-地图展示数据
|
||||||
|
*
|
||||||
|
* @param param 前端传入参数
|
||||||
|
* @return 专项分析-地图展示数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/getMapDisplayRailway")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("地图展示数据-按电压展示数据(电气铁路)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||||
|
public HttpResult<List<SpecialAnalysisMonitorVO.CompareVO>> getMapDisplayRailway(@RequestBody SpecialAnalysisParam.CompareParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getMapDisplayRailway");
|
||||||
|
List<SpecialAnalysisMonitorVO.CompareVO> sm= specialAnalysisService.getMapDisplayRailway(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专项分析-地图展示数据
|
||||||
|
*
|
||||||
|
* @param param 前端传入参数
|
||||||
|
* @return 专项分析-地图展示数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/getWiringTypeRailway")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("地图展示数据-按接线类型展示(电气化铁路)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||||
|
public HttpResult<List<SpecialAnalysisMonitorVO.WiringTypeDetail>> getWiringTypeRailway(@RequestBody SpecialAnalysisParam.CompareDateParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getWiringTypeRailway");
|
||||||
|
List<SpecialAnalysisMonitorVO.WiringTypeDetail> sm= specialAnalysisService.getWiringTypeRailway(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -23,4 +23,14 @@ public interface PwMonitorMapper {
|
|||||||
*/
|
*/
|
||||||
List<PwPmsMonitorDTO> getPwMonitorDataList(@Param("deptIdList") List<String> deptIdList,
|
List<PwPmsMonitorDTO> getPwMonitorDataList(@Param("deptIdList") List<String> deptIdList,
|
||||||
@Param("pwPmsMonitorParam") PwPmsMonitorParam pwPmsMonitorParam);
|
@Param("pwPmsMonitorParam") PwPmsMonitorParam pwPmsMonitorParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分布式光伏配网所有监测点信息
|
||||||
|
*
|
||||||
|
* @param deptIdList 所有子部门索引
|
||||||
|
* @param pwPmsMonitorParam 查询条件
|
||||||
|
* @return 配网监测点信息
|
||||||
|
*/
|
||||||
|
List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("pwPmsMonitorParam") PwPmsMonitorParam pwPmsMonitorParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,5 +123,94 @@
|
|||||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||||
|
SELECT DISTINCT
|
||||||
|
monitor.Org_Id AS orgId,
|
||||||
|
monitor.Org_Name AS orgName,
|
||||||
|
monitor.`Powerr_Id` AS powerId,
|
||||||
|
monitor.`Powerr_Name` AS powerName,
|
||||||
|
monitor.id AS monitorId,
|
||||||
|
monitor.`Name` AS monitorName,
|
||||||
|
monitor.Line_Id,
|
||||||
|
monitor.Line_Name,
|
||||||
|
pdm.Monitor_Sort AS monitorSort,
|
||||||
|
pdm.Voltage_Level AS voltageLevel,
|
||||||
|
pdm.If_Power_User AS if_powerUser,
|
||||||
|
pdm.Monitor_State AS monitorState,
|
||||||
|
pdm.Created_Date AS createdDate,
|
||||||
|
pdm.STATUS AS STATUS,
|
||||||
|
pdm.Create_By AS createBy,
|
||||||
|
pdm.Create_Time AS createTime,
|
||||||
|
pdm.Update_By AS updateBy,
|
||||||
|
pdm.Update_Time AS updateTime
|
||||||
|
FROM
|
||||||
|
((
|
||||||
|
SELECT
|
||||||
|
pm.id,
|
||||||
|
pm.`Name`,
|
||||||
|
pm.`Status`,
|
||||||
|
pm.Org_Id,
|
||||||
|
pm.Org_Name,
|
||||||
|
pm.Powerr_Id,
|
||||||
|
pm.Powerr_Name,
|
||||||
|
pm.Line_Id,
|
||||||
|
pm.Line_Name
|
||||||
|
FROM
|
||||||
|
pms_monitor AS pm
|
||||||
|
) UNION ALL
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
ppd.id,
|
||||||
|
ppd.`Name`,
|
||||||
|
ppd.`Status`,
|
||||||
|
ppd.Org_Id,
|
||||||
|
ppd.Org_Name,
|
||||||
|
ppd.Power_Station_Id,
|
||||||
|
ppd.Powerr_Name,
|
||||||
|
ppd.Line_Id,
|
||||||
|
ppd.Line_Name
|
||||||
|
FROM
|
||||||
|
pms_power_distributionarea AS ppd
|
||||||
|
)
|
||||||
|
) AS monitor
|
||||||
|
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||||
|
WHERE
|
||||||
|
monitor.`Status` = 1
|
||||||
|
AND pdm.`Status` = 1
|
||||||
|
AND monitor.Org_Id IN
|
||||||
|
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||||
|
#{orgId}
|
||||||
|
</foreach>
|
||||||
|
<if test="pwPmsMonitorParam.voltageLevels!=null and pwPmsMonitorParam.voltageLevels.size()!=0">
|
||||||
|
AND pdm.Voltage_Level IN
|
||||||
|
<foreach collection="pwPmsMonitorParam.voltageLevels" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="pwPmsMonitorParam.powerId!=null and pwPmsMonitorParam.powerId.size()!=0">
|
||||||
|
AND monitor.Powerr_Id IN
|
||||||
|
<foreach collection="pwPmsMonitorParam.powerId" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="pwPmsMonitorParam.monitorSort!=null and pwPmsMonitorParam.monitorSort.size()!=0">
|
||||||
|
AND pdm.Monitor_Sort IN
|
||||||
|
<foreach collection="pwPmsMonitorParam.monitorSort" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="pwPmsMonitorParam.monitorState!=null and pwPmsMonitorParam.monitorState.size()!=0">
|
||||||
|
AND pdm.Monitor_State IN
|
||||||
|
<foreach collection="pwPmsMonitorParam.monitorState" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="pwPmsMonitorParam.ifPowerUser != null and pwPmsMonitorParam.ifPowerUser != ''">
|
||||||
|
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||||
|
</if>
|
||||||
|
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||||
|
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -12,6 +12,7 @@ import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
|||||||
import com.njcn.device.pms.pojo.vo.DoubleUserVO;
|
import com.njcn.device.pms.pojo.vo.DoubleUserVO;
|
||||||
import com.njcn.device.pms.pojo.vo.PmsPowerTreeMonitorVO;
|
import com.njcn.device.pms.pojo.vo.PmsPowerTreeMonitorVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -63,4 +64,5 @@ public interface DistributionMonitorMapper extends BaseMapper<DistributionMonito
|
|||||||
Page<PmsPowerTreeMonitorVO> getThreeMonitorByOrgIdFa(Page<Monitor> page, @Param("taiZhangParam")TaiZhangParam taiZhangParam, @Param("deptIds")List<String> deptIds);
|
Page<PmsPowerTreeMonitorVO> getThreeMonitorByOrgIdFa(Page<Monitor> page, @Param("taiZhangParam")TaiZhangParam taiZhangParam, @Param("deptIds")List<String> deptIds);
|
||||||
|
|
||||||
|
|
||||||
|
List<DistributionMonitor> distributionMonitorListByCondition(@Param("deptIds")List<String> deptIds, @Param("monitorSort")String monitorSort);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||||
|
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <专项分析-电气化铁路>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-01
|
||||||
|
*/
|
||||||
|
public interface SpecialAnalysisMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专项分析-地图数据展示
|
||||||
|
* @param deptIdList 部门集合(Code)
|
||||||
|
* @param monitorTags 监测标签(字典)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectList(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("monitorTags") String monitorTags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同比环比数据(风电场,光伏电站,冶炼负荷)
|
||||||
|
* @param deptIdList
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SpecialAnalysisMonitorVO.CompareDetailVO selectYoYList(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("param")SpecialAnalysisParam.CompareDateParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专项分析-地图数据展示
|
||||||
|
* @param deptIdList 部门集合(Code)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectRailwayList(@Param("deptIdList") List<String> deptIdList);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图展示数据-按电压展示数据(电气铁路)
|
||||||
|
* @param deptIdList 部门集合(Code)
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.CompareVO> selectMapDisplayRailway(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("param")SpecialAnalysisParam.CompareParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图展示数据-按接线类型展示(电气化铁路)
|
||||||
|
* @param deptIdList
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.WiringTypeDetail> selectWiringTypeRailway(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("param")SpecialAnalysisParam.CompareDateParam param);
|
||||||
|
}
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||||
and a.name like concat('%',#{taiZhangParam.searchValue},'%')
|
and a.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||||
</if>
|
</if>
|
||||||
and a.status = 1
|
and a.status = 1
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||||
and a.name like concat('%',#{taiZhangParam.searchValue},'%')
|
and a.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||||
</if>
|
</if>
|
||||||
and a.status = 1
|
and a.status = 1
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||||
and yong.name like concat('%',#{taiZhangParam.searchValue},'%')
|
and yong.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||||
</if>
|
</if>
|
||||||
and dis.status = 1
|
and dis.status = 1
|
||||||
@@ -104,11 +104,72 @@
|
|||||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||||
and fa.name like concat('%',#{taiZhangParam.searchValue},'%')
|
and fa.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||||
</if>
|
</if>
|
||||||
and dis.status = 1
|
and dis.status = 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="distributionMonitorListByCondition" resultType="com.njcn.device.pms.pojo.po.DistributionMonitor">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
pms_distribution_monitor a
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
and a.Monitor_State in (select id from sys_dict_data sdd where sdd.code='Run' )
|
||||||
|
<if test="monitorSort!='' and monitorSort !=null">
|
||||||
|
|
||||||
|
AND a.Monitor_Sort = #{monitorSort}
|
||||||
|
</if>
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT
|
||||||
|
1
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
id
|
||||||
|
FROM
|
||||||
|
pms_monitor b
|
||||||
|
WHERE
|
||||||
|
b.Org_Id IN
|
||||||
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
id
|
||||||
|
FROM
|
||||||
|
pms_power_client c
|
||||||
|
WHERE
|
||||||
|
c.Org_Id IN
|
||||||
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
id
|
||||||
|
FROM
|
||||||
|
pms_power_distributionarea d
|
||||||
|
WHERE
|
||||||
|
d.Org_Id IN
|
||||||
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
id
|
||||||
|
FROM
|
||||||
|
pms_power_generation_user e
|
||||||
|
WHERE
|
||||||
|
e.Org_Id IN
|
||||||
|
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
) temp
|
||||||
|
WHERE
|
||||||
|
a.Monitor_Id = temp.id
|
||||||
|
)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,5 +22,11 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,363 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.device.pms.mapper.majornetwork.SpecialAnalysisMapper">
|
||||||
|
|
||||||
|
<select id="selectList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||||
|
SELECT
|
||||||
|
pm.Id,
|
||||||
|
pm.`Name`,
|
||||||
|
pm.Org_Name,
|
||||||
|
pm.Org_Id,
|
||||||
|
pm.Powerr_Name,
|
||||||
|
pm.Powerr_Id,
|
||||||
|
pm.Terminal_Id,
|
||||||
|
pm.Voltage_Level,
|
||||||
|
psm.capacity,
|
||||||
|
ps.Longitude,
|
||||||
|
ps.Latitude
|
||||||
|
FROM
|
||||||
|
pms_monitor pm
|
||||||
|
LEFT JOIN pms_statation_stat ps ON pm.Powerr_Id = ps.Power_Id
|
||||||
|
LEFT JOIN pms_special_monitor psm ON pm.Id = psm.id
|
||||||
|
<where>
|
||||||
|
pm.`Status` = 1
|
||||||
|
AND ps.`Status` = 1
|
||||||
|
AND pm.Is_Special_Monitor = 1
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND pm.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="monitorTags != null and monitorTags!=''">
|
||||||
|
AND pm.Monitor_Tag = #{monitorTags}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectYoYList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$CompareDetailVO">
|
||||||
|
SELECT
|
||||||
|
SUM(ta.sumNum) as sumNum,
|
||||||
|
IFNULL(SUM(tb.sumNum),0) as ytbSumNum,
|
||||||
|
IFNULL(SUM(tc.sumNum),0) as yhbSumNum,
|
||||||
|
ifnull(round((SUM(ta.sumNum)-SUM(tb.sumNum))/SUM(tb.sumNum)*100,2),0) as sameNum,
|
||||||
|
ifnull(round((SUM(ta.sumNum)-SUM(tc.sumNum))/SUM(tc.sumNum)*100,2),0) as ringNum,
|
||||||
|
|
||||||
|
SUM(ta.sumNum2) as sumNum2,
|
||||||
|
IFNULL(SUM(tb.sumNum2),0) as ytbSumNum2,
|
||||||
|
IFNULL(SUM(tc.sumNum2),0) as yhbSumNum2,
|
||||||
|
ifnull(round((SUM(ta.sumNum2)-SUM(tb.sumNum2))/SUM(tb.sumNum2)*100,2),0) as sameNum2,
|
||||||
|
ifnull(round((SUM(ta.sumNum2)-SUM(tc.sumNum2))/SUM(tc.sumNum2)*100,2),0) as ringNum2,
|
||||||
|
|
||||||
|
SUM(ta.sumNum3) as sumNum3,
|
||||||
|
IFNULL(SUM(tb.sumNum3),0) as ytbSumNum3,
|
||||||
|
IFNULL(SUM(tc.sumNum3),0) as yhbSumNum3,
|
||||||
|
ifnull(round((SUM(ta.sumNum3)-SUM(tb.sumNum3))/SUM(tb.sumNum3)*100,2),0) as sameNum3,
|
||||||
|
ifnull(round((SUM(ta.sumNum3)-SUM(tc.sumNum3))/SUM(tc.sumNum3)*100,2),0) as ringNum3,
|
||||||
|
|
||||||
|
SUM(ta.sumNum4) as sumNum4,
|
||||||
|
IFNULL(SUM(tb.sumNum4),0) as ytbSumNum4,
|
||||||
|
IFNULL(SUM(tc.sumNum4),0) as yhbSumNum4,
|
||||||
|
ifnull(round((SUM(ta.sumNum4)-SUM(tb.sumNum4))/SUM(tb.sumNum4)*100,2),0) as sameNum4,
|
||||||
|
ifnull(round((SUM(ta.sumNum4)-SUM(tc.sumNum4))/SUM(tc.sumNum4)*100,2),0) as ringNum4,
|
||||||
|
|
||||||
|
SUM(ta.capacity) as capacity,
|
||||||
|
IFNULL(SUM(tb.capacity),0) as ytbCapacity,
|
||||||
|
IFNULL(SUM(tc.capacity),0) as yhbCapacity,
|
||||||
|
ifnull(round((SUM(ta.capacity)-SUM(tb.capacity))/SUM(tb.capacity)*100,2),0) as sameCapacity,
|
||||||
|
ifnull(round((SUM(ta.capacity)-SUM(tc.capacity))/SUM(tc.capacity)*100,2),0) as ringCapacity,
|
||||||
|
|
||||||
|
SUM(ta.capacity2) as capacity2,
|
||||||
|
IFNULL(SUM(tb.capacity2),0) as ytbCapacity2,
|
||||||
|
IFNULL(SUM(tc.capacity2),0) as yhbCapacity2,
|
||||||
|
ifnull(round((SUM(ta.capacity2)-SUM(tb.capacity2))/SUM(tb.capacity2)*100,2),0) as sameCapacity2,
|
||||||
|
ifnull(round((SUM(ta.capacity2)-SUM(tc.capacity2))/SUM(tc.capacity2)*100,2),0) as ringCapacity2,
|
||||||
|
|
||||||
|
SUM(ta.capacity3) as capacity3,
|
||||||
|
IFNULL(SUM(tb.capacity3),0) as ytbCapacity3,
|
||||||
|
IFNULL(SUM(tc.capacity3),0) as yhbCapacity3,
|
||||||
|
ifnull(round((SUM(ta.capacity3)-SUM(tb.capacity3))/SUM(tb.capacity3)*100,2),0) as sameCapacity3,
|
||||||
|
ifnull(round((SUM(ta.capacity3)-SUM(tc.capacity3))/SUM(tc.capacity3)*100,2),0) as ringCapacity3,
|
||||||
|
|
||||||
|
SUM(ta.capacity3) as capacity4,
|
||||||
|
IFNULL(SUM(tb.capacity4),0) as ytbCapacity4,
|
||||||
|
IFNULL(SUM(tc.capacity4),0) as yhbCapacity4,
|
||||||
|
ifnull(round((SUM(ta.capacity4)-SUM(tb.capacity4))/SUM(tb.capacity4)*100,2),0) as sameCapacity4,
|
||||||
|
ifnull(round((SUM(ta.capacity4)-SUM(tc.capacity4))/SUM(tc.capacity4)*100,2),0) as ringCapacity4
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
t.Org_Id,
|
||||||
|
year(t.Data_Date) as yy,
|
||||||
|
month(t.Data_Date) as mm,
|
||||||
|
sum(t.Wind_Power_Num) as sumNum,
|
||||||
|
sum(t.Pv_Num) as sumNum2,
|
||||||
|
sum(t.Electric_Track_Num) as sumNum3,
|
||||||
|
sum(t.Smelting_Load_Num) as sumNum4,
|
||||||
|
|
||||||
|
sum(t.Wind_Power_Capacity) as capacity,
|
||||||
|
sum(t.Pv_Capacity) as capacity2,
|
||||||
|
sum(t.Electric_Track_Capacity) as capacity3,
|
||||||
|
sum(t.Smelting_Load_Capacity) as capacity4
|
||||||
|
FROM pms_statistics_special_monitor t
|
||||||
|
<where>
|
||||||
|
AND t.`Status` = 1
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY t.Org_Id,yy,mm
|
||||||
|
) ta
|
||||||
|
-- 同比:上年同月
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
t.Org_Id,
|
||||||
|
year(t.Data_Date) as yy,
|
||||||
|
month(t.Data_Date) as mm,
|
||||||
|
sum(t.Wind_Power_Num) as sumNum,
|
||||||
|
sum(t.Pv_Num) as sumNum2,
|
||||||
|
sum(t.Electric_Track_Num) as sumNum3,
|
||||||
|
sum(t.Smelting_Load_Num) as sumNum4,
|
||||||
|
|
||||||
|
sum(t.Wind_Power_Capacity) as capacity,
|
||||||
|
sum(t.Pv_Capacity) as capacity2,
|
||||||
|
sum(t.Electric_Track_Capacity) as capacity3,
|
||||||
|
sum(t.Smelting_Load_Capacity) as capacity4
|
||||||
|
FROM pms_statistics_special_monitor t
|
||||||
|
<where>
|
||||||
|
AND t.`Status` = 1
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY t.Org_Id,yy,mm
|
||||||
|
) tb
|
||||||
|
ON tb.mm = ta.mm and tb.yy = ta.yy-1 and tb.Org_Id = ta.Org_Id
|
||||||
|
-- 环比:上月
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
t.Org_Id,
|
||||||
|
year(t.Data_Date) as yy,
|
||||||
|
month(t.Data_Date) as mm,
|
||||||
|
sum(t.Wind_Power_Num) as sumNum,
|
||||||
|
sum(t.Pv_Num) as sumNum2,
|
||||||
|
sum(t.Electric_Track_Num) as sumNum3,
|
||||||
|
sum(t.Smelting_Load_Num) as sumNum4,
|
||||||
|
|
||||||
|
sum(t.Wind_Power_Capacity) as capacity,
|
||||||
|
sum(t.Pv_Capacity) as capacity2,
|
||||||
|
sum(t.Electric_Track_Capacity) as capacity3,
|
||||||
|
sum(t.Smelting_Load_Capacity) as capacity4
|
||||||
|
FROM pms_statistics_special_monitor t
|
||||||
|
<where>
|
||||||
|
AND t.`Status` = 1
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY t.Org_Id,yy,mm
|
||||||
|
) tc
|
||||||
|
ON (
|
||||||
|
(tc.yy = ta.yy and tc.mm = ta.mm - 1 and tc.Org_Id = ta.Org_Id)
|
||||||
|
OR
|
||||||
|
(tc.yy=ta.yy - 1 AND tc.mm = 12 AND ta.mm = 1 and tc.Org_Id = ta.Org_Id)
|
||||||
|
)
|
||||||
|
<where>
|
||||||
|
<if test="param.year != null and param.year!=''">
|
||||||
|
AND ta.yy = #{param.year}
|
||||||
|
</if>
|
||||||
|
<if test="param.month != null and param.month.size > 0">
|
||||||
|
AND ta.mm IN
|
||||||
|
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectRailwayList"
|
||||||
|
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||||
|
SELECT
|
||||||
|
pts.Id,
|
||||||
|
pts.`Name`,
|
||||||
|
pts.Org_Name,
|
||||||
|
pts.Org_Id,
|
||||||
|
pts.Power_Name as powerrName,
|
||||||
|
pts.Power_Id as powerrId,
|
||||||
|
pts.Voltage_Level,
|
||||||
|
ptse.capacity,
|
||||||
|
ps.Longitude,
|
||||||
|
ps.Latitude
|
||||||
|
FROM
|
||||||
|
pms_traction_station pts
|
||||||
|
LEFT JOIN pms_statation_stat ps ON pts.Power_Id = ps.Power_Id
|
||||||
|
LEFT JOIN pms_traction_station_expand ptse ON ptse.traction_Station_Id = pts.Id
|
||||||
|
<where>
|
||||||
|
pts.`Status` = 1
|
||||||
|
AND ps.`Status` = 1
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND pts.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectMapDisplayRailway"
|
||||||
|
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$CompareVO">
|
||||||
|
SELECT
|
||||||
|
CASE
|
||||||
|
ta.railway_type
|
||||||
|
WHEN 1 THEN
|
||||||
|
"高铁" ELSE "普铁"
|
||||||
|
END as name,
|
||||||
|
SUM( ta.sumNum2 ) AS tractionStation,
|
||||||
|
SUM( ta.sumNum ) AS num,
|
||||||
|
IFNULL( SUM( tb.sumNum ), 0 ) AS ytbSumNum,
|
||||||
|
IFNULL( SUM( tc.sumNum ), 0 ) AS yhbSumNum,
|
||||||
|
concat(
|
||||||
|
ifnull( round(( SUM( ta.sumNum )- SUM( tb.sumNum ))/ SUM( tb.sumNum )* 100, 2 ), 0 ),
|
||||||
|
'%'
|
||||||
|
) AS sameNum,
|
||||||
|
concat(
|
||||||
|
ifnull( round(( SUM( ta.sumNum )- SUM( tc.sumNum ))/ SUM( tc.sumNum )* 100, 2 ), 0 ),
|
||||||
|
'%'
|
||||||
|
) AS ringNum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
t.railway_type,
|
||||||
|
YEAR ( t.Created_Date ) AS yy,
|
||||||
|
MONTH ( t.Created_Date ) AS mm,
|
||||||
|
sum( t.traction_Station_num ) AS sumNum2,
|
||||||
|
sum( t.monitor_num ) AS sumNum
|
||||||
|
FROM
|
||||||
|
pms_traction_station_expand t
|
||||||
|
<where>
|
||||||
|
<if test="param != null and param.powerVoltageLevel.size > 0">
|
||||||
|
AND t.voltage_level IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
t.railway_type,
|
||||||
|
yy,
|
||||||
|
mm
|
||||||
|
) ta -- 同比:上年同月
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
t.railway_type,
|
||||||
|
YEAR ( t.Created_Date ) AS yy,
|
||||||
|
MONTH ( t.Created_Date ) AS mm,
|
||||||
|
sum( t.traction_Station_num ) AS sumNum2,
|
||||||
|
sum( t.monitor_num ) AS sumNum
|
||||||
|
FROM
|
||||||
|
pms_traction_station_expand t
|
||||||
|
<where>
|
||||||
|
<if test="param != null and param.powerVoltageLevel.size > 0">
|
||||||
|
AND t.power_voltage_level IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
t.railway_type,
|
||||||
|
yy,
|
||||||
|
mm
|
||||||
|
) tb ON tb.mm = ta.mm
|
||||||
|
AND tb.yy = ta.yy - 1
|
||||||
|
AND tb.railway_type = ta.railway_type -- 环比:上月
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
t.railway_type,
|
||||||
|
YEAR ( t.Created_Date ) AS yy,
|
||||||
|
MONTH ( t.Created_Date ) AS mm,
|
||||||
|
sum( t.traction_Station_num ) AS sumNum2,
|
||||||
|
sum( t.monitor_num ) AS sumNum
|
||||||
|
FROM
|
||||||
|
pms_traction_station_expand t
|
||||||
|
<where>
|
||||||
|
<if test="param != null and param.powerVoltageLevel.size > 0">
|
||||||
|
AND t.power_voltage_level IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
t.railway_type,
|
||||||
|
yy,
|
||||||
|
mm
|
||||||
|
) tc ON (
|
||||||
|
( tc.yy = ta.yy AND tc.mm = ta.mm - 1 AND tc.railway_type = ta.railway_type )
|
||||||
|
OR (
|
||||||
|
tc.yy = ta.yy - 1
|
||||||
|
AND tc.mm = 12
|
||||||
|
AND ta.mm = 1
|
||||||
|
AND tc.railway_type = ta.railway_type
|
||||||
|
)
|
||||||
|
)
|
||||||
|
<where>
|
||||||
|
<if test="param.year != null and param.year!=''">
|
||||||
|
AND ta.yy = #{param.year}
|
||||||
|
</if>
|
||||||
|
<if test="param.month != null and param.month.size > 0">
|
||||||
|
AND ta.mm IN
|
||||||
|
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
ta.railway_type
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="selectWiringTypeRailway"
|
||||||
|
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$WiringTypeDetail">
|
||||||
|
SELECT
|
||||||
|
connet_group_way,
|
||||||
|
sum( traction_Station_num ) as num,
|
||||||
|
sum( load_rate_avg ) as rateAvg,
|
||||||
|
sum( load_rate_95 ) as rate95,
|
||||||
|
sum( load_rate_99 ) as rate99
|
||||||
|
FROM
|
||||||
|
pms_traction_station_expand
|
||||||
|
<where>
|
||||||
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
|
AND t.Org_Id IN
|
||||||
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
connet_group_way
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -5,33 +5,35 @@
|
|||||||
<!--获取牵引站详细信息-->
|
<!--获取牵引站详细信息-->
|
||||||
<select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
|
<select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
|
||||||
SELECT
|
SELECT
|
||||||
Id AS id,
|
pts.Id AS id,
|
||||||
`NAME` AS name,
|
pts.`NAME` AS name,
|
||||||
Org_Name AS orgName,
|
ptse.`railway_type` AS railwayType,
|
||||||
Org_Id AS orgId,
|
pts.Org_Name AS orgName,
|
||||||
Operation_Name AS operationName,
|
pts.Org_Id AS orgId,
|
||||||
Operation_Id AS operationId,
|
pts.Operation_Name AS operationName,
|
||||||
Voltage_Level AS voltageLevel,
|
pts.Operation_Id AS operationId,
|
||||||
Railway_Line_Id AS railwayLineId,
|
pts.Voltage_Level AS voltageLevel,
|
||||||
Railway_Line_Name AS railwayLineName,
|
pts.Railway_Line_Id AS railwayLineId,
|
||||||
Connet_Group_Way AS connetGroupWay,
|
pts.Railway_Line_Name AS railwayLineName,
|
||||||
Rated_Capacity AS ratedCapacity,
|
pts.Connet_Group_Way AS connetGroupWay,
|
||||||
Power_Id AS powerId,
|
pts.Rated_Capacity AS ratedCapacity,
|
||||||
Power_Name AS powerName,
|
pts.Power_Id AS powerId,
|
||||||
Power_Voltage_Level AS powerVoltageLevel,
|
pts.Power_Name AS powerName,
|
||||||
If_Special AS ifSpecial,
|
pts.Power_Voltage_Level AS powerVoltageLevel,
|
||||||
Created_Date AS createdDate,
|
pts.If_Special AS ifSpecial,
|
||||||
User_Tag AS userTag,
|
pts.Created_Date AS createdDate,
|
||||||
Is_Up_To_Grid AS isUpToGrid,
|
pts.User_Tag AS userTag,
|
||||||
`STATUS` AS `status`,
|
pts.Is_Up_To_Grid AS isUpToGrid,
|
||||||
Create_By AS createBy,
|
pts.`STATUS` AS `status`,
|
||||||
Create_Time AS createTime,
|
pts.Create_By AS createBy,
|
||||||
Update_By AS updateBy,
|
pts.Create_Time AS createTime,
|
||||||
Update_Time AS updateTime
|
pts.Update_By AS updateBy,
|
||||||
|
pts.Update_Time AS updateTime
|
||||||
FROM
|
FROM
|
||||||
pms_traction_Station
|
pms_traction_Station pts
|
||||||
|
LEFT JOIN pms_traction_station_expand ptse on ptse.traction_Station_Id=pts.id and ptse.Org_Id=pts.Org_Id
|
||||||
WHERE
|
WHERE
|
||||||
Org_Id IN
|
pts.Org_Id IN
|
||||||
<foreach collection="param.orgIds" item="item" open="(" close=")" separator=",">
|
<foreach collection="param.orgIds" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
@@ -19,4 +19,11 @@ public interface IPwMonitorService {
|
|||||||
* @return 配网所有监测点信息
|
* @return 配网所有监测点信息
|
||||||
*/
|
*/
|
||||||
List<PwPmsMonitorDTO> getPwMonitorList(PwPmsMonitorParam pwPmsMonitorParam);
|
List<PwPmsMonitorDTO> getPwMonitorList(PwPmsMonitorParam pwPmsMonitorParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分布式光伏配网所有监测点信息
|
||||||
|
* @param pwPmsMonitorParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
|
|||||||
import com.njcn.device.pms.service.distribution.IPwMonitorService;
|
import com.njcn.device.pms.service.distribution.IPwMonitorService;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -83,5 +84,20 @@ public class IPwMonitorServiceImpl implements IPwMonitorService {
|
|||||||
}
|
}
|
||||||
return pwPmsMonitorDTOS;
|
return pwPmsMonitorDTOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam) {
|
||||||
|
//定义待返回终端信息
|
||||||
|
List<PwPmsMonitorDTO> pwPmsMonitorDTOS = new ArrayList<>();
|
||||||
|
List<Dept> deptInfos = deptFeignClient.getDirectSonSelf(pwPmsMonitorParam.getOrgId()).getData();
|
||||||
|
// 过滤出传入id的子单位id
|
||||||
|
List<String> deptIdList = deptInfos.stream()
|
||||||
|
.map(Dept::getCode)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
//获取monitor详细数据
|
||||||
|
return pwMonitorMapper.getPwPhotovoltaicMonitorList(deptIdList, pwPmsMonitorParam);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,4 +58,12 @@ public interface IDistributionMonitorService extends IService<DistributionMonito
|
|||||||
* @date 2022/12/5
|
* @date 2022/12/5
|
||||||
*/
|
*/
|
||||||
Boolean delDistributionMonitor(TaiZhangDelParam taiZhangDelParam);
|
Boolean delDistributionMonitor(TaiZhangDelParam taiZhangDelParam);
|
||||||
|
/**
|
||||||
|
* @Description: 按部门获取旗下配网所有监测点(分一类,二类,三类)
|
||||||
|
* @Param: [orgId, monitorSort]
|
||||||
|
* @return: java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2022/12/14
|
||||||
|
*/
|
||||||
|
List<DistributionMonitor> distributionMonitorListByCondition(String orgId, String monitorSort);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.device.pms.service.majornetwork;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||||
|
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <专项分许>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-01
|
||||||
|
*/
|
||||||
|
public interface SpecialAnalysisService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专项分析-地图数据展示(风电场,光伏电站,冶炼负荷)
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同比环比数据(风电场,光伏电站,冶炼负荷)
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SpecialAnalysisMonitorVO.CompareDetailVO getYoYList(SpecialAnalysisParam.CompareDateParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专项分析-地图数据展示(电气化铁路)
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> getDisplayRailway(SpecialAnalysisParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图展示数据-按电压展示数据(电气化铁路)
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.CompareVO> getMapDisplayRailway(SpecialAnalysisParam.CompareParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图展示数据-按接线类型展示(电气化铁路)
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SpecialAnalysisMonitorVO.WiringTypeDetail> getWiringTypeRailway(SpecialAnalysisParam.CompareDateParam param);
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.njcn.device.pms.service.majornetwork.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
@@ -19,6 +20,7 @@ import com.njcn.system.enums.DicDataEnum;
|
|||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.constant.DicDataConstant;
|
import com.njcn.system.pojo.constant.DicDataConstant;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -51,6 +53,11 @@ public class DistributionMonitorServiceImpl extends ServiceImpl<DistributionMoni
|
|||||||
|
|
||||||
private final PowerGenerationUserMapper powerGenerationUserMapper;
|
private final PowerGenerationUserMapper powerGenerationUserMapper;
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
private final DistributionMonitorMapper distributionMonitorMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PmsMonitorBaseDTO> getMonitorByCondition(List<String> deptIdList, PmsDeviceInfoParam pmsDeviceInfoParam) {
|
public List<PmsMonitorBaseDTO> getMonitorByCondition(List<String> deptIdList, PmsDeviceInfoParam pmsDeviceInfoParam) {
|
||||||
@@ -175,4 +182,22 @@ public class DistributionMonitorServiceImpl extends ServiceImpl<DistributionMoni
|
|||||||
lambdaQueryWrapper.in(DistributionMonitor::getMonitorId, taiZhangDelParam.getIds());
|
lambdaQueryWrapper.in(DistributionMonitor::getMonitorId, taiZhangDelParam.getIds());
|
||||||
return this.remove(lambdaQueryWrapper);
|
return this.remove(lambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param orgId
|
||||||
|
* @param monitorSort
|
||||||
|
* @Description: 按部门获取旗下配网所有监测点(分一类,二类,三类)
|
||||||
|
* @Param: [orgId, monitorSort]
|
||||||
|
* @return: java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2022/12/14
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DistributionMonitor> distributionMonitorListByCondition(String orgId, String monitorSort) {
|
||||||
|
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByDeptId(orgId).getData();
|
||||||
|
|
||||||
|
List<DistributionMonitor> distributionMonitorList = distributionMonitorMapper.distributionMonitorListByCondition (deptIds,monitorSort);
|
||||||
|
return distributionMonitorList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package com.njcn.device.pms.service.majornetwork.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.SpecialAnalysisMapper;
|
||||||
|
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||||
|
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||||
|
import com.njcn.device.pms.service.majornetwork.SpecialAnalysisService;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <专项分析>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
private final SpecialAnalysisMapper specialAnalysisMapper;
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param) {
|
||||||
|
//初始化对象
|
||||||
|
SpecialAnalysisMonitorVO vo=new SpecialAnalysisMonitorVO();
|
||||||
|
//专项分析-只是统计当前所在部门及下部门直接挂钩的监测点
|
||||||
|
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||||
|
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
//1.获取原始数据(参数1,部门id。参数2,监测点标签字典id集合)
|
||||||
|
DictData data;
|
||||||
|
switch (param.getType()) {
|
||||||
|
//光伏电站
|
||||||
|
case 1:
|
||||||
|
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.POWER_STATION.getCode()).getData();
|
||||||
|
break;
|
||||||
|
//冶炼负荷
|
||||||
|
case 2:
|
||||||
|
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.SMELT_LOAD.getCode()).getData();
|
||||||
|
break;
|
||||||
|
//风电场
|
||||||
|
default:
|
||||||
|
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONSHORE_WIND.getCode()).getData();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> infoList = specialAnalysisMapper.selectList(deptIds, null);
|
||||||
|
if(CollectionUtil.isNotEmpty(infoList)){
|
||||||
|
vo.setSpecialAnalysisVOList(infoList);
|
||||||
|
|
||||||
|
//2.根据电压等级分组显示数据
|
||||||
|
Map<String, Long> map = infoList.stream().collect(Collectors.groupingBy(su -> su.getVoltageLevel(), Collectors.counting()));
|
||||||
|
List<Map<String,String>> maps=new ArrayList<>();
|
||||||
|
Map<String, String> newMap;
|
||||||
|
for (String key : map.keySet()) {
|
||||||
|
newMap=new HashMap<>();
|
||||||
|
newMap.put("name",key);
|
||||||
|
newMap.put("value",map.get(key).toString());
|
||||||
|
maps.add(newMap);
|
||||||
|
}
|
||||||
|
vo.setVoltageLevelMap(maps);
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpecialAnalysisMonitorVO.CompareDetailVO getYoYList(SpecialAnalysisParam.CompareDateParam param) {
|
||||||
|
//todo 获取部门信息
|
||||||
|
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||||
|
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
return specialAnalysisMapper.selectYoYList(deptIds,param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> getDisplayRailway(SpecialAnalysisParam param) {
|
||||||
|
//todo 获取部门信息
|
||||||
|
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||||
|
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
return specialAnalysisMapper.selectRailwayList(deptIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SpecialAnalysisMonitorVO.CompareVO> getMapDisplayRailway(SpecialAnalysisParam.CompareParam param) {
|
||||||
|
//todo 获取部门信息
|
||||||
|
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||||
|
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
return specialAnalysisMapper.selectMapDisplayRailway(deptIds, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SpecialAnalysisMonitorVO.WiringTypeDetail> getWiringTypeRailway(SpecialAnalysisParam.CompareDateParam param) {
|
||||||
|
//todo 获取部门信息
|
||||||
|
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||||
|
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
//子节点获取监测点类别(监测标签)
|
||||||
|
List<DictData> lineData = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.CONNET_GROUP_WAY.getCode()).getData();
|
||||||
|
|
||||||
|
|
||||||
|
List<SpecialAnalysisMonitorVO.WiringTypeDetail> wiringTypeRailway = specialAnalysisMapper.selectWiringTypeRailway(deptIds, param);
|
||||||
|
Map<String, SpecialAnalysisMonitorVO.WiringTypeDetail> detailMap = wiringTypeRailway.stream()
|
||||||
|
.collect(Collectors.toMap(SpecialAnalysisMonitorVO.WiringTypeDetail::getConnetGroupWay, Function.identity()));
|
||||||
|
//处理主节点不存在的集合
|
||||||
|
List<DictData> notMeasurementList = lineData.stream().filter(r -> !detailMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
SpecialAnalysisMonitorVO.WiringTypeDetail wiringTypeDetail ;
|
||||||
|
for (DictData notData : notMeasurementList) {
|
||||||
|
wiringTypeDetail = new SpecialAnalysisMonitorVO.WiringTypeDetail();
|
||||||
|
wiringTypeDetail.setConnetGroupWay(notData.getId());
|
||||||
|
wiringTypeDetail.setNum("0");
|
||||||
|
wiringTypeDetail.setRateAvg("0");
|
||||||
|
wiringTypeDetail.setRate95("0");
|
||||||
|
wiringTypeDetail.setRate99("0");
|
||||||
|
wiringTypeRailway.add(wiringTypeDetail);
|
||||||
|
}
|
||||||
|
return wiringTypeRailway;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -36,7 +36,11 @@
|
|||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pq-device-api</artifactId>
|
<artifactId>pq-device-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>user-api</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.influxdb</groupId>
|
<groupId>org.influxdb</groupId>
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.event.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <功能描述>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DeptLevelVO implements Serializable {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String pid;
|
||||||
|
private String pids;
|
||||||
|
private String name;
|
||||||
|
private String code;
|
||||||
|
private Integer specialType;
|
||||||
|
private String area;
|
||||||
|
private String remark;
|
||||||
|
private Integer sort;
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
//子孙部门
|
||||||
|
List<DeptLevelVO> deptList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.njcn.event.pojo.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <功能描述>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RStatEventVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "单位ID")
|
||||||
|
private String orgNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂态指标类型Id,字典表ID")
|
||||||
|
private String eventType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "日均发生暂态监测点数(根据 发生暂态监测点数 取平均值)")
|
||||||
|
private Integer eventMeasurementAverage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累计发生暂态监测点数(监测点暂态指标超标明细日表)")
|
||||||
|
private Integer eventMeasurementAccrued;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂态指标发生频次(日表的暂态指标发生次数之和/日表的发生暂态监测点数之和)")
|
||||||
|
private Float eventFreq;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂态指标发生次数(日表的暂态指标发生次数之和)")
|
||||||
|
private Integer eventCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "日均发生暂态监测点数占比(根据 日均发生暂态监测点数占比 取平均值)")
|
||||||
|
private Float eventMeasurementRatioAverage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累计发生暂态监测点数占比(此表的累计发生暂态监测点数/区域统计表中的区域分类统计月表中的发生暂态的监测点数)")
|
||||||
|
private Float eventMeasurementRatioAccrued;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
||||||
|
private String dataType;
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.njcn.event.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.njcn.event.pojo.vo.DeptLevelVO;
|
||||||
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <功能描述>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-14
|
||||||
|
*/
|
||||||
|
public class DeptUtil {
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 获取层级部门信息(展示下级部门)
|
||||||
|
* @param deptDTOList
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<DeptDTO> getDeptSubsetVOList(List<DeptDTO> deptDTOList, String deptId){
|
||||||
|
//获取子部门
|
||||||
|
List<DeptDTO> directDeptInfos = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getPid().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isEmpty(directDeptInfos)) {
|
||||||
|
//没有直接子部门,获取当前部门所有信息
|
||||||
|
List<DeptDTO> dept = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getId().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return dept;
|
||||||
|
}
|
||||||
|
return directDeptInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 获取层级部门信息(展示下级部门,但是数据是包含下部门的所有部门)
|
||||||
|
* @param deptDTOList
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<DeptLevelVO> getDeptLevelVOList(List<DeptDTO> deptDTOList, String deptId){
|
||||||
|
//获取子部门
|
||||||
|
List<DeptDTO> directDeptInfos = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getPid().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<DeptLevelVO> deptLevelVOS = new ArrayList<>();
|
||||||
|
if (CollectionUtil.isEmpty(directDeptInfos)) {
|
||||||
|
//没有直接子部门,获取当前部门所有信息
|
||||||
|
List<DeptDTO> dept = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getId().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
deptLevelVOS = BeanUtil.copyToList(dept, DeptLevelVO.class);
|
||||||
|
}else{
|
||||||
|
DeptLevelVO deptLevelVO;
|
||||||
|
for (DeptDTO deptDTO : directDeptInfos) {
|
||||||
|
//添加当前部门,添加当前部门下的子部门
|
||||||
|
deptLevelVO = BeanUtil.copyProperties(deptDTO, DeptLevelVO.class);
|
||||||
|
deptLevelVOS.add(deptLevelVO);
|
||||||
|
|
||||||
|
//筛选上级部门pids包含该id的所有部门
|
||||||
|
List<DeptDTO> descendantDeptDTO = deptDTOList.stream()
|
||||||
|
.filter(d -> d.getPids().contains(deptDTO.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
//获取当前部门
|
||||||
|
List<DeptDTO> dept = deptDTOList.stream()
|
||||||
|
.filter(dto -> dto.getId().equals(deptDTO.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
descendantDeptDTO.addAll(dept);
|
||||||
|
|
||||||
|
List<DeptLevelVO> seedList = BeanUtil.copyToList(descendantDeptDTO, DeptLevelVO.class);
|
||||||
|
deptLevelVO.setDeptList(seedList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return deptLevelVOS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ public class PwRStatEventOrgController extends BaseController {
|
|||||||
switch (string) {
|
switch (string) {
|
||||||
//查询超标监测点数-年数据
|
//查询超标监测点数-年数据
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
rStatHarmonicOrgAll = rStatEventOrgYService.getPwRStatEventOrgYAll(param);
|
rStatHarmonicOrgAll = rStatEventOrgYService.getRStatEventOrgOldYAll(param,2);
|
||||||
break;
|
break;
|
||||||
//查询超标监测点数-季数据
|
//查询超标监测点数-季数据
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class RStatEventOrgController extends BaseController {
|
|||||||
switch (string) {
|
switch (string) {
|
||||||
//查询超标监测点数-年数据
|
//查询超标监测点数-年数据
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
rStatHarmonicOrgAll = rStatEventOrgYService.getRStatEventOrgYAll(param);
|
rStatHarmonicOrgAll = rStatEventOrgYService.getRStatEventOrgOldYAll(param,1);
|
||||||
break;
|
break;
|
||||||
//查询超标监测点数-季数据
|
//查询超标监测点数-季数据
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class RStatSubstationController extends BaseController {
|
|||||||
@GetMapping("/getStatSubstationIconDistributed")
|
@GetMapping("/getStatSubstationIconDistributed")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("变电站暂态分布(按发生频次)")
|
@ApiOperation("变电站暂态分布(按发生频次)")
|
||||||
public HttpResult<RSubstationIconVO> getAllRStatSubstation(StatisticsBizBaseParam param) {
|
public HttpResult<RSubstationIconVO> getStatSubstationIconDistributed(StatisticsBizBaseParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getStatSubstationIconDistributed");
|
String methodDescribe = getMethodDescribe("getStatSubstationIconDistributed");
|
||||||
RSubstationIconVO statSubstationIcon = rStatSubstationMService.getStatSubstationIcon(param);
|
RSubstationIconVO statSubstationIcon = rStatSubstationMService.getStatSubstationIcon(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
||||||
@@ -58,7 +58,7 @@ public class RStatSubstationController extends BaseController {
|
|||||||
@GetMapping("/getStatSubstationIconVoltage")
|
@GetMapping("/getStatSubstationIconVoltage")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("变电站暂态分布(按电压等级)")
|
@ApiOperation("变电站暂态分布(按电压等级)")
|
||||||
public HttpResult<List<RVoltageIconVO>> getAllRStatSubstationIcon2(StatisticsBizBaseParam param) {
|
public HttpResult<List<RVoltageIconVO>> getStatSubstationIconVoltage(StatisticsBizBaseParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getStatSubstationIconVoltage");
|
String methodDescribe = getMethodDescribe("getStatSubstationIconVoltage");
|
||||||
List<RVoltageIconVO> statSubstationIcon = rStatSubstationVoltageMService.getStatSubstationIcon(param);
|
List<RVoltageIconVO> statSubstationIcon = rStatSubstationVoltageMService.getStatSubstationIcon(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
||||||
@@ -71,7 +71,7 @@ public class RStatSubstationController extends BaseController {
|
|||||||
@GetMapping("/getStatSubstationIconIndex")
|
@GetMapping("/getStatSubstationIconIndex")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("变电站暂态指标发生频次")
|
@ApiOperation("变电站暂态指标发生频次")
|
||||||
public HttpResult<List<RSubstationIcon2VO>> getAllRStatSubstationIcon3(StatisticsBizBaseParam param) {
|
public HttpResult<List<RSubstationIcon2VO>> getStatSubstationIconIndex(StatisticsBizBaseParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getStatSubstationIconIndex");
|
String methodDescribe = getMethodDescribe("getStatSubstationIconIndex");
|
||||||
List<RSubstationIcon2VO> statSubstationIcon = rStatSubstationMService.getStatSubstationIcon2(param);
|
List<RSubstationIcon2VO> statSubstationIcon = rStatSubstationMService.getStatSubstationIcon2(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package com.njcn.event.mapper.majornetwork;
|
package com.njcn.event.mapper.majornetwork;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.event.pojo.po.RStatEventOrgM;
|
import com.njcn.event.pojo.po.RStatEventOrgM;
|
||||||
|
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +18,14 @@ import com.njcn.event.pojo.po.RStatEventOrgM;
|
|||||||
*/
|
*/
|
||||||
public interface RStatEventOrgMMapper extends BaseMapper<RStatEventOrgM> {
|
public interface RStatEventOrgMMapper extends BaseMapper<RStatEventOrgM> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各单位监测点查询
|
||||||
|
* @param param
|
||||||
|
* @param ids
|
||||||
|
* @param dataType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatEventVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("dataType") String dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package com.njcn.event.mapper.majornetwork;
|
package com.njcn.event.mapper.majornetwork;
|
||||||
|
|
||||||
|
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.event.pojo.po.RStatEventOrgQ;
|
import com.njcn.event.pojo.po.RStatEventOrgQ;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +18,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface RStatEventOrgQMapper extends BaseMapper<RStatEventOrgQ> {
|
public interface RStatEventOrgQMapper extends BaseMapper<RStatEventOrgQ> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各单位监测点查询
|
||||||
|
* @param param
|
||||||
|
* @param ids
|
||||||
|
* @param dataType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatEventVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("dataType") String dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package com.njcn.event.mapper.majornetwork;
|
package com.njcn.event.mapper.majornetwork;
|
||||||
|
|
||||||
|
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.event.pojo.po.RStatEventOrgY;
|
import com.njcn.event.pojo.po.RStatEventOrgY;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -12,5 +17,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
* @since 2022-10-17
|
* @since 2022-10-17
|
||||||
*/
|
*/
|
||||||
public interface RStatEventOrgYMapper extends BaseMapper<RStatEventOrgY> {
|
public interface RStatEventOrgYMapper extends BaseMapper<RStatEventOrgY> {
|
||||||
|
/**
|
||||||
|
* 各单位监测点查询
|
||||||
|
* @param param
|
||||||
|
* @param dataType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatEventVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("dataType") String dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,5 +15,40 @@
|
|||||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||||
<result column="data_type" property="dataType" />
|
<result column="data_type" property="dataType" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="selectInfoList" resultType="com.njcn.event.pojo.vo.RStatEventVO">
|
||||||
|
SELECT
|
||||||
|
event_type,
|
||||||
|
sum( event_measurement_average )/ count(*) AS eventMeasurementAverage,
|
||||||
|
sum( event_measurement_accrued ) AS eventMeasurementAccrued,
|
||||||
|
sum( event_freq )/ count(*) AS eventFreq,
|
||||||
|
sum( event_count ) AS eventCount,
|
||||||
|
sum( event_measurement_ratio_average )/ count(*) AS eventMeasurementRatioAverage,
|
||||||
|
sum( event_measurement_ratio_accrued ) AS eventMeasurementRatioAccrued
|
||||||
|
FROM
|
||||||
|
r_stat_event_org_m
|
||||||
|
<where>
|
||||||
|
and data_Type=#{dataType}
|
||||||
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND org_no IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND event_type IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||||
|
AND data_date >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||||
|
AND data_date <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
event_type
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -15,5 +15,40 @@
|
|||||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||||
<result column="data_type" property="dataType" />
|
<result column="data_type" property="dataType" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="selectInfoList" resultType="com.njcn.event.pojo.vo.RStatEventVO">
|
||||||
|
SELECT
|
||||||
|
event_type,
|
||||||
|
sum( event_measurement_average )/ count(*) AS eventMeasurementAverage,
|
||||||
|
sum( event_measurement_accrued ) AS eventMeasurementAccrued,
|
||||||
|
sum( event_freq )/ count(*) AS eventFreq,
|
||||||
|
sum( event_count ) AS eventCount,
|
||||||
|
sum( event_measurement_ratio_average )/ count(*) AS eventMeasurementRatioAverage,
|
||||||
|
sum( event_measurement_ratio_accrued ) AS eventMeasurementRatioAccrued
|
||||||
|
FROM
|
||||||
|
r_stat_event_org_q
|
||||||
|
<where>
|
||||||
|
and data_Type=#{dataType}
|
||||||
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND org_no IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND event_type IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||||
|
AND data_date >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||||
|
AND data_date <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
event_type
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -15,5 +15,40 @@
|
|||||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||||
<result column="data_type" property="dataType" />
|
<result column="data_type" property="dataType" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="selectInfoList" resultType="com.njcn.event.pojo.vo.RStatEventVO">
|
||||||
|
SELECT
|
||||||
|
event_type,
|
||||||
|
sum( event_measurement_average )/ count(*) AS eventMeasurementAverage,
|
||||||
|
sum( event_measurement_accrued ) AS eventMeasurementAccrued,
|
||||||
|
sum( event_freq )/ count(*) AS eventFreq,
|
||||||
|
sum( event_count ) AS eventCount,
|
||||||
|
sum( event_measurement_ratio_average )/ count(*) AS eventMeasurementRatioAverage,
|
||||||
|
sum( event_measurement_ratio_accrued ) AS eventMeasurementRatioAccrued
|
||||||
|
FROM
|
||||||
|
r_stat_event_org_y
|
||||||
|
<where>
|
||||||
|
and data_Type=#{dataType}
|
||||||
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND org_no IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND event_type IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||||
|
AND data_date >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||||
|
AND data_date <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
event_type
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.njcn.event.pojo.po.RStatEventOrgM;
|
|||||||
import com.njcn.event.pojo.vo.RArrayVO;
|
import com.njcn.event.pojo.vo.RArrayVO;
|
||||||
import com.njcn.event.pojo.vo.RStatEventMVO;
|
import com.njcn.event.pojo.vo.RStatEventMVO;
|
||||||
import com.njcn.event.service.majornetwork.RStatEventOrgMService;
|
import com.njcn.event.service.majornetwork.RStatEventOrgMService;
|
||||||
|
import com.njcn.event.utils.DeptUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
@@ -48,7 +49,9 @@ public class RStatEventOrgMServiceImpl extends ServiceImpl<RStatEventOrgMMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<RArrayVO> getRStatEventOrgMAll(StatisticsBizBaseParam param) {
|
public List<RArrayVO> getRStatEventOrgMAll(StatisticsBizBaseParam param) {
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
@@ -133,8 +136,10 @@ public class RStatEventOrgMServiceImpl extends ServiceImpl<RStatEventOrgMMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RStatEventMVO> getRStatHarmonicOrgMIcon(REventMParam param) {
|
public List<RStatEventMVO> getRStatHarmonicOrgMIcon(REventMParam param) {
|
||||||
//各单位类型
|
//各单位
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
@@ -281,8 +286,10 @@ public class RStatEventOrgMServiceImpl extends ServiceImpl<RStatEventOrgMMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RStatEventMVO> getPwRStatHarmonicOrgMIcon(REventMParam param) {
|
public List<RStatEventMVO> getPwRStatHarmonicOrgMIcon(REventMParam param) {
|
||||||
//各单位类型
|
//各单位
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.njcn.event.pojo.vo.RArrayVO;
|
|||||||
import com.njcn.event.pojo.vo.RStatEventMVO;
|
import com.njcn.event.pojo.vo.RStatEventMVO;
|
||||||
import com.njcn.event.service.majornetwork.RStatEventOrgQService;
|
import com.njcn.event.service.majornetwork.RStatEventOrgQService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.event.utils.DeptUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
@@ -47,7 +48,9 @@ public class RStatEventOrgQServiceImpl extends ServiceImpl<RStatEventOrgQMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<RArrayVO> getRStatEventOrgQAll(StatisticsBizBaseParam param) {
|
public List<RArrayVO> getRStatEventOrgQAll(StatisticsBizBaseParam param) {
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
@@ -132,8 +135,10 @@ public class RStatEventOrgQServiceImpl extends ServiceImpl<RStatEventOrgQMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RStatEventMVO> getRStatHarmonicOrgQIcon(REventMParam param) {
|
public List<RStatEventMVO> getRStatHarmonicOrgQIcon(REventMParam param) {
|
||||||
//各单位类型
|
//各单位
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
@@ -281,8 +286,10 @@ public class RStatEventOrgQServiceImpl extends ServiceImpl<RStatEventOrgQMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RStatEventMVO> getPwRStatHarmonicOrgQIcon(REventMParam param) {
|
public List<RStatEventMVO> getPwRStatHarmonicOrgQIcon(REventMParam param) {
|
||||||
//各单位类型
|
//各单位
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -3,17 +3,26 @@ package com.njcn.event.service.majornetwork.Impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.lang.Console;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
|
import com.njcn.event.mapper.majornetwork.RStatEventOrgMMapper;
|
||||||
|
import com.njcn.event.mapper.majornetwork.RStatEventOrgQMapper;
|
||||||
import com.njcn.event.pojo.param.REventMParam;
|
import com.njcn.event.pojo.param.REventMParam;
|
||||||
|
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||||
|
import com.njcn.event.pojo.po.RStatEventOrgQ;
|
||||||
import com.njcn.event.pojo.po.RStatEventOrgY;
|
import com.njcn.event.pojo.po.RStatEventOrgY;
|
||||||
import com.njcn.event.mapper.majornetwork.RStatEventOrgYMapper;
|
import com.njcn.event.mapper.majornetwork.RStatEventOrgYMapper;
|
||||||
|
import com.njcn.event.pojo.vo.DeptLevelVO;
|
||||||
import com.njcn.event.pojo.vo.RArrayVO;
|
import com.njcn.event.pojo.vo.RArrayVO;
|
||||||
import com.njcn.event.pojo.vo.RStatEventMVO;
|
import com.njcn.event.pojo.vo.RStatEventMVO;
|
||||||
|
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||||
import com.njcn.event.service.majornetwork.RStatEventOrgYService;
|
import com.njcn.event.service.majornetwork.RStatEventOrgYService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.event.utils.DeptUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
@@ -43,97 +52,121 @@ public class RStatEventOrgYServiceImpl extends ServiceImpl<RStatEventOrgYMapper,
|
|||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
private final RStatEventOrgYMapper statEventOrgYMapper;
|
private final RStatEventOrgYMapper statEventOrgYMapper;
|
||||||
|
private final RStatEventOrgQMapper statEventOrgQMapper;
|
||||||
|
private final RStatEventOrgMMapper statEventOrgMMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RArrayVO> getRStatEventOrgYAll(StatisticsBizBaseParam param) {
|
public List<RArrayVO> getRStatEventOrgYAll(StatisticsBizBaseParam param) {
|
||||||
|
//对象主节点 获取所有得指标类型
|
||||||
|
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode
|
||||||
|
(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||||
|
List<String> steadyDataIds = steadyData.stream().map(DictData::getId).collect(Collectors.toList());
|
||||||
|
Map<String, DictData> lineTypeMap = steadyData.stream()
|
||||||
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
//获取部门id集合
|
//获取子部门(按照code改变数据结构)
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<DeptLevelVO> deptLevelVOList = DeptUtil.getDeptLevelVOList(deptDTOList, param.getId());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptLevelVO> deptMap = deptLevelVOList.stream().collect(Collectors.toMap(DeptLevelVO::getCode, Function.identity()));
|
||||||
|
|
||||||
//对象主节点 获取所有得暂降类型
|
|
||||||
List<DictData> lineTypeData = dicDataFeignClient.getDicDataByTypeCode(
|
|
||||||
DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
|
||||||
Map<String, DictData> lineTypeMap = lineTypeData.stream()
|
|
||||||
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
|
||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//数据库查询
|
StatSubstationBizBaseParam baseParam;
|
||||||
List<RStatEventOrgY> list = statEventOrgYMapper.selectList(new LambdaQueryWrapper<RStatEventOrgY>()
|
|
||||||
.eq(RStatEventOrgY::getDataType, mainnetData.getId())
|
|
||||||
.in(RStatEventOrgY::getOrgNo, deptIds)
|
|
||||||
.ge(param.getStartTime() != null, RStatEventOrgY::getDataDate, param.getStartTime())
|
|
||||||
.le(param.getEndTime() != null, RStatEventOrgY::getDataDate, param.getEndTime()));
|
|
||||||
|
|
||||||
//初始化指标类型(横向)
|
//初始化指标类型(横向)
|
||||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
List<RStatEventMVO> rm = new ArrayList<>();
|
List<RStatEventVO> newList=new ArrayList<>();
|
||||||
for (DeptDTO deptDTO : deptDTOList) {
|
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||||
RStatEventMVO r = new RStatEventMVO();
|
//数据库查询
|
||||||
r.setEventName(deptDTO.getName());
|
baseParam=BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
r.setSort(deptDTO.getSort());
|
//没有子部门说明就是最底层部门
|
||||||
r.setEventMeasurementAverage(0);
|
if(CollUtil.isNotEmpty(deptLevelVO.getDeptList())){
|
||||||
r.setEventMeasurementAccrued(0);
|
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||||
r.setEventFreq(0.0F);
|
baseParam.setIds(deptCodeS);
|
||||||
r.setEventCount(0);
|
}else{
|
||||||
r.setEventMeasurementRatioAverage(0.0F);
|
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||||
r.setEventMeasurementRatioAccrued(0.0F);
|
}
|
||||||
rm.add(r);
|
//区分 年 季 月
|
||||||
|
String string = param.getType().toString();
|
||||||
|
List<RStatEventVO> list = new ArrayList<>();
|
||||||
|
switch (string) {
|
||||||
|
//查询各单位累计超标监测点数-年数据
|
||||||
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
|
list = statEventOrgYMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-季数据
|
||||||
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
list = statEventOrgQMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-月数据
|
||||||
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
|
list = statEventOrgMMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//获取数据库数据
|
||||||
|
Map<String, RStatEventVO> orgMap = list.stream()
|
||||||
|
.collect(Collectors.toMap(RStatEventVO::getEventType, Function.identity()));
|
||||||
|
|
||||||
|
List<DictData> notMeasurementList = steadyData.stream().filter(r -> !orgMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
for (RStatEventVO org : list) {
|
||||||
|
org.setOrgNo(deptLevelVO.getCode());
|
||||||
|
}
|
||||||
|
RStatEventVO org;
|
||||||
|
for (DictData notData : notMeasurementList) {
|
||||||
|
org=new RStatEventVO();
|
||||||
|
org.setOrgNo(deptLevelVO.getCode());
|
||||||
|
org.setEventType(notData.getId());
|
||||||
|
org.setEventMeasurementAverage(0);
|
||||||
|
org.setEventMeasurementAccrued(0);
|
||||||
|
org.setEventFreq(0.0F);
|
||||||
|
org.setEventCount(0);
|
||||||
|
org.setEventMeasurementRatioAverage(0.0F);
|
||||||
|
org.setEventMeasurementRatioAccrued(0.0F);
|
||||||
|
list.add(org);
|
||||||
|
}
|
||||||
|
newList.addAll(list);
|
||||||
}
|
}
|
||||||
for (DictData lineTypeDatum : lineTypeData) {
|
|
||||||
RArrayVO r = new RArrayVO();
|
Map<String, List<RStatEventVO>> harmonicMap =
|
||||||
r.setRowName(lineTypeDatum.getName());
|
newList.stream().collect(Collectors.groupingBy(RStatEventVO::getEventType));
|
||||||
r.setColumns(rm);
|
|
||||||
r.setSort(lineTypeDatum.getSort());
|
|
||||||
arrayVOList.add(r);
|
|
||||||
}
|
|
||||||
//根据检测点对象分组
|
|
||||||
Map<String, List<RStatEventOrgY>> measurementTypeClassMap = list.stream().collect(Collectors.groupingBy(RStatEventOrgY::getEventType));
|
|
||||||
//重新生成数据结构
|
//重新生成数据结构
|
||||||
measurementTypeClassMap.forEach((key, value) -> {
|
harmonicMap.forEach((key, value) -> {
|
||||||
if (lineTypeMap.containsKey(key)) {
|
if(lineTypeMap.containsKey(key)){
|
||||||
RArrayVO arrayVO = new RArrayVO();
|
RArrayVO arrayVO=new RArrayVO();
|
||||||
DictData data = lineTypeMap.get(key);
|
DictData data = lineTypeMap.get(key);
|
||||||
arrayVO.setRowName(data.getName());
|
arrayVO.setRowName(data.getName());
|
||||||
arrayVO.setSort(data.getSort());
|
arrayVO.setSort(data.getSort());
|
||||||
List<RStatEventMVO> b = new ArrayList<>();
|
List<RStatEventMVO> b=new ArrayList<>();
|
||||||
b.addAll(rm);
|
for (RStatEventVO orgY : value) {
|
||||||
for (RStatEventOrgY orgY : value) {
|
RStatEventMVO r = BeanUtil.copyProperties(orgY, RStatEventMVO.class);
|
||||||
if (deptMap.containsKey(orgY.getOrgNo())) {
|
DeptLevelVO data1 = deptMap.get(orgY.getOrgNo());
|
||||||
RStatEventMVO r = BeanUtil.copyProperties(orgY, RStatEventMVO.class);
|
if (ObjectUtil.isNotNull(data1)){
|
||||||
DeptDTO data1 = deptMap.get(orgY.getOrgNo());
|
|
||||||
r.setEventName(data1.getName());
|
r.setEventName(data1.getName());
|
||||||
r.setSort(data1.getSort());
|
r.setSort(data1.getSort());
|
||||||
b.add(r);
|
b.add(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Map<String, RStatEventMVO> linkedHashMap = new LinkedHashMap<>();
|
b.sort(Comparator.comparing(rStatHarmonicMVO -> rStatHarmonicMVO.getSort()));
|
||||||
for (RStatEventMVO harmonicMVO : b) {
|
arrayVO.setColumns(b);
|
||||||
linkedHashMap.put(harmonicMVO.getEventName(), harmonicMVO);
|
|
||||||
}
|
|
||||||
List<RStatEventMVO> aa = new ArrayList<>(linkedHashMap.values());
|
|
||||||
aa.sort(Comparator.comparing(rStatEventMVO -> rStatEventMVO.getSort()));
|
|
||||||
arrayVO.setColumns(aa);
|
|
||||||
arrayVOList.add(arrayVO);
|
arrayVOList.add(arrayVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
Map<String, RArrayVO> linkedHashMap = new LinkedHashMap<>();
|
|
||||||
for (RArrayVO rArrayVO : arrayVOList) {
|
|
||||||
linkedHashMap.put(rArrayVO.getRowName(), rArrayVO);
|
|
||||||
}
|
|
||||||
List<RArrayVO> aa = new ArrayList<>(linkedHashMap.values());
|
|
||||||
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
||||||
return aa;
|
return arrayVOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RStatEventMVO> getRStatHarmonicOrgYIcon(REventMParam param) {
|
public List<RStatEventMVO> getRStatHarmonicOrgYIcon(REventMParam param) {
|
||||||
//各单位类型
|
//各单位
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
@@ -281,8 +314,11 @@ public class RStatEventOrgYServiceImpl extends ServiceImpl<RStatEventOrgYMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RStatEventMVO> getPwRStatHarmonicOrgYIcon(REventMParam param) {
|
public List<RStatEventMVO> getPwRStatHarmonicOrgYIcon(REventMParam param) {
|
||||||
//各单位类型
|
//各单位
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
@@ -354,6 +390,88 @@ public class RStatEventOrgYServiceImpl extends ServiceImpl<RStatEventOrgYMapper,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RArrayVO> getRStatEventOrgOldYAll(StatisticsBizBaseParam param, Integer type) {
|
||||||
|
//对象主节点 获取所有得暂降类型
|
||||||
|
List<DictData> eventData = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||||
|
Map<String, DictData> eventMap = eventData.stream()
|
||||||
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
|
//子节点 获取所有得各单位类型
|
||||||
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
|
//获取部门id集合
|
||||||
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
|
|
||||||
|
DictData dictData ;
|
||||||
|
if(type==1){
|
||||||
|
//获取主网信息
|
||||||
|
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
}else{
|
||||||
|
//获取配网信息
|
||||||
|
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||||
|
}
|
||||||
|
//数据库查询
|
||||||
|
List<RStatEventOrgY> list = statEventOrgYMapper.selectList(new LambdaQueryWrapper<RStatEventOrgY>()
|
||||||
|
.eq(RStatEventOrgY::getDataType, dictData.getId())
|
||||||
|
.in(RStatEventOrgY::getOrgNo, deptIds)
|
||||||
|
.ge(param.getStartTime() != null, RStatEventOrgY::getDataDate, param.getStartTime())
|
||||||
|
.le(param.getEndTime() != null, RStatEventOrgY::getDataDate, param.getEndTime()));
|
||||||
|
|
||||||
|
//初始化指标类型(横向)
|
||||||
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
|
//根据检测点对象分组
|
||||||
|
Map<String, List<RStatEventOrgY>> measurementTypeClassMap = list.stream().collect(Collectors.groupingBy(RStatEventOrgY::getEventType));
|
||||||
|
//判断对象是否为空
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
//重新生成数据结构
|
||||||
|
measurementTypeClassMap.forEach((key, value) -> {
|
||||||
|
if (eventMap.containsKey(key)) {
|
||||||
|
List<RStatEventMVO> eventVO = new ArrayList<>();
|
||||||
|
RArrayVO arrayVO = new RArrayVO();
|
||||||
|
DictData data = eventMap.get(key);
|
||||||
|
arrayVO.setRowName(data.getName());
|
||||||
|
arrayVO.setSort(data.getSort());
|
||||||
|
for (RStatEventOrgY org : value) {
|
||||||
|
if(deptMap.containsKey(org.getOrgNo())){
|
||||||
|
RStatEventMVO r = BeanUtil.copyProperties(org, RStatEventMVO.class);
|
||||||
|
DeptDTO deptDTO = deptMap.get(org.getOrgNo());
|
||||||
|
r.setEventName(deptDTO.getName());
|
||||||
|
r.setSort(deptDTO.getSort());
|
||||||
|
eventVO.add(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//根据监测点类别获取差集
|
||||||
|
Map<String, List<RStatEventOrgY>> listMap = value.stream().collect(Collectors.groupingBy(RStatEventOrgY::getEventType));
|
||||||
|
List<DeptDTO> notDeptList = deptDTOList.stream().filter(r -> !listMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
this.assignDept(notDeptList, eventVO, arrayVO);
|
||||||
|
eventVO.sort(Comparator.comparing(rStatEventMVO -> rStatEventMVO.getSort()));
|
||||||
|
arrayVOList.add(arrayVO);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//处理主节点不存在的集合
|
||||||
|
List<DictData> notMeasurementList = eventData.stream().filter(r -> !measurementTypeClassMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
for (DictData notData : notMeasurementList) {
|
||||||
|
List<RStatEventMVO> eventVO = new ArrayList<>();
|
||||||
|
RArrayVO arrayVO = new RArrayVO();
|
||||||
|
arrayVO.setRowName(notData.getName());
|
||||||
|
arrayVO.setSort(notData.getSort());
|
||||||
|
this.assignDept(deptDTOList, eventVO, arrayVO);
|
||||||
|
eventVO.sort(Comparator.comparing(rStatEventMVO -> rStatEventMVO.getSort()));
|
||||||
|
arrayVOList.add(arrayVO);
|
||||||
|
}
|
||||||
|
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
||||||
|
return arrayVOList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 便利赋值
|
* 便利赋值
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ import com.njcn.system.pojo.po.DictData;
|
|||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -78,21 +80,24 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
|||||||
if (CollUtil.isEmpty(monitorIds)) {
|
if (CollUtil.isEmpty(monitorIds)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取暂态事件明细
|
|
||||||
List<RmpEventDetailPO> detailsOfTransientEvents = rmpEventDetailMapper.getDetailsOfTransientEvents(monitorIds, param.getEventType(), param.getStartTime(), param.getEndTime());
|
|
||||||
if (CollectionUtil.isEmpty(detailsOfTransientEvents)) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
// 查询监测点信息
|
// 查询监测点信息
|
||||||
PmsMonitorParam pmsMonitorParam = new PmsMonitorParam();
|
PmsMonitorParam pmsMonitorParam = new PmsMonitorParam();
|
||||||
|
if (!StringUtils.isEmpty(param.getMonitorName())){
|
||||||
|
pmsMonitorParam.setMonitorName(param.getMonitorName());
|
||||||
|
}
|
||||||
pmsMonitorParam.setMonitorIds(monitorIds);
|
pmsMonitorParam.setMonitorIds(monitorIds);
|
||||||
List<PmsMonitorDTO> monitorInfo = monitorClient.getMonitorInfoListByCond(pmsMonitorParam).getData();
|
List<PmsMonitorDTO> monitorInfo = monitorClient.getMonitorInfoListByCond(pmsMonitorParam).getData();
|
||||||
if (CollectionUtil.isEmpty(monitorInfo)) {
|
if (CollectionUtil.isEmpty(monitorInfo)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
// 蒋单位信息转成map集合
|
// 取出所有监测点
|
||||||
Map<String, List<PmsGeneralDeviceDTO>> deptMap = data.stream().collect(Collectors.groupingBy(PmsGeneralDeviceDTO::getIndex));
|
List<String> monitorList = monitorInfo.stream().map(PmsMonitorDTO::getId).collect(Collectors.toList());
|
||||||
|
// 获取暂态事件明细
|
||||||
|
List<RmpEventDetailPO> detailsOfTransientEvents = rmpEventDetailMapper.getDetailsOfTransientEvents(monitorList, param.getEventType(), param.getStartTime(), param.getEndTime());
|
||||||
|
if (CollectionUtil.isEmpty(detailsOfTransientEvents)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
// 蒋监测点信息转换成map集合
|
// 蒋监测点信息转换成map集合
|
||||||
Map<String, String> monitorInfoMap = monitorInfo.stream().collect(Collectors.toMap(PmsMonitorDTO::getId, PmsMonitorDTO::getName));
|
Map<String, String> monitorInfoMap = monitorInfo.stream().collect(Collectors.toMap(PmsMonitorDTO::getId, PmsMonitorDTO::getName));
|
||||||
// 将事件类型转换成map集合
|
// 将事件类型转换成map集合
|
||||||
@@ -102,16 +107,9 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
|||||||
return detailsOfTransientEvents.stream().map(po -> {
|
return detailsOfTransientEvents.stream().map(po -> {
|
||||||
RmpEventDetailVO vo = new RmpEventDetailVO();
|
RmpEventDetailVO vo = new RmpEventDetailVO();
|
||||||
for (PmsGeneralDeviceDTO dto : data) {
|
for (PmsGeneralDeviceDTO dto : data) {
|
||||||
if (dto.getMonitorIdList().contains(po.getMeasurementPointId())){
|
if (dto.getMonitorIdList().contains(po.getMeasurementPointId())) {
|
||||||
|
BeanUtils.copyProperties(po, vo);
|
||||||
vo.setDeptName(dto.getName());
|
vo.setDeptName(dto.getName());
|
||||||
vo.setEventId(po.getEventId());
|
|
||||||
vo.setMeasurementPointId(po.getMeasurementPointId());
|
|
||||||
vo.setEventType(po.getEventType());
|
|
||||||
vo.setPhase(po.getPhase());
|
|
||||||
vo.setStartTime(po.getStartTime());
|
|
||||||
vo.setDuration(po.getDuration());
|
|
||||||
vo.setFeatureAmplitude(po.getFeatureAmplitude());
|
|
||||||
vo.setWavePath(po.getWavePath());
|
|
||||||
vo.setMonitorSort(monitorSort);
|
vo.setMonitorSort(monitorSort);
|
||||||
vo.setMeasurementPointName(monitorInfoMap.get(po.getMeasurementPointId()));
|
vo.setMeasurementPointName(monitorInfoMap.get(po.getMeasurementPointId()));
|
||||||
vo.setEventType(eventStatisDataMap.get(po.getEventType()));
|
vo.setEventType(eventStatisDataMap.get(po.getEventType()));
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
// 查询变电站信息
|
// 查询变电站信息
|
||||||
PmsStatationStatInfoParam pmsStatationStatInfoParam = new PmsStatationStatInfoParam();
|
PmsStatationStatInfoParam pmsStatationStatInfoParam = new PmsStatationStatInfoParam();
|
||||||
pmsStatationStatInfoParam.setOrgIds(deptCode);
|
pmsStatationStatInfoParam.setOrgIds(deptCode);
|
||||||
if (StringUtils.isEmpty(param.getSubName())) {
|
if (!StringUtils.isEmpty(param.getSubName())) {
|
||||||
pmsStatationStatInfoParam.setPowerName(param.getSubName());
|
pmsStatationStatInfoParam.setPowerName(param.getSubName());
|
||||||
}
|
}
|
||||||
List<StatationStat> powerInfo = statationStatClient.getPowerInfo(pmsStatationStatInfoParam).getData();
|
List<StatationStat> powerInfo = statationStatClient.getPowerInfo(pmsStatationStatInfoParam).getData();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.util.List;
|
|||||||
public interface RStatEventOrgYService extends IService<RStatEventOrgY> {
|
public interface RStatEventOrgYService extends IService<RStatEventOrgY> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主网查询查询各单位暂态指标 日/月点数(年)
|
* 主网查询查询各单位暂态指标 日/月点数(年)(暂不使用,递归子部门统计)
|
||||||
*
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
@@ -50,4 +50,13 @@ public interface RStatEventOrgYService extends IService<RStatEventOrgY> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RStatEventMVO> getPwRStatHarmonicOrgYIcon(REventMParam param);
|
List<RStatEventMVO> getPwRStatHarmonicOrgYIcon(REventMParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主网查询查询各单位暂态指标 日/月点数(年)
|
||||||
|
* @param param
|
||||||
|
* @param type 区分主配网
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RArrayVO> getRStatEventOrgOldYAll(StatisticsBizBaseParam param, Integer type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,14 +140,15 @@ whitelist:
|
|||||||
- /swagger-resources/**
|
- /swagger-resources/**
|
||||||
- /*/v2/api-docs
|
- /*/v2/api-docs
|
||||||
- /favicon.ico
|
- /favicon.ico
|
||||||
- /device-boot/**
|
- /system-boot/theme/getTheme
|
||||||
- /system-boot/**
|
# - /device-boot/**
|
||||||
- /harmonic-boot/**
|
# - /system-boot/**
|
||||||
- /energy-boot/**
|
# - /harmonic-boot/**
|
||||||
- /event-boot/**
|
# - /energy-boot/**
|
||||||
- /quality-boot/**
|
# - /event-boot/**
|
||||||
- /harmonic-prepare/**
|
# - /quality-boot/**
|
||||||
- /process-boot/**
|
# - /harmonic-prepare/**
|
||||||
|
# - /process-boot/**
|
||||||
|
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
|
|||||||
@@ -38,6 +38,11 @@
|
|||||||
<artifactId>common-poi</artifactId>
|
<artifactId>common-poi</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>user-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pms-device-api</artifactId>
|
<artifactId>pms-device-api</artifactId>
|
||||||
|
|||||||
@@ -39,4 +39,11 @@ public class PowerQualityParam extends StatisticsBizBaseParam {
|
|||||||
@ApiModelProperty(value = "监测点类别",required = true)
|
@ApiModelProperty(value = "监测点类别",required = true)
|
||||||
private List<String> monitorSort;;
|
private List<String> monitorSort;;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class PowerQualityInfoParam extends PowerQualityParam{
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点标签",required = true)
|
||||||
|
private String monitorTag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
|||||||
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 电气化铁路_详细信息表(专项分析)
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2022-12-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("r_mp_railway_traction_detail")
|
||||||
|
@ApiModel(value="RMpRailwayTractionDetail对象", description="电气化铁路_详细信息表(专项分析)")
|
||||||
|
public class RMpRailwayTractionDetail implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "牵引站id")
|
||||||
|
@TableId(value = "traction_station_id", type = IdType.ASSIGN_ID)
|
||||||
|
private String tractionStationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "统计时间")
|
||||||
|
private LocalDate dataDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "有功功率")
|
||||||
|
private Float activePowerTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电压")
|
||||||
|
private Integer vTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电流")
|
||||||
|
private Integer iTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电压不平衡")
|
||||||
|
private Integer unbalanceTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负序电流")
|
||||||
|
private Integer iNegTimes;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.njcn.harmonic.pojo.po;
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import java.time.LocalDate;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
@@ -24,176 +24,343 @@ import lombok.EqualsAndHashCode;
|
|||||||
@ApiModel(value="RMpSurplusHarmonicDetailD对象", description="")
|
@ApiModel(value="RMpSurplusHarmonicDetailD对象", description="")
|
||||||
public class RMpSurplusHarmonicDetailD implements Serializable {
|
public class RMpSurplusHarmonicDetailD implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
/**
|
||||||
|
* 监测点ID
|
||||||
@ApiModelProperty(value = "监测点ID")
|
*/
|
||||||
@TableId(value = "measurement_point_id", type = IdType.ASSIGN_ID)
|
@MppMultiId(value = "measurement_point_id")
|
||||||
private String measurementPointId;
|
private String measurementPointId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "生成数据的时间,每月统计一次")
|
/**
|
||||||
|
* 生成数据的时间,每月统计一次
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "data_date")
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "闪变发生次数")
|
/**
|
||||||
|
* 闪变发生次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "flicker_times")
|
||||||
private Integer flickerTimes;
|
private Integer flickerTimes;
|
||||||
|
|
||||||
@ApiModelProperty(value = "闪变是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 闪变是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_flicker")
|
||||||
private Integer isFlicker;
|
private Integer isFlicker;
|
||||||
|
|
||||||
@ApiModelProperty(value = "间谐波电压超标次数")
|
/**
|
||||||
|
* 间谐波电压超标次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_times")
|
||||||
private Integer inuharmTimes;
|
private Integer inuharmTimes;
|
||||||
|
|
||||||
@ApiModelProperty(value = "间谐波电压是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 间谐波电压是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm")
|
||||||
private Integer isInuharm;
|
private Integer isInuharm;
|
||||||
|
|
||||||
@ApiModelProperty(value = "0.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 0.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_1")
|
||||||
private Integer isInuharm1;
|
private Integer isInuharm1;
|
||||||
|
|
||||||
@ApiModelProperty(value = "1.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 1.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_2")
|
||||||
private Integer isInuharm2;
|
private Integer isInuharm2;
|
||||||
|
|
||||||
@ApiModelProperty(value = "2.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 2.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_3")
|
||||||
private Integer isInuharm3;
|
private Integer isInuharm3;
|
||||||
|
|
||||||
@ApiModelProperty(value = "3.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 3.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_4")
|
||||||
private Integer isInuharm4;
|
private Integer isInuharm4;
|
||||||
|
|
||||||
@ApiModelProperty(value = "4.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 4.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_5")
|
||||||
private Integer isInuharm5;
|
private Integer isInuharm5;
|
||||||
|
|
||||||
@ApiModelProperty(value = "5.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 5.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_6")
|
||||||
private Integer isInuharm6;
|
private Integer isInuharm6;
|
||||||
|
|
||||||
@ApiModelProperty(value = "6.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 6.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_7")
|
||||||
private Integer isInuharm7;
|
private Integer isInuharm7;
|
||||||
|
|
||||||
@ApiModelProperty(value = "7.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 7.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_8")
|
||||||
private Integer isInuharm8;
|
private Integer isInuharm8;
|
||||||
|
|
||||||
@ApiModelProperty(value = "8.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 8.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_9")
|
||||||
private Integer isInuharm9;
|
private Integer isInuharm9;
|
||||||
|
|
||||||
@ApiModelProperty(value = "9.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 9.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_10")
|
||||||
private Integer isInuharm10;
|
private Integer isInuharm10;
|
||||||
|
|
||||||
@ApiModelProperty(value = "10.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 10.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_11")
|
||||||
private Integer isInuharm11;
|
private Integer isInuharm11;
|
||||||
|
|
||||||
@ApiModelProperty(value = "11.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 11.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_12")
|
||||||
private Integer isInuharm12;
|
private Integer isInuharm12;
|
||||||
|
|
||||||
@ApiModelProperty(value = "12.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 12.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_13")
|
||||||
private Integer isInuharm13;
|
private Integer isInuharm13;
|
||||||
|
|
||||||
@ApiModelProperty(value = "13.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 13.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_14")
|
||||||
private Integer isInuharm14;
|
private Integer isInuharm14;
|
||||||
|
|
||||||
@ApiModelProperty(value = "14.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 14.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_15")
|
||||||
private Integer isInuharm15;
|
private Integer isInuharm15;
|
||||||
|
|
||||||
@ApiModelProperty(value = "15.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 15.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_16")
|
||||||
private Integer isInuharm16;
|
private Integer isInuharm16;
|
||||||
|
|
||||||
@ApiModelProperty(value = "16.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 16.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_17")
|
||||||
private Integer isInuharm17;
|
private Integer isInuharm17;
|
||||||
|
|
||||||
@ApiModelProperty(value = "17.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 17.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_18")
|
||||||
private Integer isInuharm18;
|
private Integer isInuharm18;
|
||||||
|
|
||||||
@ApiModelProperty(value = "18.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 18.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_19")
|
||||||
private Integer isInuharm19;
|
private Integer isInuharm19;
|
||||||
|
|
||||||
@ApiModelProperty(value = "19.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 19.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_20")
|
||||||
private Integer isInuharm20;
|
private Integer isInuharm20;
|
||||||
|
|
||||||
@ApiModelProperty(value = "20.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 20.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_21")
|
||||||
private Integer isInuharm21;
|
private Integer isInuharm21;
|
||||||
|
|
||||||
@ApiModelProperty(value = "21.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 21.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_22")
|
||||||
private Integer isInuharm22;
|
private Integer isInuharm22;
|
||||||
|
|
||||||
@ApiModelProperty(value = "22.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 22.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_23")
|
||||||
private Integer isInuharm23;
|
private Integer isInuharm23;
|
||||||
|
|
||||||
@ApiModelProperty(value = "23.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 23.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_24")
|
||||||
private Integer isInuharm24;
|
private Integer isInuharm24;
|
||||||
|
|
||||||
@ApiModelProperty(value = "24.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 24.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_25")
|
||||||
private Integer isInuharm25;
|
private Integer isInuharm25;
|
||||||
|
|
||||||
@ApiModelProperty(value = "25.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 25.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_26")
|
||||||
private Integer isInuharm26;
|
private Integer isInuharm26;
|
||||||
|
|
||||||
@ApiModelProperty(value = "26.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 26.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_27")
|
||||||
private Integer isInuharm27;
|
private Integer isInuharm27;
|
||||||
|
|
||||||
@ApiModelProperty(value = "27.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 27.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_28")
|
||||||
private Integer isInuharm28;
|
private Integer isInuharm28;
|
||||||
|
|
||||||
@ApiModelProperty(value = "28.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 28.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_29")
|
||||||
private Integer isInuharm29;
|
private Integer isInuharm29;
|
||||||
|
|
||||||
@ApiModelProperty(value = "29.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 29.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_30")
|
||||||
private Integer isInuharm30;
|
private Integer isInuharm30;
|
||||||
|
|
||||||
@ApiModelProperty(value = "30.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 30.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_31")
|
||||||
private Integer isInuharm31;
|
private Integer isInuharm31;
|
||||||
|
|
||||||
@ApiModelProperty(value = "31.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 31.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_32")
|
||||||
private Integer isInuharm32;
|
private Integer isInuharm32;
|
||||||
|
|
||||||
@ApiModelProperty(value = "32.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 32.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_33")
|
||||||
private Integer isInuharm33;
|
private Integer isInuharm33;
|
||||||
|
|
||||||
@ApiModelProperty(value = "33.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 33.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_34")
|
||||||
private Integer isInuharm34;
|
private Integer isInuharm34;
|
||||||
|
|
||||||
@ApiModelProperty(value = "34.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 34.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_35")
|
||||||
private Integer isInuharm35;
|
private Integer isInuharm35;
|
||||||
|
|
||||||
@ApiModelProperty(value = "35.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 35.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_36")
|
||||||
private Integer isInuharm36;
|
private Integer isInuharm36;
|
||||||
|
|
||||||
@ApiModelProperty(value = "36.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 36.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_37")
|
||||||
private Integer isInuharm37;
|
private Integer isInuharm37;
|
||||||
|
|
||||||
@ApiModelProperty(value = "37.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 37.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_38")
|
||||||
private Integer isInuharm38;
|
private Integer isInuharm38;
|
||||||
|
|
||||||
@ApiModelProperty(value = "38.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 38.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_39")
|
||||||
private Integer isInuharm39;
|
private Integer isInuharm39;
|
||||||
|
|
||||||
@ApiModelProperty(value = "39.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 39.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_40")
|
||||||
private Integer isInuharm40;
|
private Integer isInuharm40;
|
||||||
|
|
||||||
@ApiModelProperty(value = "40.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 40.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_41")
|
||||||
private Integer isInuharm41;
|
private Integer isInuharm41;
|
||||||
|
|
||||||
@ApiModelProperty(value = "41.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 41.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_42")
|
||||||
private Integer isInuharm42;
|
private Integer isInuharm42;
|
||||||
|
|
||||||
@ApiModelProperty(value = "42.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 42.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_43")
|
||||||
private Integer isInuharm43;
|
private Integer isInuharm43;
|
||||||
|
|
||||||
@ApiModelProperty(value = "43.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 43.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_44")
|
||||||
private Integer isInuharm44;
|
private Integer isInuharm44;
|
||||||
|
|
||||||
@ApiModelProperty(value = "44.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 44.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_45")
|
||||||
private Integer isInuharm45;
|
private Integer isInuharm45;
|
||||||
|
|
||||||
@ApiModelProperty(value = "45.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 45.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_46")
|
||||||
private Integer isInuharm46;
|
private Integer isInuharm46;
|
||||||
|
|
||||||
@ApiModelProperty(value = "46.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 46.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_47")
|
||||||
private Integer isInuharm47;
|
private Integer isInuharm47;
|
||||||
|
|
||||||
@ApiModelProperty(value = "47.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 47.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_48")
|
||||||
private Integer isInuharm48;
|
private Integer isInuharm48;
|
||||||
|
|
||||||
@ApiModelProperty(value = "48.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 48.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_49")
|
||||||
private Integer isInuharm49;
|
private Integer isInuharm49;
|
||||||
|
|
||||||
@ApiModelProperty(value = "49.5次谐波电流含有率是否超标(0:否 1:是)")
|
/**
|
||||||
|
* 49.5次谐波电流含有率是否超标(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_inuharm_50")
|
||||||
private Integer isInuharm50;
|
private Integer isInuharm50;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ public class RMpWpPowerDetailM implements Serializable {
|
|||||||
@ApiModelProperty(value = "统计时间")
|
@ApiModelProperty(value = "统计时间")
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点标签")
|
||||||
|
private String monitorTag;
|
||||||
|
|
||||||
@ApiModelProperty(value = "负载率(平均值)")
|
@ApiModelProperty(value = "负载率(平均值)")
|
||||||
private Float loadRateAvg;
|
private Float loadRateAvg;
|
||||||
|
|
||||||
@@ -96,6 +99,17 @@ public class RMpWpPowerDetailM implements Serializable {
|
|||||||
@ApiModelProperty(value = "B相有功功率平均值")
|
@ApiModelProperty(value = "B相有功功率平均值")
|
||||||
private Float bpActivePowerAvg;
|
private Float bpActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率95值")
|
||||||
|
@TableField(value = "cp_active_power_99")
|
||||||
|
private Float cpActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率99值")
|
||||||
|
@TableField(value = "cp_active_power_99")
|
||||||
|
private Float cpActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率平均值")
|
||||||
|
private Float cpActivePowerAvg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "A相基波电压")
|
@ApiModelProperty(value = "A相基波电压")
|
||||||
private Float apFundamentalVoltage;
|
private Float apFundamentalVoltage;
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ public class RMpWpPowerDetailQ implements Serializable {
|
|||||||
@TableId(value = "measurement_point_id", type = IdType.ASSIGN_ID)
|
@TableId(value = "measurement_point_id", type = IdType.ASSIGN_ID)
|
||||||
private String measurementPointId;
|
private String measurementPointId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点标签")
|
||||||
|
private String monitorTag;
|
||||||
|
|
||||||
@ApiModelProperty(value = "统计时间")
|
@ApiModelProperty(value = "统计时间")
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
@@ -96,6 +100,17 @@ public class RMpWpPowerDetailQ implements Serializable {
|
|||||||
@ApiModelProperty(value = "B相有功功率平均值")
|
@ApiModelProperty(value = "B相有功功率平均值")
|
||||||
private Float bpActivePowerAvg;
|
private Float bpActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率95值")
|
||||||
|
@TableField(value = "cp_active_power_99")
|
||||||
|
private Float cpActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率99值")
|
||||||
|
@TableField(value = "cp_active_power_99")
|
||||||
|
private Float cpActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率平均值")
|
||||||
|
private Float cpActivePowerAvg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "A相基波电压")
|
@ApiModelProperty(value = "A相基波电压")
|
||||||
private Float apFundamentalVoltage;
|
private Float apFundamentalVoltage;
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ public class RMpWpPowerDetailY implements Serializable {
|
|||||||
@ApiModelProperty(value = "统计时间")
|
@ApiModelProperty(value = "统计时间")
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点标签")
|
||||||
|
private String monitorTag;
|
||||||
|
|
||||||
@ApiModelProperty(value = "负载率(平均值)")
|
@ApiModelProperty(value = "负载率(平均值)")
|
||||||
private Float loadRateAvg;
|
private Float loadRateAvg;
|
||||||
|
|
||||||
@@ -96,6 +99,17 @@ public class RMpWpPowerDetailY implements Serializable {
|
|||||||
@ApiModelProperty(value = "B相有功功率平均值")
|
@ApiModelProperty(value = "B相有功功率平均值")
|
||||||
private Float bpActivePowerAvg;
|
private Float bpActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率95值")
|
||||||
|
@TableField(value = "cp_active_power_99")
|
||||||
|
private Float cpActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率99值")
|
||||||
|
@TableField(value = "cp_active_power_99")
|
||||||
|
private Float cpActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率平均值")
|
||||||
|
private Float cpActivePowerAvg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "A相基波电压")
|
@ApiModelProperty(value = "A相基波电压")
|
||||||
private Float apFundamentalVoltage;
|
private Float apFundamentalVoltage;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.harmonic.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <功能描述>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DeptLevelVO implements Serializable {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String pid;
|
||||||
|
private String pids;
|
||||||
|
private String name;
|
||||||
|
private String code;
|
||||||
|
private Integer specialType;
|
||||||
|
private String area;
|
||||||
|
private String remark;
|
||||||
|
private Integer sort;
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
//子孙部门
|
||||||
|
List<DeptLevelVO> deptList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.njcn.harmonic.pojo.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 电气化铁路_详细信息表(专项分析)
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2022-12-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("电气化铁路实体类")
|
||||||
|
public class RMpRailwayTractionDetailVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "牵引站id")
|
||||||
|
private String tractionStationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "牵引站名称")
|
||||||
|
private String tractionStationName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "公司名称")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电铁路线")
|
||||||
|
private String railwayLineName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "铁路类型")
|
||||||
|
private Integer railwayType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电压等级")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "牵引站变电容量")
|
||||||
|
private Double ratedCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "统计时间")
|
||||||
|
private LocalDate dataDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "有功功率")
|
||||||
|
private Float activePowerTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电压")
|
||||||
|
private Float vTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电流")
|
||||||
|
private Float iTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电压不平衡")
|
||||||
|
private Float unbalanceTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负序电流")
|
||||||
|
private Float iNegTimes;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.njcn.harmonic.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专项分析-风电场-详细数据表
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @date 2022-11-30
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RMpWpPowerDetailVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点id")
|
||||||
|
private String measurementPointId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点名称")
|
||||||
|
private String measurementPointName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负载率(平均值)")
|
||||||
|
private Float loadRateAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负载率(95%值)")
|
||||||
|
private Float loadRate95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负载率(99%值)")
|
||||||
|
private Float loadRate99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电压超标情况(0:否 1:是)")
|
||||||
|
private Integer isV;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电流超标情况(0:否 1:是)")
|
||||||
|
private Integer isI;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电压不平衡度超标情况(0:否 1:是)")
|
||||||
|
private Integer isUnbalance;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负序电流超标情况(0:否 1:是)")
|
||||||
|
private Integer isINeg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电压超标次数")
|
||||||
|
private Integer vTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "谐波电流超标次数")
|
||||||
|
private Integer iTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "总有功功率99值")
|
||||||
|
private Float totalActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "总有功功率95值")
|
||||||
|
private Float totalActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "总有功功率平均值")
|
||||||
|
private Float totalActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "A相有功功率95值")
|
||||||
|
private Float apActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "A相有功功率99值")
|
||||||
|
private Float apActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "A相有功功率平均值")
|
||||||
|
private Float apActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "B相有功功率95值")
|
||||||
|
private Float bpActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "B相有功功率99值")
|
||||||
|
private Float bpActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "B相有功功率平均值")
|
||||||
|
private Float bpActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率95值")
|
||||||
|
private Float cpActivePower95;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率99值")
|
||||||
|
private Float cpActivePower99;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相有功功率平均值")
|
||||||
|
private Float cpActivePowerAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "A相基波电压")
|
||||||
|
private Float apFundamentalVoltage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "B相基波电压")
|
||||||
|
private Float bpFundamentalVoltage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "C相基波电压")
|
||||||
|
private Float cpFundamentalVoltage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负序电压不平衡度")
|
||||||
|
private Float negativeSequenceVoltageUnbalance;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电网暂降次数")
|
||||||
|
private Integer gridDipNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "脱网事件次数")
|
||||||
|
private Integer offlineNum;
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.njcn.harmonic.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author rui.wu
|
||||||
|
* @since 2022-10-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RStatHarmonicVO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "单位id")
|
||||||
|
private String orgNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "稳态指标")
|
||||||
|
private String harmonicType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "日均超标监测点数")
|
||||||
|
private Integer overLimitMeasurementAverage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累计超标监测点数")
|
||||||
|
private Integer overLimitMeasurementAccrued;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累计超标天数")
|
||||||
|
private Integer overDay;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "日均超标监测点数占比")
|
||||||
|
private Float overLimitMeasurementRatioAverage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累计超标监测点数占比")
|
||||||
|
private Float overLimitMeasurementRatioAccrued;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "平均超标天数")
|
||||||
|
private Float averageOverDay;
|
||||||
|
}
|
||||||
@@ -27,4 +27,6 @@ public class ReportTemplateVO extends BaseEntity {
|
|||||||
|
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
|
private String reportForm;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.njcn.harmonic.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.njcn.harmonic.pojo.vo.DeptLevelVO;
|
||||||
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <功能描述>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @createTime: 2022-12-14
|
||||||
|
*/
|
||||||
|
public class DeptUtil {
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 获取层级部门信息(展示下级部门)
|
||||||
|
* @param deptDTOList
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<DeptDTO> getDeptSubsetVOList(List<DeptDTO> deptDTOList, String deptId){
|
||||||
|
//获取子部门
|
||||||
|
List<DeptDTO> directDeptInfos = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getPid().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isEmpty(directDeptInfos)) {
|
||||||
|
//没有直接子部门,获取当前部门所有信息
|
||||||
|
List<DeptDTO> dept = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getId().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return dept;
|
||||||
|
}
|
||||||
|
return directDeptInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 获取层级部门信息(展示下级部门,但是数据是包含下部门的所有部门)
|
||||||
|
* @param deptDTOList
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<DeptLevelVO> getDeptLevelVOList(List<DeptDTO> deptDTOList, String deptId){
|
||||||
|
//获取子部门
|
||||||
|
List<DeptDTO> directDeptInfos = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getPid().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<DeptLevelVO> deptLevelVOS = new ArrayList<>();
|
||||||
|
if (CollectionUtil.isEmpty(directDeptInfos)) {
|
||||||
|
//没有直接子部门,获取当前部门所有信息
|
||||||
|
List<DeptDTO> dept = deptDTOList.stream()
|
||||||
|
.filter(deptDTO -> deptDTO.getId().equals(deptId))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
deptLevelVOS = BeanUtil.copyToList(dept, DeptLevelVO.class);
|
||||||
|
}else{
|
||||||
|
DeptLevelVO deptLevelVO;
|
||||||
|
for (DeptDTO deptDTO : directDeptInfos) {
|
||||||
|
//添加当前部门,添加当前部门下的子部门
|
||||||
|
deptLevelVO = BeanUtil.copyProperties(deptDTO, DeptLevelVO.class);
|
||||||
|
deptLevelVOS.add(deptLevelVO);
|
||||||
|
|
||||||
|
//筛选上级部门pids包含该id的所有部门
|
||||||
|
List<DeptDTO> descendantDeptDTO = deptDTOList.stream()
|
||||||
|
.filter(d -> d.getPids().contains(deptDTO.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
//获取当前部门
|
||||||
|
List<DeptDTO> dept = deptDTOList.stream()
|
||||||
|
.filter(dto -> dto.getId().equals(deptDTO.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
descendantDeptDTO.addAll(dept);
|
||||||
|
List<DeptLevelVO> seedList = BeanUtil.copyToList(descendantDeptDTO, DeptLevelVO.class);
|
||||||
|
deptLevelVO.setDeptList(seedList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return deptLevelVOS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -55,7 +55,7 @@ public class PwRStatHarmonicOrgController extends BaseController {
|
|||||||
switch (string) {
|
switch (string) {
|
||||||
//查询各单位累计超标监测点数-年数据
|
//查询各单位累计超标监测点数-年数据
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
org = rStatHarmonicOrgYService.getPwRStatHarmonicYAll(param);
|
org = rStatHarmonicOrgYService.getPwRStatHarmonicYOldAll(param,2);
|
||||||
break;
|
break;
|
||||||
//查询各单位累计超标监测点数-季数据
|
//查询各单位累计超标监测点数-季数据
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
@@ -86,7 +86,7 @@ public class PwRStatHarmonicOrgController extends BaseController {
|
|||||||
switch (string) {
|
switch (string) {
|
||||||
//查询各单位累计超标监测点数统计图-年数据
|
//查询各单位累计超标监测点数统计图-年数据
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
icon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYIcon(param);
|
icon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYOldIcon(param,2);
|
||||||
break;
|
break;
|
||||||
//查询各单位累计超标监测点数-季数据
|
//查询各单位累计超标监测点数-季数据
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class RStatHarmonicOrgController extends BaseController {
|
|||||||
switch (string) {
|
switch (string) {
|
||||||
//查询各单位累计超标监测点数-年数据
|
//查询各单位累计超标监测点数-年数据
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
rStatHarmonicOrgMAll = rStatHarmonicOrgYService.getRStatHarmonicYAll(param);
|
rStatHarmonicOrgMAll = rStatHarmonicOrgYService.getPwRStatHarmonicYOldAll(param,1);
|
||||||
break;
|
break;
|
||||||
//查询各单位累计超标监测点数-季数据
|
//查询各单位累计超标监测点数-季数据
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
@@ -86,7 +86,7 @@ public class RStatHarmonicOrgController extends BaseController {
|
|||||||
switch (string) {
|
switch (string) {
|
||||||
//查询各单位累计超标监测点数统计图-年数据
|
//查询各单位累计超标监测点数统计图-年数据
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
getAllRStatHarmonicOrgIcon = rStatHarmonicOrgYService.getRStatHarmonicOrgYIcon(param);
|
getAllRStatHarmonicOrgIcon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYOldIcon(param,1);
|
||||||
break;
|
break;
|
||||||
//查询各单位累计超标监测点数-季数据
|
//查询各单位累计超标监测点数-季数据
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
|||||||
@@ -1,13 +1,27 @@
|
|||||||
package com.njcn.harmonic.controller.specialanalysis;
|
package com.njcn.harmonic.controller.specialanalysis;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RMpRailwayTractionDetailVO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RMpWpPowerDetailVO;
|
||||||
|
import com.njcn.harmonic.service.specialanalysis.RMpWpPowerDetailMService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 专项分析-风电站-详细数据
|
* 专项分析-风电站-详细数据
|
||||||
@@ -22,5 +36,36 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/windFarm")
|
@RequestMapping("/windFarm")
|
||||||
public class WindFarmController extends BaseController {
|
public class WindFarmController extends BaseController {
|
||||||
|
|
||||||
|
private final RMpWpPowerDetailMService rMpWpPowerDetailMService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细数据表分页查询
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/getWindFarmDetailInfo")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("详细数据表分页查询")
|
||||||
|
@ApiImplicitParam(name = "param", value = "分页查询参数", required = true)
|
||||||
|
public HttpResult<Page<RMpWpPowerDetailVO>> getWindFarmDetailInfo(@RequestBody PowerQualityParam.PowerQualityInfoParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getWindFarmDetailInfo");
|
||||||
|
Page<RMpWpPowerDetailVO> powerQualityInfo = rMpWpPowerDetailMService.getWindFarmDetailInfo(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, powerQualityInfo, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细数据表分页查询
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/getRailwayDetailInfo")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("电气化铁路详细数据表分页查询")
|
||||||
|
@ApiImplicitParam(name = "param", value = "分页查询参数", required = true)
|
||||||
|
public HttpResult<Page<RMpRailwayTractionDetailVO>> getRailwayDetailInfo(@RequestBody PowerQualityParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getRailwayDetailInfo");
|
||||||
|
Page<RMpRailwayTractionDetailVO> powerQualityInfo = rMpWpPowerDetailMService.getRailwayDetailInfo(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, powerQualityInfo, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.njcn.harmonic.mapper;
|
package com.njcn.harmonic.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgM;
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgM;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatHarmonicVO;
|
||||||
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -21,4 +23,14 @@ public interface StatHarmonicOrgMMapper extends BaseMapper<RStatHarmonicOrgM> {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<StatHarmonicOrgVO> listMonthRatio(@Param("list") List<DeptDTO> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<StatHarmonicOrgVO> listMonthRatio(@Param("list") List<DeptDTO> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*各单位监测点数
|
||||||
|
* @param param
|
||||||
|
* @param dataType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatHarmonicVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("dataType") String dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.njcn.harmonic.mapper;
|
package com.njcn.harmonic.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgQ;
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgQ;
|
||||||
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgY;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatHarmonicVO;
|
||||||
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -21,4 +24,14 @@ public interface StatHarmonicOrgQMapper extends BaseMapper<RStatHarmonicOrgQ> {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<StatHarmonicOrgVO> listQuarterRatio(@Param("list") List<DeptDTO> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<StatHarmonicOrgVO> listQuarterRatio(@Param("list") List<DeptDTO> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*各单位监测点数
|
||||||
|
* @param param
|
||||||
|
* @param dataType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatHarmonicVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("dataType") String dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.njcn.harmonic.mapper;
|
package com.njcn.harmonic.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgY;
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgY;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RStatHarmonicVO;
|
||||||
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -21,4 +23,15 @@ public interface StatHarmonicOrgYMapper extends BaseMapper<RStatHarmonicOrgY> {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<StatHarmonicOrgVO> listYearRatio(@Param("list") List<DeptDTO> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<StatHarmonicOrgVO> listYearRatio(@Param("list") List<DeptDTO> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各单位监测点查询
|
||||||
|
* @param param
|
||||||
|
* @param ids
|
||||||
|
* @param dataType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatHarmonicVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("dataType") String dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
DISTINCT
|
DISTINCT
|
||||||
a.id,
|
a.id,
|
||||||
a.NAME,
|
a.NAME,
|
||||||
b.activation
|
b.activation,
|
||||||
|
a.report_form
|
||||||
FROM
|
FROM
|
||||||
sys_excel_rpt_temp a
|
sys_excel_rpt_temp a
|
||||||
LEFT JOIN sys_dept_temp b ON a.Id = b.temp_id
|
LEFT JOIN sys_dept_temp b ON a.Id = b.temp_id
|
||||||
|
|||||||
@@ -18,5 +18,39 @@
|
|||||||
and DATE_FORMAT(data_date,'%Y-%m-%d') between #{startTime} and #{endTime}
|
and DATE_FORMAT(data_date,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectInfoList" resultType="com.njcn.harmonic.pojo.vo.RStatHarmonicVO">
|
||||||
|
SELECT
|
||||||
|
harmonic_type,
|
||||||
|
sum( over_limit_measurement_average )/ count(*) AS overLimitMeasurementAverage,
|
||||||
|
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
||||||
|
sum( over_Day )/ sum( over_limit_measurement_accrued )/ count(*) AS averageOverDay,
|
||||||
|
sum( over_limit_measurement_ratio_average )/ count(*) AS overLimitMeasurementRatioAverage,
|
||||||
|
sum( over_limit_measurement_ratio_accrued ) AS overLimitMeasurementRatioAccrued
|
||||||
|
FROM
|
||||||
|
r_stat_harmonic_org_m
|
||||||
|
<where>
|
||||||
|
and data_Type=#{dataType}
|
||||||
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND org_no IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND harmonic_type IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||||
|
AND data_date >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||||
|
AND data_date <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
harmonic_type
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -18,5 +18,39 @@
|
|||||||
and DATE_FORMAT(data_date,'%Y-%m-%d') between #{startTime} and #{endTime}
|
and DATE_FORMAT(data_date,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectInfoList" resultType="com.njcn.harmonic.pojo.vo.RStatHarmonicVO">
|
||||||
|
SELECT
|
||||||
|
harmonic_type,
|
||||||
|
sum(over_limit_measurement_average)/count(*) as overLimitMeasurementAverage ,
|
||||||
|
sum(over_limit_measurement_accrued) as overLimitMeasurementAccrued,
|
||||||
|
sum(average_over_day)/count(*) as averageOverDay,
|
||||||
|
sum(over_limit_measurement_ratio_average)/count(*) as overLimitMeasurementRatioAverage,
|
||||||
|
sum(over_limit_measurement_ratio_accrued) as overLimitMeasurementRatioAccrued
|
||||||
|
FROM
|
||||||
|
r_stat_harmonic_org_q
|
||||||
|
<where>
|
||||||
|
and data_Type=#{dataType}
|
||||||
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND org_no IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND harmonic_type IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||||
|
AND data_date >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||||
|
AND data_date <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
harmonic_type
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -18,4 +18,39 @@
|
|||||||
and DATE_FORMAT(data_date,'%Y-%m-%d') between #{startTime} and #{endTime}
|
and DATE_FORMAT(data_date,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectInfoList" resultType="com.njcn.harmonic.pojo.vo.RStatHarmonicVO">
|
||||||
|
SELECT
|
||||||
|
harmonic_type,
|
||||||
|
sum(over_limit_measurement_average)/count(*) as overLimitMeasurementAverage ,
|
||||||
|
sum(over_limit_measurement_accrued) as overLimitMeasurementAccrued,
|
||||||
|
sum(average_over_day)/count(*) as averageOverDay,
|
||||||
|
sum(over_limit_measurement_ratio_average)/count(*) as overLimitMeasurementRatioAverage,
|
||||||
|
sum(over_limit_measurement_ratio_accrued) as overLimitMeasurementRatioAccrued
|
||||||
|
FROM
|
||||||
|
r_stat_harmonic_org_y
|
||||||
|
<where>
|
||||||
|
and data_Type=#{dataType}
|
||||||
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
AND org_no IN
|
||||||
|
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND harmonic_type IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||||
|
AND data_date >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||||
|
AND data_date <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
harmonic_type
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.harmonic.mapper.specialanalysis;
|
||||||
|
|
||||||
|
import com.njcn.harmonic.pojo.po.RMpRailwayTractionDetail;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 电气化铁路_详细信息表(专项分析) Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2022-12-09
|
||||||
|
*/
|
||||||
|
public interface RMpRailwayTractionDetailMapper extends BaseMapper<RMpRailwayTractionDetail> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.harmonic.mapper.specialanalysis.RMpRailwayTractionDetailMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpRailwayTractionDetail">
|
||||||
|
<id column="traction_station_id" property="tractionStationId" />
|
||||||
|
<result column="data_date" property="dataDate" />
|
||||||
|
<result column="active_power_times" property="activePowerTimes" />
|
||||||
|
<result column="v_times" property="vTimes" />
|
||||||
|
<result column="i_times" property="iTimes" />
|
||||||
|
<result column="unbalance_times" property="unbalanceTimes" />
|
||||||
|
<result column="i_neg_times" property="iNegTimes" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpWpPowerDetailM">
|
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpWpPowerDetailM">
|
||||||
<id column="measurement_point_id" property="measurementPointId" />
|
<id column="measurement_point_id" property="measurementPointId" />
|
||||||
<result column="data_date" property="dataDate" />
|
<result column="data_date" property="dataDate" />
|
||||||
|
<result column="monitor_tag" property="monitorTag" />
|
||||||
<result column="load_rate_avg" property="loadRateAvg" />
|
<result column="load_rate_avg" property="loadRateAvg" />
|
||||||
<result column="load_rate_95" property="loadRate95" />
|
<result column="load_rate_95" property="loadRate95" />
|
||||||
<result column="load_rate_99" property="loadRate99" />
|
<result column="load_rate_99" property="loadRate99" />
|
||||||
@@ -24,6 +25,10 @@
|
|||||||
<result column="bp_active_power_95" property="bpActivePower95" />
|
<result column="bp_active_power_95" property="bpActivePower95" />
|
||||||
<result column="bp_active_power_99" property="bpActivePower99" />
|
<result column="bp_active_power_99" property="bpActivePower99" />
|
||||||
<result column="bp_active_power_avg" property="bpActivePowerAvg" />
|
<result column="bp_active_power_avg" property="bpActivePowerAvg" />
|
||||||
|
<result column="cp_active_power_95" property="cpActivePower95" />
|
||||||
|
<result column="cp_active_power_99" property="cpActivePower99" />
|
||||||
|
<result column="cp_active_power_avg" property="cpActivePowerAvg" />
|
||||||
|
|
||||||
<result column="ap_fundamental_voltage" property="apFundamentalVoltage" />
|
<result column="ap_fundamental_voltage" property="apFundamentalVoltage" />
|
||||||
<result column="bp_fundamental_voltage" property="bpFundamentalVoltage" />
|
<result column="bp_fundamental_voltage" property="bpFundamentalVoltage" />
|
||||||
<result column="cp_fundamental_voltage" property="cpFundamentalVoltage" />
|
<result column="cp_fundamental_voltage" property="cpFundamentalVoltage" />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpWpPowerDetailQ">
|
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpWpPowerDetailQ">
|
||||||
<id column="measurement_point_id" property="measurementPointId" />
|
<id column="measurement_point_id" property="measurementPointId" />
|
||||||
<result column="data_date" property="dataDate" />
|
<result column="data_date" property="dataDate" />
|
||||||
|
<result column="monitor_tag" property="monitorTag" />
|
||||||
<result column="load_rate_avg" property="loadRateAvg" />
|
<result column="load_rate_avg" property="loadRateAvg" />
|
||||||
<result column="load_rate_95" property="loadRate95" />
|
<result column="load_rate_95" property="loadRate95" />
|
||||||
<result column="load_rate_99" property="loadRate99" />
|
<result column="load_rate_99" property="loadRate99" />
|
||||||
@@ -24,6 +25,10 @@
|
|||||||
<result column="bp_active_power_95" property="bpActivePower95" />
|
<result column="bp_active_power_95" property="bpActivePower95" />
|
||||||
<result column="bp_active_power_99" property="bpActivePower99" />
|
<result column="bp_active_power_99" property="bpActivePower99" />
|
||||||
<result column="bp_active_power_avg" property="bpActivePowerAvg" />
|
<result column="bp_active_power_avg" property="bpActivePowerAvg" />
|
||||||
|
<result column="cp_active_power_95" property="cpActivePower95" />
|
||||||
|
<result column="cp_active_power_99" property="cpActivePower99" />
|
||||||
|
<result column="cp_active_power_avg" property="cpActivePowerAvg" />
|
||||||
|
|
||||||
<result column="ap_fundamental_voltage" property="apFundamentalVoltage" />
|
<result column="ap_fundamental_voltage" property="apFundamentalVoltage" />
|
||||||
<result column="bp_fundamental_voltage" property="bpFundamentalVoltage" />
|
<result column="bp_fundamental_voltage" property="bpFundamentalVoltage" />
|
||||||
<result column="cp_fundamental_voltage" property="cpFundamentalVoltage" />
|
<result column="cp_fundamental_voltage" property="cpFundamentalVoltage" />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpWpPowerDetailY">
|
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpWpPowerDetailY">
|
||||||
<id column="measurement_point_id" property="measurementPointId" />
|
<id column="measurement_point_id" property="measurementPointId" />
|
||||||
<result column="data_date" property="dataDate" />
|
<result column="data_date" property="dataDate" />
|
||||||
|
<result column="monitor_tag" property="monitorTag" />
|
||||||
<result column="load_rate_avg" property="loadRateAvg" />
|
<result column="load_rate_avg" property="loadRateAvg" />
|
||||||
<result column="load_rate_95" property="loadRate95" />
|
<result column="load_rate_95" property="loadRate95" />
|
||||||
<result column="load_rate_99" property="loadRate99" />
|
<result column="load_rate_99" property="loadRate99" />
|
||||||
@@ -24,6 +25,10 @@
|
|||||||
<result column="bp_active_power_95" property="bpActivePower95" />
|
<result column="bp_active_power_95" property="bpActivePower95" />
|
||||||
<result column="bp_active_power_99" property="bpActivePower99" />
|
<result column="bp_active_power_99" property="bpActivePower99" />
|
||||||
<result column="bp_active_power_avg" property="bpActivePowerAvg" />
|
<result column="bp_active_power_avg" property="bpActivePowerAvg" />
|
||||||
|
<result column="cp_active_power_95" property="cpActivePower95" />
|
||||||
|
<result column="cp_active_power_99" property="cpActivePower99" />
|
||||||
|
<result column="cp_active_power_avg" property="cpActivePowerAvg" />
|
||||||
|
|
||||||
<result column="ap_fundamental_voltage" property="apFundamentalVoltage" />
|
<result column="ap_fundamental_voltage" property="apFundamentalVoltage" />
|
||||||
<result column="bp_fundamental_voltage" property="bpFundamentalVoltage" />
|
<result column="bp_fundamental_voltage" property="bpFundamentalVoltage" />
|
||||||
<result column="cp_fundamental_voltage" property="cpFundamentalVoltage" />
|
<result column="cp_fundamental_voltage" property="cpFundamentalVoltage" />
|
||||||
|
|||||||
@@ -35,19 +35,39 @@ public interface RStatHarmonicOrgYService extends IService<RStatHarmonicOrgY> {
|
|||||||
*/
|
*/
|
||||||
List<RIconVO> getRStatHarmonicOrgYIcon(RStatHarmonicMParam param);
|
List<RIconVO> getRStatHarmonicOrgYIcon(RStatHarmonicMParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配网各单位累计超标监测点数统计图-年数据()
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RIconVO> getPwRStatHarmonicOrgYOldIcon(RStatHarmonicMParam param,Integer type);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配网查询各单位稳态指标(年)
|
* 配网查询各单位稳态指标(年)
|
||||||
*
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
List<RArrayVO> getPwRStatHarmonicYOldAll(StatisticsBizBaseParam param,Integer type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配网查询各单位稳态指标(年 )统计暂不使用
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RArrayVO> getPwRStatHarmonicYAll(StatisticsBizBaseParam param);
|
List<RArrayVO> getPwRStatHarmonicYAll(StatisticsBizBaseParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配网各单位累计超标监测点数统计图-年数据
|
* 配网各单位累计超标监测点数统计图-年数据(暂不使用,里面包含子孙部门统计)
|
||||||
*
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RIconVO> getPwRStatHarmonicOrgYIcon(RStatHarmonicMParam param);
|
List<RIconVO> getPwRStatHarmonicOrgYIcon(RStatHarmonicMParam param);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.njcn.harmonic.pojo.vo.RIconVO;
|
|||||||
import com.njcn.harmonic.pojo.vo.RStatHarmonicMVO;
|
import com.njcn.harmonic.pojo.vo.RStatHarmonicMVO;
|
||||||
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgMService;
|
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgMService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.harmonic.utils.DeptUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
@@ -225,7 +226,9 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
|||||||
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
@@ -295,7 +298,9 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
|||||||
@Override
|
@Override
|
||||||
public List<RIconVO> getPwRStatHarmonicOrgMIcon(RStatHarmonicMParam param) {
|
public List<RIconVO> getPwRStatHarmonicOrgMIcon(RStatHarmonicMParam param) {
|
||||||
//各单位类型
|
//各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -8,13 +8,17 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.param.RStatHarmonicMParam;
|
import com.njcn.harmonic.pojo.param.RStatHarmonicMParam;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgQ;
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgQ;
|
||||||
import com.njcn.harmonic.mapper.StatHarmonicOrgQMapper;
|
import com.njcn.harmonic.mapper.StatHarmonicOrgQMapper;
|
||||||
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgY;
|
||||||
|
import com.njcn.harmonic.pojo.vo.DeptLevelVO;
|
||||||
import com.njcn.harmonic.pojo.vo.RArrayVO;
|
import com.njcn.harmonic.pojo.vo.RArrayVO;
|
||||||
import com.njcn.harmonic.pojo.vo.RIconVO;
|
import com.njcn.harmonic.pojo.vo.RIconVO;
|
||||||
import com.njcn.harmonic.pojo.vo.RStatHarmonicMVO;
|
import com.njcn.harmonic.pojo.vo.RStatHarmonicMVO;
|
||||||
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgQService;
|
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgQService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.harmonic.utils.DeptUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
@@ -47,88 +51,76 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RArrayVO> getRStatHarmonicQAll(StatisticsBizBaseParam param) {
|
public List<RArrayVO> getRStatHarmonicQAll(StatisticsBizBaseParam param) {
|
||||||
|
//对象主节点 获取所有的稳态类型
|
||||||
|
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||||
|
Map<String, DictData> steadyMap = steadyData.stream()
|
||||||
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
|
|
||||||
//对象主节点 获取所有得指标类型
|
//获取配网信息
|
||||||
List<DictData> lineTypeData = dicDataFeignClient.getDicDataByTypeCode
|
|
||||||
(DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
|
||||||
Map<String, DictData> lineTypeMap = lineTypeData.stream()
|
|
||||||
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
|
||||||
//获取主网id信息
|
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
//初始化指标类型(横向)
|
||||||
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatHarmonicOrgQ> list = statHarmonicOrgQMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgQ>()
|
List<RStatHarmonicOrgQ> list = statHarmonicOrgQMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgQ>()
|
||||||
.eq(RStatHarmonicOrgQ::getDataType, mainnetData.getId())
|
.eq(RStatHarmonicOrgQ::getDataType, mainnetData.getId())
|
||||||
.in(RStatHarmonicOrgQ::getOrgNo, deptIds)
|
.in(RStatHarmonicOrgQ::getOrgNo, deptIds)
|
||||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatHarmonicOrgQ::getDataDate, param.getStartTime())
|
.ge(param.getStartTime() != null, RStatHarmonicOrgQ::getDataDate, param.getStartTime())
|
||||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatHarmonicOrgQ::getDataDate, param.getEndTime()));
|
.le(param.getEndTime() != null, RStatHarmonicOrgQ::getDataDate, param.getEndTime()));
|
||||||
|
//根据稳态指标分组
|
||||||
|
Map<String, List<RStatHarmonicOrgQ>> measurementMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicOrgQ::getHarmonicType));
|
||||||
|
//判断对象是否为空
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
//重新生成数据结构
|
||||||
|
measurementMap.forEach((key, value) -> {
|
||||||
|
List<RStatHarmonicMVO> eventVO = new ArrayList<>();
|
||||||
|
if (steadyMap.containsKey(key)) {
|
||||||
|
RArrayVO arrayVO = new RArrayVO();
|
||||||
|
DictData data = steadyMap.get(key);
|
||||||
|
arrayVO.setRowName(data.getName());
|
||||||
|
arrayVO.setSort(data.getSort());
|
||||||
|
for (RStatHarmonicOrgQ statHarmonic : value) {
|
||||||
|
if(deptMap.containsKey(statHarmonic.getOrgNo())){
|
||||||
|
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||||
|
DeptDTO deptDTO = deptMap.get(statHarmonic.getOrgNo());
|
||||||
|
r.setHarmonicName(deptDTO.getName());
|
||||||
|
r.setSort(deptDTO.getSort());
|
||||||
|
eventVO.add(r);
|
||||||
|
}
|
||||||
|
|
||||||
//初始化指标类型(横向)
|
|
||||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
|
||||||
List<RStatHarmonicMVO> rm = new ArrayList<>();
|
|
||||||
for (DeptDTO deptDTO : deptDTOList) {
|
|
||||||
RStatHarmonicMVO r = new RStatHarmonicMVO();
|
|
||||||
r.setHarmonicName(deptDTO.getName());
|
|
||||||
r.setSort(deptDTO.getSort());
|
|
||||||
r.setOverLimitMeasurementAverage(0);
|
|
||||||
r.setOverLimitMeasurementAccrued(0);
|
|
||||||
r.setAverageOverDay(0.0F);
|
|
||||||
r.setOverDay(0);
|
|
||||||
r.setOverLimitMeasurementRatioAverage(0.0F);
|
|
||||||
r.setOverLimitMeasurementRatioAccrued(0.0F);
|
|
||||||
rm.add(r);
|
|
||||||
}
|
|
||||||
for (DictData lineTypeDatum : lineTypeData) {
|
|
||||||
RArrayVO r = new RArrayVO();
|
|
||||||
r.setRowName(lineTypeDatum.getName());
|
|
||||||
r.setColumns(rm);
|
|
||||||
r.setSort(lineTypeDatum.getSort());
|
|
||||||
arrayVOList.add(r);
|
|
||||||
}
|
|
||||||
//根据检测点对象分组
|
|
||||||
Map<String, List<RStatHarmonicOrgQ>> MeasurementTypeClassMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicOrgQ::getHarmonicType));
|
|
||||||
//重新生成数据结构
|
|
||||||
MeasurementTypeClassMap.forEach((key, value) -> {
|
|
||||||
if (lineTypeMap.containsKey(key)) {
|
|
||||||
RArrayVO arrayVO = new RArrayVO();
|
|
||||||
DictData data = lineTypeMap.get(key);
|
|
||||||
arrayVO.setRowName(data.getName());
|
|
||||||
arrayVO.setSort(data.getSort());
|
|
||||||
List<RStatHarmonicMVO> b = new ArrayList<>();
|
|
||||||
b.addAll(rm);
|
|
||||||
for (RStatHarmonicOrgQ orgY : value) {
|
|
||||||
RStatHarmonicMVO r = BeanUtil.copyProperties(orgY, RStatHarmonicMVO.class);
|
|
||||||
DeptDTO data1 = deptMap.get(orgY.getOrgNo());
|
|
||||||
if (ObjectUtil.isNotNull(data1)) {
|
|
||||||
r.setHarmonicName(data1.getName());
|
|
||||||
r.setSort(data1.getSort());
|
|
||||||
r.setOverDay(0);
|
|
||||||
b.add(r);
|
|
||||||
}
|
}
|
||||||
|
//根据监测点类别获取差集
|
||||||
|
Map<String, List<RStatHarmonicOrgQ>> listMap = value.stream().collect(Collectors.groupingBy(RStatHarmonicOrgQ::getOrgNo));
|
||||||
|
List<DeptDTO> notDeptDTOS = deptDTOList.stream().filter(r -> !listMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
this.assignDict(notDeptDTOS, eventVO, arrayVO);
|
||||||
|
eventVO.sort(Comparator.comparing(statHarmonic -> statHarmonic.getSort()));
|
||||||
|
arrayVOList.add(arrayVO);
|
||||||
}
|
}
|
||||||
Map<String, RStatHarmonicMVO> linkedHashMap = new LinkedHashMap<>();
|
});
|
||||||
for (RStatHarmonicMVO harmonicMVO : b) {
|
}
|
||||||
linkedHashMap.put(harmonicMVO.getHarmonicName(), harmonicMVO);
|
//处理主节点不存在的集合
|
||||||
}
|
List<DictData> notMeasurementList = steadyData.stream().filter(r -> !measurementMap.containsKey(r.getId()))
|
||||||
List<RStatHarmonicMVO> aa = new ArrayList<>(linkedHashMap.values());
|
.collect(Collectors.toList());
|
||||||
aa.sort(Comparator.comparing(rStatHarmonicMVO -> rStatHarmonicMVO.getSort()));
|
for (DictData notData : notMeasurementList) {
|
||||||
arrayVO.setColumns(aa);
|
List<RStatHarmonicMVO> statharmonicVO = new ArrayList<>();
|
||||||
arrayVOList.add(arrayVO);
|
RArrayVO arrayVO = new RArrayVO();
|
||||||
}
|
arrayVO.setRowName(notData.getName());
|
||||||
|
arrayVO.setSort(notData.getSort());
|
||||||
});
|
this.assignDict(deptDTOList, statharmonicVO, arrayVO);
|
||||||
Map<String, RArrayVO> linkedHashMap = new LinkedHashMap<>();
|
statharmonicVO.sort(Comparator.comparing(statHarmonic -> statHarmonic.getSort()));
|
||||||
for (RArrayVO rStatHarmonicMVO : arrayVOList) {
|
arrayVOList.add(arrayVO);
|
||||||
linkedHashMap.put(rStatHarmonicMVO.getRowName(), rStatHarmonicMVO);
|
|
||||||
}
|
}
|
||||||
List<RArrayVO> aa = new ArrayList<>(linkedHashMap.values());
|
|
||||||
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
||||||
return aa;
|
return arrayVOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -218,7 +210,9 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
|||||||
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
@@ -284,7 +278,9 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
|||||||
@Override
|
@Override
|
||||||
public List<RIconVO> getPwRStatHarmonicOrgQIcon(RStatHarmonicMParam param) {
|
public List<RIconVO> getPwRStatHarmonicOrgQIcon(RStatHarmonicMParam param) {
|
||||||
//各单位类型
|
//各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -6,15 +6,18 @@ import cn.hutool.core.lang.Assert;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
|
import com.njcn.harmonic.mapper.StatHarmonicOrgMMapper;
|
||||||
|
import com.njcn.harmonic.mapper.StatHarmonicOrgQMapper;
|
||||||
import com.njcn.harmonic.pojo.param.RStatHarmonicMParam;
|
import com.njcn.harmonic.pojo.param.RStatHarmonicMParam;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgY;
|
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgY;
|
||||||
import com.njcn.harmonic.mapper.StatHarmonicOrgYMapper;
|
import com.njcn.harmonic.mapper.StatHarmonicOrgYMapper;
|
||||||
import com.njcn.harmonic.pojo.vo.RArrayVO;
|
import com.njcn.harmonic.pojo.vo.*;
|
||||||
import com.njcn.harmonic.pojo.vo.RIconVO;
|
|
||||||
import com.njcn.harmonic.pojo.vo.RStatHarmonicMVO;
|
|
||||||
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgYService;
|
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgYService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.harmonic.utils.DeptUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
@@ -44,66 +47,100 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
private final StatHarmonicOrgYMapper statHarmonicOrgYMapper;
|
private final StatHarmonicOrgYMapper statHarmonicOrgYMapper;
|
||||||
|
private final StatHarmonicOrgQMapper statHarmonicOrgQMapper;
|
||||||
|
private final StatHarmonicOrgMMapper statHarmonicOrgMMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RArrayVO> getRStatHarmonicYAll(StatisticsBizBaseParam param) {
|
public List<RArrayVO> getRStatHarmonicYAll(StatisticsBizBaseParam param) {
|
||||||
//子节点 获取所有得各单位类型
|
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
|
||||||
//获取部门id集合
|
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
|
||||||
|
|
||||||
//对象主节点 获取所有得指标类型
|
//对象主节点 获取所有得指标类型
|
||||||
List<DictData> lineTypeData = dicDataFeignClient.getDicDataByTypeCode
|
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode
|
||||||
(DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
(DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||||
Map<String, DictData> lineTypeMap = lineTypeData.stream()
|
List<String> steadyDataIds = steadyData.stream().map(DictData::getId).collect(Collectors.toList());
|
||||||
|
Map<String, DictData> lineTypeMap = steadyData.stream()
|
||||||
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
//子节点 获取所有得各单位类型
|
||||||
|
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
//获取子部门(按照code改变数据结构)
|
||||||
|
List<DeptLevelVO> deptLevelVOList = DeptUtil.getDeptLevelVOList(deptDTOList, param.getId());
|
||||||
|
Map<String, DeptLevelVO> deptMap = deptLevelVOList.stream().collect(Collectors.toMap(DeptLevelVO::getCode, Function.identity()));
|
||||||
|
|
||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//数据库查询
|
StatSubstationBizBaseParam baseParam;
|
||||||
List<RStatHarmonicOrgY> list = statHarmonicOrgYMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgY>()
|
|
||||||
.eq(RStatHarmonicOrgY::getDataType,mainnetData.getId())
|
|
||||||
.in(RStatHarmonicOrgY::getOrgNo,deptIds)
|
|
||||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatHarmonicOrgY::getDataDate, param.getStartTime())
|
|
||||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatHarmonicOrgY::getDataDate, param.getEndTime()));
|
|
||||||
|
|
||||||
//初始化指标类型(横向)
|
//初始化指标类型(横向)
|
||||||
List<RArrayVO> arrayVOList=new ArrayList<>();
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
List<RStatHarmonicMVO> rm=new ArrayList<>();
|
List<RStatHarmonicVO> newList=new ArrayList<>();
|
||||||
for (DeptDTO deptDTO : deptDTOList) {
|
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||||
RStatHarmonicMVO r = new RStatHarmonicMVO();
|
//数据库查询
|
||||||
r.setHarmonicName(deptDTO.getName());
|
baseParam=BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
r.setSort(deptDTO.getSort());
|
//没有子部门说明就是最底层部门
|
||||||
r.setOverLimitMeasurementAverage(0);
|
if(CollUtil.isNotEmpty(deptLevelVO.getDeptList())){
|
||||||
r.setOverLimitMeasurementAccrued(0);
|
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||||
r.setAverageOverDay(0.0F);
|
baseParam.setIds(deptCodeS);
|
||||||
r.setOverDay(0);
|
}else{
|
||||||
r.setOverLimitMeasurementRatioAverage(0.0F);
|
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||||
r.setOverLimitMeasurementRatioAccrued(0.0F);
|
}
|
||||||
rm.add(r);
|
//区分 年 季 月
|
||||||
|
String string = param.getType().toString();
|
||||||
|
List<RStatHarmonicVO> list = new ArrayList<>();
|
||||||
|
switch (string) {
|
||||||
|
//查询各单位累计超标监测点数-年数据
|
||||||
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
|
list = statHarmonicOrgYMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-季数据
|
||||||
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
list = statHarmonicOrgQMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-月数据
|
||||||
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
|
list = statHarmonicOrgMMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//获取数据库数据
|
||||||
|
Map<String, RStatHarmonicVO> orgMap = list.stream()
|
||||||
|
.collect(Collectors.toMap(RStatHarmonicVO::getHarmonicType, Function.identity()));
|
||||||
|
|
||||||
|
List<DictData> notMeasurementList = steadyData.stream().filter(r -> !orgMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
for (RStatHarmonicVO org : list) {
|
||||||
|
org.setOrgNo(deptLevelVO.getCode());
|
||||||
|
}
|
||||||
|
RStatHarmonicVO org;
|
||||||
|
for (DictData notData : notMeasurementList) {
|
||||||
|
org=new RStatHarmonicVO();
|
||||||
|
org.setOrgNo(deptLevelVO.getCode());
|
||||||
|
org.setHarmonicType(notData.getId());
|
||||||
|
org.setOverLimitMeasurementAverage(0);
|
||||||
|
org.setOverLimitMeasurementAccrued(0);
|
||||||
|
org.setAverageOverDay(0.0F);
|
||||||
|
org.setOverLimitMeasurementRatioAverage(0.0F);
|
||||||
|
org.setOverLimitMeasurementRatioAccrued(0.0F);
|
||||||
|
list.add(org);
|
||||||
|
}
|
||||||
|
newList.addAll(list);
|
||||||
}
|
}
|
||||||
for (DictData lineTypeDatum : lineTypeData) {
|
|
||||||
RArrayVO r = new RArrayVO();
|
Map<String, List<RStatHarmonicVO>> harmonicMap =
|
||||||
r.setRowName(lineTypeDatum.getName());
|
newList.stream().collect(Collectors.groupingBy(RStatHarmonicVO::getHarmonicType));
|
||||||
r.setColumns(rm);
|
|
||||||
r.setSort(lineTypeDatum.getSort());
|
|
||||||
arrayVOList.add(r);
|
|
||||||
}
|
|
||||||
//根据检测点对象分组
|
|
||||||
Map<String, List<RStatHarmonicOrgY>> MeasurementTypeClassMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicOrgY::getHarmonicType));
|
|
||||||
//重新生成数据结构
|
//重新生成数据结构
|
||||||
MeasurementTypeClassMap.forEach((key, value) -> {
|
harmonicMap.forEach((key, value) -> {
|
||||||
if(lineTypeMap.containsKey(key)){
|
if(lineTypeMap.containsKey(key)){
|
||||||
RArrayVO arrayVO=new RArrayVO();
|
RArrayVO arrayVO=new RArrayVO();
|
||||||
DictData data = lineTypeMap.get(key);
|
DictData data = lineTypeMap.get(key);
|
||||||
arrayVO.setRowName(data.getName());
|
arrayVO.setRowName(data.getName());
|
||||||
arrayVO.setSort(data.getSort());
|
arrayVO.setSort(data.getSort());
|
||||||
List<RStatHarmonicMVO> b=new ArrayList<>();
|
List<RStatHarmonicMVO> b=new ArrayList<>();
|
||||||
b.addAll(rm);
|
for (RStatHarmonicVO orgY : value) {
|
||||||
for (RStatHarmonicOrgY orgY : value) {
|
|
||||||
RStatHarmonicMVO r = BeanUtil.copyProperties(orgY, RStatHarmonicMVO.class);
|
RStatHarmonicMVO r = BeanUtil.copyProperties(orgY, RStatHarmonicMVO.class);
|
||||||
DeptDTO data1 = deptMap.get(orgY.getOrgNo());
|
DeptLevelVO data1 = deptMap.get(orgY.getOrgNo());
|
||||||
if (ObjectUtil.isNotNull(data1)){
|
if (ObjectUtil.isNotNull(data1)){
|
||||||
r.setHarmonicName(data1.getName());
|
r.setHarmonicName(data1.getName());
|
||||||
r.setSort(data1.getSort());
|
r.setSort(data1.getSort());
|
||||||
@@ -111,34 +148,28 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
b.add(r);
|
b.add(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Map<String,RStatHarmonicMVO> linkedHashMap=new LinkedHashMap<>();
|
b.sort(Comparator.comparing(rStatHarmonicMVO -> rStatHarmonicMVO.getSort()));
|
||||||
for (RStatHarmonicMVO harmonicMVO : b) {
|
arrayVO.setColumns(b);
|
||||||
linkedHashMap.put(harmonicMVO.getHarmonicName(),harmonicMVO);
|
|
||||||
}
|
|
||||||
List<RStatHarmonicMVO> aa=new ArrayList<>(linkedHashMap.values());
|
|
||||||
aa.sort(Comparator.comparing(rStatHarmonicMVO -> rStatHarmonicMVO.getSort()));
|
|
||||||
arrayVO.setColumns(aa);
|
|
||||||
arrayVOList.add(arrayVO);
|
arrayVOList.add(arrayVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
Map<String,RArrayVO> linkedHashMap=new LinkedHashMap<>();
|
|
||||||
for (RArrayVO rStatHarmonicMVO : arrayVOList) {
|
|
||||||
linkedHashMap.put(rStatHarmonicMVO.getRowName(),rStatHarmonicMVO);
|
|
||||||
}
|
|
||||||
List<RArrayVO> aa=new ArrayList<>(linkedHashMap.values());
|
|
||||||
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
||||||
return aa;
|
return arrayVOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RIconVO> getRStatHarmonicOrgYIcon(RStatHarmonicMParam param) {
|
public List<RIconVO> getRStatHarmonicOrgYIcon(RStatHarmonicMParam param) {
|
||||||
//各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
|
||||||
//获取部门id集合
|
//获取子部门(按照code改变数据结构)
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<DeptLevelVO> deptLevelVOList = DeptUtil.getDeptLevelVOList(deptDTOList, param.getId());
|
||||||
//指标对象类型属性
|
Map<String, DeptLevelVO> deptMap = deptLevelVOList.stream().collect(Collectors.toMap(DeptLevelVO::getCode, Function.identity()));
|
||||||
|
|
||||||
|
//获取主网id信息
|
||||||
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
DictData harmonicData;
|
DictData harmonicData;
|
||||||
//判断是是否传入检测点信息值(电压)
|
//判断是是否传入检测点信息值(电压)
|
||||||
if(StrUtil.isBlank(param.getStasisID())&&StrUtil.isBlank(param.getMonitorID())){
|
if(StrUtil.isBlank(param.getStasisID())&&StrUtil.isBlank(param.getMonitorID())){
|
||||||
@@ -152,66 +183,174 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
harmonicData= dicDataFeignClient.getDicDataById(
|
harmonicData= dicDataFeignClient.getDicDataById(
|
||||||
param.getStasisID()).getData();
|
param.getStasisID()).getData();
|
||||||
}
|
}
|
||||||
//反防止参数查询数据报错
|
|
||||||
Assert.isTrue(
|
|
||||||
CollUtil.isNotEmpty(deptDTOList)||ObjectUtil.isNotNull(harmonicData)
|
|
||||||
, "各单位或者指标类型为空,请检查入参是否准确");
|
|
||||||
|
|
||||||
//获取主网id信息
|
//初始化指标类型(横向)
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
StatSubstationBizBaseParam baseParam;
|
||||||
|
|
||||||
//初始化对象
|
|
||||||
List<RIconVO> arrayVOList=new ArrayList<>();
|
List<RIconVO> arrayVOList=new ArrayList<>();
|
||||||
List<RStatHarmonicOrgY> rStatHarmonicVoltageMS = statHarmonicOrgYMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgY>()
|
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||||
.eq(RStatHarmonicOrgY::getDataType,mainnetData.getId())
|
//数据库查询
|
||||||
.in(RStatHarmonicOrgY::getOrgNo,deptIds)
|
baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
.eq(RStatHarmonicOrgY::getHarmonicType, harmonicData.getId())
|
//没有子部门说明就是最底层部门
|
||||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatHarmonicOrgY::getDataDate, param.getStartTime())
|
if (CollUtil.isNotEmpty(deptLevelVO.getDeptList())) {
|
||||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatHarmonicOrgY::getDataDate, param.getEndTime())
|
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||||
);
|
baseParam.setIds(deptCodeS);
|
||||||
//将数据转换为map进行便利
|
} else {
|
||||||
Map<String, List<RStatHarmonicOrgY>> voltageMMap = rStatHarmonicVoltageMS.stream()
|
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||||
.collect(Collectors.groupingBy(RStatHarmonicOrgY::getOrgNo));
|
}
|
||||||
//对象
|
//区分 年 季 月
|
||||||
if (CollUtil.isNotEmpty(rStatHarmonicVoltageMS)){
|
String string = param.getType().toString();
|
||||||
voltageMMap.forEach((key, value) -> {
|
List<RStatHarmonicVO> list = new ArrayList<>();
|
||||||
if(deptMap.containsKey(key)){
|
switch (string) {
|
||||||
DeptDTO data = deptMap.get(key);
|
//查询各单位累计超标监测点数-年数据
|
||||||
for (RStatHarmonicOrgY orgY : value) {
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
RIconVO rIconVO = new RIconVO();
|
list = statHarmonicOrgYMapper.selectInfoList(baseParam, Arrays.asList(harmonicData.getId()), mainnetData.getId());
|
||||||
rIconVO.setRowName(data.getName());
|
break;
|
||||||
rIconVO.setSort(data.getSort());
|
//查询各单位累计超标监测点数-季数据
|
||||||
rIconVO.setOverLimitMeasurementAccrued(orgY.getOverLimitMeasurementAccrued());
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
rIconVO.setOverLimitMeasurementAverage(orgY.getOverLimitMeasurementAverage());
|
list = statHarmonicOrgQMapper.selectInfoList(baseParam, Arrays.asList(harmonicData.getId()), mainnetData.getId());
|
||||||
rIconVO.setOverLimitMeasurementRatioAccrued(orgY.getOverLimitMeasurementRatioAccrued());
|
break;
|
||||||
rIconVO.setOverLimitMeasurementRatioAverage(orgY.getOverLimitMeasurementRatioAverage());
|
//查询各单位累计超标监测点数-月数据
|
||||||
rIconVO.setAverageOverDay(orgY.getAverageOverDay());
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
arrayVOList.add(rIconVO);
|
list = statHarmonicOrgMMapper.selectInfoList(baseParam, Arrays.asList(harmonicData.getId()), mainnetData.getId());
|
||||||
}
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
RIconVO rIconVO = new RIconVO();
|
||||||
});
|
rIconVO.setRowName(deptLevelVO.getName());
|
||||||
}
|
rIconVO.setSort(deptLevelVO.getSort());
|
||||||
//处理主节点不存在的集合
|
if(CollUtil.isNotEmpty(list)){
|
||||||
List<DeptDTO> notMeasurementList = deptDTOList.stream().filter(r -> !voltageMMap.containsKey(r.getCode()))
|
rIconVO.setOverLimitMeasurementAccrued(list.get(0).getOverLimitMeasurementAccrued());
|
||||||
.collect(Collectors.toList());
|
rIconVO.setOverLimitMeasurementAverage(list.get(0).getOverLimitMeasurementAverage());
|
||||||
for (DeptDTO notData : notMeasurementList) {
|
rIconVO.setOverLimitMeasurementRatioAccrued(list.get(0).getOverLimitMeasurementRatioAccrued());
|
||||||
RIconVO iconVO = new RIconVO();
|
rIconVO.setOverLimitMeasurementRatioAverage(list.get(0).getOverLimitMeasurementRatioAverage());
|
||||||
iconVO.setRowName(notData.getName());
|
rIconVO.setAverageOverDay(list.get(0).getAverageOverDay());
|
||||||
iconVO.setSort(notData.getSort());
|
}else{
|
||||||
iconVO.setOverLimitMeasurementAverage(0);
|
rIconVO.setOverLimitMeasurementAverage(0);
|
||||||
iconVO.setOverLimitMeasurementAccrued(0);
|
rIconVO.setOverLimitMeasurementAccrued(0);
|
||||||
iconVO.setOverLimitMeasurementRatioAverage(0.0F);
|
rIconVO.setOverLimitMeasurementRatioAverage(0.0F);
|
||||||
iconVO.setOverLimitMeasurementRatioAccrued(0.0F);
|
rIconVO.setOverLimitMeasurementRatioAccrued(0.0F);
|
||||||
iconVO.setAverageOverDay(0.0F);
|
rIconVO.setAverageOverDay(0.0F);
|
||||||
arrayVOList.add(iconVO);
|
}
|
||||||
|
arrayVOList.add(rIconVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayVOList.sort(Comparator.comparing(rIconVO -> rIconVO.getSort()));
|
arrayVOList.sort(Comparator.comparing(rIconVO -> rIconVO.getSort()));
|
||||||
return arrayVOList;
|
return arrayVOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RArrayVO> getPwRStatHarmonicYAll(StatisticsBizBaseParam param) {
|
public List<RArrayVO> getPwRStatHarmonicYAll(StatisticsBizBaseParam param) {
|
||||||
|
//对象主节点 获取所有得指标类型
|
||||||
|
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode
|
||||||
|
(DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||||
|
List<String> steadyDataIds = steadyData.stream().map(DictData::getId).collect(Collectors.toList());
|
||||||
|
Map<String, DictData> lineTypeMap = steadyData.stream()
|
||||||
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
//子节点 获取所有得各单位类型
|
||||||
|
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
|
||||||
|
//获取子部门(按照code改变数据结构)
|
||||||
|
List<DeptLevelVO> deptLevelVOList = DeptUtil.getDeptLevelVOList(deptDTOList, param.getId());
|
||||||
|
Map<String, DeptLevelVO> deptMap = deptLevelVOList.stream().collect(Collectors.toMap(DeptLevelVO::getCode, Function.identity()));
|
||||||
|
|
||||||
|
//获取主网id信息
|
||||||
|
DictData distributionData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||||
|
|
||||||
|
StatSubstationBizBaseParam baseParam;
|
||||||
|
//初始化指标类型(横向)
|
||||||
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
|
List<RStatHarmonicVO> newList=new ArrayList<>();
|
||||||
|
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||||
|
//数据库查询
|
||||||
|
baseParam=BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
//没有子部门说明就是最底层部门
|
||||||
|
if(CollUtil.isNotEmpty(deptLevelVO.getDeptList())){
|
||||||
|
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||||
|
baseParam.setIds(deptCodeS);
|
||||||
|
}else{
|
||||||
|
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||||
|
}
|
||||||
|
//区分 年 季 月
|
||||||
|
String string = param.getType().toString();
|
||||||
|
List<RStatHarmonicVO> list = new ArrayList<>();
|
||||||
|
switch (string) {
|
||||||
|
//查询各单位累计超标监测点数-年数据
|
||||||
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
|
list = statHarmonicOrgYMapper.selectInfoList(baseParam,steadyDataIds,distributionData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-季数据
|
||||||
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
list = statHarmonicOrgQMapper.selectInfoList(baseParam,steadyDataIds,distributionData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-月数据
|
||||||
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
|
list = statHarmonicOrgMMapper.selectInfoList(baseParam,steadyDataIds,distributionData.getId());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, RStatHarmonicVO> orgMap = list.stream()
|
||||||
|
.collect(Collectors.toMap(RStatHarmonicVO::getHarmonicType, Function.identity()));
|
||||||
|
|
||||||
|
List<DictData> notMeasurementList = steadyData.stream().filter(r -> !orgMap.containsKey(r.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
for (RStatHarmonicVO org : list) {
|
||||||
|
org.setOrgNo(deptLevelVO.getCode());
|
||||||
|
}
|
||||||
|
RStatHarmonicVO org;
|
||||||
|
for (DictData notData : notMeasurementList) {
|
||||||
|
org=new RStatHarmonicVO();
|
||||||
|
org.setOrgNo(deptLevelVO.getCode());
|
||||||
|
org.setHarmonicType(notData.getId());
|
||||||
|
org.setOverLimitMeasurementAverage(0);
|
||||||
|
org.setOverLimitMeasurementAccrued(0);
|
||||||
|
org.setAverageOverDay(0.0F);
|
||||||
|
org.setOverLimitMeasurementRatioAverage(0.0F);
|
||||||
|
org.setOverLimitMeasurementRatioAccrued(0.0F);
|
||||||
|
list.add(org);
|
||||||
|
}
|
||||||
|
newList.addAll(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, List<RStatHarmonicVO>> harmonicMap =
|
||||||
|
newList.stream().collect(Collectors.groupingBy(RStatHarmonicVO::getHarmonicType));
|
||||||
|
|
||||||
|
//重新生成数据结构
|
||||||
|
harmonicMap.forEach((key, value) -> {
|
||||||
|
if(lineTypeMap.containsKey(key)){
|
||||||
|
RArrayVO arrayVO=new RArrayVO();
|
||||||
|
DictData data = lineTypeMap.get(key);
|
||||||
|
arrayVO.setRowName(data.getName());
|
||||||
|
arrayVO.setSort(data.getSort());
|
||||||
|
List<RStatHarmonicMVO> b=new ArrayList<>();
|
||||||
|
for (RStatHarmonicVO orgY : value) {
|
||||||
|
RStatHarmonicMVO r = BeanUtil.copyProperties(orgY, RStatHarmonicMVO.class);
|
||||||
|
DeptLevelVO data1 = deptMap.get(orgY.getOrgNo());
|
||||||
|
if (ObjectUtil.isNotNull(data1)){
|
||||||
|
r.setHarmonicName(data1.getName());
|
||||||
|
r.setSort(data1.getSort());
|
||||||
|
r.setOverDay(0);
|
||||||
|
b.add(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b.sort(Comparator.comparing(rStatHarmonicMVO -> rStatHarmonicMVO.getSort()));
|
||||||
|
arrayVO.setColumns(b);
|
||||||
|
arrayVOList.add(arrayVO);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
arrayVOList.sort(Comparator.comparing(rArrayVO -> rArrayVO.getSort()));
|
||||||
|
return arrayVOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RArrayVO> getPwRStatHarmonicYOldAll(StatisticsBizBaseParam param,Integer type) {
|
||||||
//对象主节点 获取所有的稳态类型
|
//对象主节点 获取所有的稳态类型
|
||||||
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode(
|
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||||
@@ -219,25 +358,34 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
.collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
//子节点 获取所有得各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
|
|
||||||
//获取配网信息
|
DictData dictData ;
|
||||||
DictData distributionData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
if(type==1){
|
||||||
|
//获取主网信息
|
||||||
|
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
}else{
|
||||||
|
//获取配网信息
|
||||||
|
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||||
|
}
|
||||||
|
|
||||||
//初始化指标类型(横向)
|
//初始化指标类型(横向)
|
||||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatHarmonicOrgY> list = statHarmonicOrgYMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgY>()
|
List<RStatHarmonicOrgY> list = statHarmonicOrgYMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgY>()
|
||||||
.eq(RStatHarmonicOrgY::getDataType, distributionData.getId())
|
.eq(RStatHarmonicOrgY::getDataType, dictData.getId())
|
||||||
.in(RStatHarmonicOrgY::getOrgNo,deptIds)
|
.in(RStatHarmonicOrgY::getOrgNo, deptIds)
|
||||||
.ge(param.getStartTime() != null, RStatHarmonicOrgY::getDataDate, param.getStartTime())
|
.ge(param.getStartTime() != null, RStatHarmonicOrgY::getDataDate, param.getStartTime())
|
||||||
.le(param.getEndTime() != null, RStatHarmonicOrgY::getDataDate, param.getEndTime()));
|
.le(param.getEndTime() != null, RStatHarmonicOrgY::getDataDate, param.getEndTime()));
|
||||||
//根据稳态指标分组
|
//根据稳态指标分组
|
||||||
Map<String, List<RStatHarmonicOrgY>> measurementMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicOrgY::getHarmonicType));
|
Map<String, List<RStatHarmonicOrgY>> measurementMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicOrgY::getHarmonicType));
|
||||||
//判断对象是否为空
|
//判断对象是否为空
|
||||||
if(CollUtil.isNotEmpty(list)){
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
//重新生成数据结构
|
//重新生成数据结构
|
||||||
measurementMap.forEach((key, value) -> {
|
measurementMap.forEach((key, value) -> {
|
||||||
List<RStatHarmonicMVO> eventVO = new ArrayList<>();
|
List<RStatHarmonicMVO> eventVO = new ArrayList<>();
|
||||||
@@ -254,6 +402,7 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
r.setSort(deptDTO.getSort());
|
r.setSort(deptDTO.getSort());
|
||||||
eventVO.add(r);
|
eventVO.add(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//根据监测点类别获取差集
|
//根据监测点类别获取差集
|
||||||
Map<String, List<RStatHarmonicOrgY>> listMap = value.stream().collect(Collectors.groupingBy(RStatHarmonicOrgY::getOrgNo));
|
Map<String, List<RStatHarmonicOrgY>> listMap = value.stream().collect(Collectors.groupingBy(RStatHarmonicOrgY::getOrgNo));
|
||||||
@@ -283,12 +432,15 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RIconVO> getPwRStatHarmonicOrgYIcon(RStatHarmonicMParam param) {
|
public List<RIconVO> getPwRStatHarmonicOrgYIcon(RStatHarmonicMParam param) {
|
||||||
//各单位类型
|
//子节点 获取所有得各单位类型
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
|
||||||
//获取部门id集合
|
//获取子部门(按照code改变数据结构)
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<DeptLevelVO> deptLevelVOList = DeptUtil.getDeptLevelVOList(deptDTOList, param.getId());
|
||||||
//指标对象类型属性
|
|
||||||
|
//获取主网id信息
|
||||||
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
DictData harmonicData;
|
DictData harmonicData;
|
||||||
//判断是是否传入检测点信息值(电压)
|
//判断是是否传入检测点信息值(电压)
|
||||||
if(StrUtil.isBlank(param.getStasisID())&&StrUtil.isBlank(param.getMonitorID())){
|
if(StrUtil.isBlank(param.getStasisID())&&StrUtil.isBlank(param.getMonitorID())){
|
||||||
@@ -302,19 +454,104 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
harmonicData= dicDataFeignClient.getDicDataById(
|
harmonicData= dicDataFeignClient.getDicDataById(
|
||||||
param.getStasisID()).getData();
|
param.getStasisID()).getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化指标类型(横向)
|
||||||
|
StatSubstationBizBaseParam baseParam;
|
||||||
|
List<RIconVO> arrayVOList=new ArrayList<>();
|
||||||
|
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||||
|
//数据库查询
|
||||||
|
baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
//没有子部门说明就是最底层部门
|
||||||
|
if (CollUtil.isNotEmpty(deptLevelVO.getDeptList())) {
|
||||||
|
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||||
|
baseParam.setIds(deptCodeS);
|
||||||
|
} else {
|
||||||
|
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||||
|
}
|
||||||
|
//区分 年 季 月
|
||||||
|
String string = param.getType().toString();
|
||||||
|
List<RStatHarmonicVO> list = new ArrayList<>();
|
||||||
|
switch (string) {
|
||||||
|
//查询各单位累计超标监测点数-年数据
|
||||||
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
|
list = statHarmonicOrgYMapper.selectInfoList(baseParam, Arrays.asList(harmonicData.getId()), mainnetData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-季数据
|
||||||
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
list = statHarmonicOrgQMapper.selectInfoList(baseParam, Arrays.asList(harmonicData.getId()), mainnetData.getId());
|
||||||
|
break;
|
||||||
|
//查询各单位累计超标监测点数-月数据
|
||||||
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
|
list = statHarmonicOrgMMapper.selectInfoList(baseParam, Arrays.asList(harmonicData.getId()), mainnetData.getId());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
RIconVO rIconVO = new RIconVO();
|
||||||
|
rIconVO.setRowName(deptLevelVO.getName());
|
||||||
|
rIconVO.setSort(deptLevelVO.getSort());
|
||||||
|
if(CollUtil.isNotEmpty(list)){
|
||||||
|
rIconVO.setOverLimitMeasurementAccrued(list.get(0).getOverLimitMeasurementAccrued());
|
||||||
|
rIconVO.setOverLimitMeasurementAverage(list.get(0).getOverLimitMeasurementAverage());
|
||||||
|
rIconVO.setOverLimitMeasurementRatioAccrued(list.get(0).getOverLimitMeasurementRatioAccrued());
|
||||||
|
rIconVO.setOverLimitMeasurementRatioAverage(list.get(0).getOverLimitMeasurementRatioAverage());
|
||||||
|
rIconVO.setAverageOverDay(list.get(0).getAverageOverDay());
|
||||||
|
}else{
|
||||||
|
rIconVO.setOverLimitMeasurementAverage(0);
|
||||||
|
rIconVO.setOverLimitMeasurementAccrued(0);
|
||||||
|
rIconVO.setOverLimitMeasurementRatioAverage(0.0F);
|
||||||
|
rIconVO.setOverLimitMeasurementRatioAccrued(0.0F);
|
||||||
|
rIconVO.setAverageOverDay(0.0F);
|
||||||
|
}
|
||||||
|
arrayVOList.add(rIconVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
arrayVOList.sort(Comparator.comparing(rIconVO -> rIconVO.getSort()));
|
||||||
|
return arrayVOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RIconVO> getPwRStatHarmonicOrgYOldIcon(RStatHarmonicMParam param,Integer type) {
|
||||||
|
//各单位类型
|
||||||
|
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||||
|
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||||
|
|
||||||
|
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||||
|
//获取部门id集合
|
||||||
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
|
//指标对象类型属性
|
||||||
|
DictData harmonicData;
|
||||||
|
//判断是是否传入检测点信息值(电压)
|
||||||
|
if (StrUtil.isBlank(param.getStasisID()) && StrUtil.isBlank(param.getMonitorID())) {
|
||||||
|
//指标对象类型
|
||||||
|
List<DictData> indicatorTypeDate = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||||
|
indicatorTypeDate.sort(Comparator.comparing(data -> data.getSort()));
|
||||||
|
harmonicData = indicatorTypeDate.get(0);
|
||||||
|
} else {
|
||||||
|
//获取指标对象(频率偏差)
|
||||||
|
harmonicData = dicDataFeignClient.getDicDataById(
|
||||||
|
param.getStasisID()).getData();
|
||||||
|
}
|
||||||
//反防止参数查询数据报错
|
//反防止参数查询数据报错
|
||||||
Assert.isTrue(
|
Assert.isTrue(
|
||||||
CollUtil.isNotEmpty(deptDTOList)||ObjectUtil.isNotNull(harmonicData)
|
CollUtil.isNotEmpty(deptDTOList) || ObjectUtil.isNotNull(harmonicData)
|
||||||
, "各单位或者指标类型为空,请检查入参是否准确");
|
, "各单位或者指标类型为空,请检查入参是否准确");
|
||||||
|
DictData dictData ;
|
||||||
//获取配网信息
|
if(type==1){
|
||||||
DictData distributionData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
//获取主网信息
|
||||||
|
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
}else{
|
||||||
|
//获取配网信息
|
||||||
|
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||||
|
}
|
||||||
|
|
||||||
//初始化对象
|
//初始化对象
|
||||||
List<RIconVO> arrayVOList=new ArrayList<>();
|
List<RIconVO> arrayVOList = new ArrayList<>();
|
||||||
List<RStatHarmonicOrgY> rStatHarmonicVoltageMS = statHarmonicOrgYMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgY>()
|
List<RStatHarmonicOrgY> rStatHarmonicVoltageMS = statHarmonicOrgYMapper.selectList(new LambdaQueryWrapper<RStatHarmonicOrgY>()
|
||||||
.eq(RStatHarmonicOrgY::getDataType,distributionData.getId())
|
.eq(RStatHarmonicOrgY::getDataType, dictData.getId())
|
||||||
.in(RStatHarmonicOrgY::getOrgNo,deptIds)
|
.in(RStatHarmonicOrgY::getOrgNo, deptIds)
|
||||||
.eq(RStatHarmonicOrgY::getHarmonicType, harmonicData.getId())
|
.eq(RStatHarmonicOrgY::getHarmonicType, harmonicData.getId())
|
||||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatHarmonicOrgY::getDataDate, param.getStartTime())
|
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatHarmonicOrgY::getDataDate, param.getStartTime())
|
||||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatHarmonicOrgY::getDataDate, param.getEndTime())
|
.le(StrUtil.isNotBlank(param.getEndTime()), RStatHarmonicOrgY::getDataDate, param.getEndTime())
|
||||||
@@ -323,19 +560,19 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
Map<String, List<RStatHarmonicOrgY>> voltageMMap = rStatHarmonicVoltageMS.stream()
|
Map<String, List<RStatHarmonicOrgY>> voltageMMap = rStatHarmonicVoltageMS.stream()
|
||||||
.collect(Collectors.groupingBy(RStatHarmonicOrgY::getOrgNo));
|
.collect(Collectors.groupingBy(RStatHarmonicOrgY::getOrgNo));
|
||||||
//对象
|
//对象
|
||||||
if (CollUtil.isNotEmpty(rStatHarmonicVoltageMS)){
|
if (CollUtil.isNotEmpty(rStatHarmonicVoltageMS)) {
|
||||||
voltageMMap.forEach((key, value) -> {
|
voltageMMap.forEach((key, value) -> {
|
||||||
if(deptMap.containsKey(key)){
|
if (deptMap.containsKey(key)) {
|
||||||
DeptDTO data = deptMap.get(key);
|
DeptDTO data = deptMap.get(key);
|
||||||
for (RStatHarmonicOrgY orgY : value) {
|
for (RStatHarmonicOrgY orgQ : value) {
|
||||||
RIconVO rIconVO = new RIconVO();
|
RIconVO rIconVO = new RIconVO();
|
||||||
rIconVO.setRowName(data.getName());
|
rIconVO.setRowName(data.getName());
|
||||||
rIconVO.setSort(data.getSort());
|
rIconVO.setSort(data.getSort());
|
||||||
rIconVO.setOverLimitMeasurementAccrued(orgY.getOverLimitMeasurementAccrued());
|
rIconVO.setOverLimitMeasurementAccrued(orgQ.getOverLimitMeasurementAccrued());
|
||||||
rIconVO.setOverLimitMeasurementAverage(orgY.getOverLimitMeasurementAverage());
|
rIconVO.setOverLimitMeasurementAverage(orgQ.getOverLimitMeasurementAverage());
|
||||||
rIconVO.setOverLimitMeasurementRatioAccrued(orgY.getOverLimitMeasurementRatioAccrued());
|
rIconVO.setOverLimitMeasurementRatioAccrued(orgQ.getOverLimitMeasurementRatioAccrued());
|
||||||
rIconVO.setOverLimitMeasurementRatioAverage(orgY.getOverLimitMeasurementRatioAverage());
|
rIconVO.setOverLimitMeasurementRatioAverage(orgQ.getOverLimitMeasurementRatioAverage());
|
||||||
rIconVO.setAverageOverDay(orgY.getAverageOverDay());
|
rIconVO.setAverageOverDay(orgQ.getAverageOverDay());
|
||||||
arrayVOList.add(rIconVO);
|
arrayVOList.add(rIconVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +600,7 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
/**
|
/**
|
||||||
* 便利赋值
|
* 便利赋值
|
||||||
*
|
*
|
||||||
* @param deptDTOList 部门信息集合
|
* @param deptDTOList 部门信息集合
|
||||||
* @param statharmonicVO 暂态监测点
|
* @param statharmonicVO 暂态监测点
|
||||||
* @param arrayVO 初始化对象
|
* @param arrayVO 初始化对象
|
||||||
*/
|
*/
|
||||||
@@ -382,5 +619,4 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
|||||||
}
|
}
|
||||||
arrayVO.setColumns(statharmonicVO);
|
arrayVO.setColumns(statharmonicVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.njcn.harmonic.service.specialanalysis;
|
package com.njcn.harmonic.service.specialanalysis;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||||
import com.njcn.harmonic.pojo.po.RMpWpPowerDetailM;
|
import com.njcn.harmonic.pojo.po.RMpWpPowerDetailM;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RMpRailwayTractionDetailVO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RMpWpPowerDetailVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +17,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface RMpWpPowerDetailMService extends IService<RMpWpPowerDetailM> {
|
public interface RMpWpPowerDetailMService extends IService<RMpWpPowerDetailM> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细数据表分页查询
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<RMpWpPowerDetailVO> getWindFarmDetailInfo(PowerQualityParam.PowerQualityInfoParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电气化铁路分页查询
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<RMpRailwayTractionDetailVO> getRailwayDetailInfo(PowerQualityParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.harmonic.service.specialanalysis.impl;
|
package com.njcn.harmonic.service.specialanalysis.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
@@ -133,7 +134,11 @@ public class RMpEmissionMServiceImpl extends ServiceImpl<RMpEmissionMMapper, RMp
|
|||||||
.eq(StringUtils.isNotBlank(monitorTag), RMpEmissionIM::getMonitorTag, monitorTag)
|
.eq(StringUtils.isNotBlank(monitorTag), RMpEmissionIM::getMonitorTag, monitorTag)
|
||||||
.ge(StringUtils.isNotBlank(startTime), RMpEmissionIM::getDataDate, startTime)
|
.ge(StringUtils.isNotBlank(startTime), RMpEmissionIM::getDataDate, startTime)
|
||||||
.le(StringUtils.isNotBlank(endTime), RMpEmissionIM::getDataDate, endTime);
|
.le(StringUtils.isNotBlank(endTime), RMpEmissionIM::getDataDate, endTime);
|
||||||
RMpEmissionIM emissionI = rMpEmissionIMService.list(emissionIWrapper).get(0);
|
List<RMpEmissionIM> rMpEmissionIMList = rMpEmissionIMService.list(emissionIWrapper);
|
||||||
|
RMpEmissionIM emissionI =new RMpEmissionIM();
|
||||||
|
if(CollectionUtil.isNotEmpty(rMpEmissionIMList)){
|
||||||
|
emissionI = rMpEmissionIMList.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
//查询风电场发射特性/各次谐波电流超标占比
|
//查询风电场发射特性/各次谐波电流超标占比
|
||||||
LambdaQueryWrapper<RMpEmissionIExcessRateM> emissionIExcessRateWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RMpEmissionIExcessRateM> emissionIExcessRateWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -142,7 +147,11 @@ public class RMpEmissionMServiceImpl extends ServiceImpl<RMpEmissionMMapper, RMp
|
|||||||
.eq(StringUtils.isNotBlank(monitorTag), RMpEmissionIExcessRateM::getMonitorTag, monitorTag)
|
.eq(StringUtils.isNotBlank(monitorTag), RMpEmissionIExcessRateM::getMonitorTag, monitorTag)
|
||||||
.ge(StringUtils.isNotBlank(startTime), RMpEmissionIExcessRateM::getDataDate, startTime)
|
.ge(StringUtils.isNotBlank(startTime), RMpEmissionIExcessRateM::getDataDate, startTime)
|
||||||
.le(StringUtils.isNotBlank(endTime), RMpEmissionIExcessRateM::getDataDate, endTime);
|
.le(StringUtils.isNotBlank(endTime), RMpEmissionIExcessRateM::getDataDate, endTime);
|
||||||
RMpEmissionIExcessRateM rate = rMpEmissionIExcessRateMService.list(emissionIExcessRateWrapper).get(0);
|
List<RMpEmissionIExcessRateM> rateMList = rMpEmissionIExcessRateMService.list(emissionIExcessRateWrapper);
|
||||||
|
RMpEmissionIExcessRateM rate =new RMpEmissionIExcessRateM();
|
||||||
|
if(CollectionUtil.isNotEmpty(rateMList)){
|
||||||
|
rate = rateMList.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
RMpEmissionChartVO rMpEmissionChartVO = new RMpEmissionChartVO();
|
RMpEmissionChartVO rMpEmissionChartVO = new RMpEmissionChartVO();
|
||||||
RMpEmissionIMVO rMpEmissionIMVO = new RMpEmissionIMVO();
|
RMpEmissionIMVO rMpEmissionIMVO = new RMpEmissionIMVO();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.harmonic.service.specialanalysis.impl;
|
package com.njcn.harmonic.service.specialanalysis.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
@@ -8,6 +9,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
|||||||
import com.njcn.device.pms.api.MonitorClient;
|
import com.njcn.device.pms.api.MonitorClient;
|
||||||
import com.njcn.harmonic.mapper.specialanalysis.RMpInfluenceMMapper;
|
import com.njcn.harmonic.mapper.specialanalysis.RMpInfluenceMMapper;
|
||||||
import com.njcn.harmonic.pojo.param.RMpInfluenceParam;
|
import com.njcn.harmonic.pojo.param.RMpInfluenceParam;
|
||||||
|
import com.njcn.harmonic.pojo.po.RMpEmissionIExcessRateM;
|
||||||
import com.njcn.harmonic.pojo.po.RMpInfluenceM;
|
import com.njcn.harmonic.pojo.po.RMpInfluenceM;
|
||||||
import com.njcn.harmonic.pojo.po.RMpInfluenceVExcessRateM;
|
import com.njcn.harmonic.pojo.po.RMpInfluenceVExcessRateM;
|
||||||
import com.njcn.harmonic.pojo.po.RMpInfluenceVM;
|
import com.njcn.harmonic.pojo.po.RMpInfluenceVM;
|
||||||
@@ -125,7 +127,11 @@ public class RMpInfluenceMServiceImpl extends ServiceImpl<RMpInfluenceMMapper, R
|
|||||||
.eq(StringUtils.isNotBlank(monitorTag), RMpInfluenceVM::getMonitorTag, monitorTag)
|
.eq(StringUtils.isNotBlank(monitorTag), RMpInfluenceVM::getMonitorTag, monitorTag)
|
||||||
.ge(StringUtils.isNotBlank(startTime), RMpInfluenceVM::getDataDate, startTime)
|
.ge(StringUtils.isNotBlank(startTime), RMpInfluenceVM::getDataDate, startTime)
|
||||||
.le(StringUtils.isNotBlank(endTime), RMpInfluenceVM::getDataDate, endTime);
|
.le(StringUtils.isNotBlank(endTime), RMpInfluenceVM::getDataDate, endTime);
|
||||||
RMpInfluenceVM emissionI = rMpInfluenceVMService.list(emissionIWrapper).get(0);
|
List<RMpInfluenceVM> list = rMpInfluenceVMService.list(emissionIWrapper);
|
||||||
|
RMpInfluenceVM emissionI =new RMpInfluenceVM();
|
||||||
|
if(CollectionUtil.isNotEmpty(list)){
|
||||||
|
emissionI = list.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
//查询风电场发射特性/各次谐波电压超标占比
|
//查询风电场发射特性/各次谐波电压超标占比
|
||||||
LambdaQueryWrapper<RMpInfluenceVExcessRateM> emissionIExcessRateWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RMpInfluenceVExcessRateM> emissionIExcessRateWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -134,7 +140,12 @@ public class RMpInfluenceMServiceImpl extends ServiceImpl<RMpInfluenceMMapper, R
|
|||||||
.eq(StringUtils.isNotBlank(monitorTag), RMpInfluenceVExcessRateM::getMonitorTag, monitorTag)
|
.eq(StringUtils.isNotBlank(monitorTag), RMpInfluenceVExcessRateM::getMonitorTag, monitorTag)
|
||||||
.ge(StringUtils.isNotBlank(startTime), RMpInfluenceVExcessRateM::getDataDate, startTime)
|
.ge(StringUtils.isNotBlank(startTime), RMpInfluenceVExcessRateM::getDataDate, startTime)
|
||||||
.le(StringUtils.isNotBlank(endTime), RMpInfluenceVExcessRateM::getDataDate, endTime);
|
.le(StringUtils.isNotBlank(endTime), RMpInfluenceVExcessRateM::getDataDate, endTime);
|
||||||
RMpInfluenceVExcessRateM rate = rMpInfluenceVExcessRateMService.list(emissionIExcessRateWrapper).get(0);
|
|
||||||
|
List<RMpInfluenceVExcessRateM> rateMS = rMpInfluenceVExcessRateMService.list(emissionIExcessRateWrapper);
|
||||||
|
RMpInfluenceVExcessRateM rate=new RMpInfluenceVExcessRateM();
|
||||||
|
if(CollectionUtil.isNotEmpty(list)){
|
||||||
|
rate=rateMS.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
RMpInfluenceChartVO rMpInfluenceChartVO = new RMpInfluenceChartVO();
|
RMpInfluenceChartVO rMpInfluenceChartVO = new RMpInfluenceChartVO();
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,37 @@
|
|||||||
package com.njcn.harmonic.service.specialanalysis.impl;
|
package com.njcn.harmonic.service.specialanalysis.impl;
|
||||||
|
|
||||||
import com.njcn.harmonic.pojo.po.RMpWpPowerDetailM;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
|
import com.njcn.device.pms.api.MonitorClient;
|
||||||
|
import com.njcn.device.pms.api.TractionStationClient;
|
||||||
|
import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
||||||
|
import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsTractionStationParam;
|
||||||
|
import com.njcn.harmonic.mapper.specialanalysis.RMpRailwayTractionDetailMapper;
|
||||||
|
import com.njcn.harmonic.mapper.specialanalysis.RMpWpPowerDetailQMapper;
|
||||||
|
import com.njcn.harmonic.mapper.specialanalysis.RMpWpPowerDetailYMapper;
|
||||||
|
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||||
|
import com.njcn.harmonic.pojo.po.*;
|
||||||
import com.njcn.harmonic.mapper.specialanalysis.RMpWpPowerDetailMMapper;
|
import com.njcn.harmonic.mapper.specialanalysis.RMpWpPowerDetailMMapper;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RMpRailwayTractionDetailVO;
|
||||||
|
import com.njcn.harmonic.pojo.vo.RMpWpPowerDetailVO;
|
||||||
import com.njcn.harmonic.service.specialanalysis.RMpWpPowerDetailMService;
|
import com.njcn.harmonic.service.specialanalysis.RMpWpPowerDetailMService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 风电站_台区电能质量明细_月表 服务实现类
|
* 风电站_台区电能质量明细_月表 服务实现类
|
||||||
@@ -15,6 +41,131 @@ import org.springframework.stereotype.Service;
|
|||||||
* @since 2022-11-30
|
* @since 2022-11-30
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class RMpWpPowerDetailMServiceImpl extends ServiceImpl<RMpWpPowerDetailMMapper, RMpWpPowerDetailM> implements RMpWpPowerDetailMService {
|
public class RMpWpPowerDetailMServiceImpl extends ServiceImpl<RMpWpPowerDetailMMapper, RMpWpPowerDetailM> implements RMpWpPowerDetailMService {
|
||||||
|
|
||||||
|
private final RMpWpPowerDetailQMapper rMpWpPowerDetailQMapper;
|
||||||
|
private final RMpWpPowerDetailYMapper rMpWpPowerDetailYMapper;
|
||||||
|
private final RMpRailwayTractionDetailMapper rMpRailwayTractionDetailMapper;
|
||||||
|
private final MonitorClient monitorClient;
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
private final TractionStationClient tractionStationClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<RMpWpPowerDetailVO> getWindFarmDetailInfo(PowerQualityParam.PowerQualityInfoParam param) {
|
||||||
|
//获取部门id集合
|
||||||
|
List<Dept> deptDTOS = deptFeignClient.getDirectSonSelf(param.getId()).getData();
|
||||||
|
List<String> deptIds = deptDTOS.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//根据条件查询单位下面的所有配网监测点
|
||||||
|
PmsMonitorParam pmsMonitorParam = new PmsMonitorParam();
|
||||||
|
//单位id
|
||||||
|
pmsMonitorParam.setOrgIds(deptIds);
|
||||||
|
pmsMonitorParam.setMonitorTag(param.getMonitorTag());
|
||||||
|
pmsMonitorParam.setIsSpecialMonitor(1);
|
||||||
|
|
||||||
|
//获取监测点信息
|
||||||
|
List<PmsMonitorDTO> monitorDTOS = monitorClient.getMonitorInfoListByCond(pmsMonitorParam).getData();
|
||||||
|
if (CollUtil.isEmpty(monitorDTOS)) {
|
||||||
|
return new Page<>();
|
||||||
|
}
|
||||||
|
//监测点数据转换
|
||||||
|
Map<String, PmsMonitorDTO> monitorMap = monitorDTOS.stream()
|
||||||
|
.collect(Collectors.toMap(PmsMonitorDTO::getId, Function.identity()));
|
||||||
|
//获取监测点id
|
||||||
|
List<String> monitorIds = monitorDTOS
|
||||||
|
.stream().map(PmsMonitorDTO::getId).collect(Collectors.toList());
|
||||||
|
Page<RMpWpPowerDetailVO> page = new Page<>();
|
||||||
|
//数据库分页查询
|
||||||
|
switch (param.getType().toString()) {
|
||||||
|
//查询区域超标统计-年数据
|
||||||
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
|
Page<RMpWpPowerDetailY> pageY = rMpWpPowerDetailYMapper.selectPage(new Page<>(param.getPageNum(), param.getPageSize())
|
||||||
|
,new LambdaQueryWrapper<RMpWpPowerDetailY>()
|
||||||
|
.in(RMpWpPowerDetailY::getMeasurementPointId,monitorIds)
|
||||||
|
.eq(RMpWpPowerDetailY::getMonitorTag,param.getMonitorTag())
|
||||||
|
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpWpPowerDetailY::getDataDate, param.getStartTime())
|
||||||
|
.le(StrUtil.isNotBlank(param.getEndTime()), RMpWpPowerDetailY::getDataDate, param.getEndTime())
|
||||||
|
);
|
||||||
|
List<RMpWpPowerDetailVO> rMpWpPowerDetailVOS = BeanUtil.copyToList(pageY.getRecords(), RMpWpPowerDetailVO.class);
|
||||||
|
page=BeanUtil.copyProperties(pageY,Page.class);
|
||||||
|
page.setRecords(rMpWpPowerDetailVOS);
|
||||||
|
break;
|
||||||
|
//查询区域超标统计-季数据
|
||||||
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
|
Page<RMpWpPowerDetailQ> pageList = rMpWpPowerDetailQMapper.selectPage(new Page<>(param.getPageNum(), param.getPageSize())
|
||||||
|
,new LambdaQueryWrapper<RMpWpPowerDetailQ>()
|
||||||
|
.in(RMpWpPowerDetailQ::getMeasurementPointId,monitorIds)
|
||||||
|
.eq(RMpWpPowerDetailQ::getMonitorTag,param.getMonitorTag())
|
||||||
|
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpWpPowerDetailQ::getDataDate, param.getStartTime())
|
||||||
|
.le(StrUtil.isNotBlank(param.getEndTime()), RMpWpPowerDetailQ::getDataDate, param.getEndTime())
|
||||||
|
);
|
||||||
|
List<RMpWpPowerDetailVO> rMpWpPowerDetailVOS2 = BeanUtil.copyToList(pageList.getRecords(), RMpWpPowerDetailVO.class);
|
||||||
|
page=BeanUtil.copyProperties(pageList,Page.class);
|
||||||
|
page.setRecords(rMpWpPowerDetailVOS2);
|
||||||
|
break;
|
||||||
|
//查询各区域超标统计-月数据
|
||||||
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
|
Page<RMpWpPowerDetailM> page1= this.page(new Page<>(param.getPageNum(), param.getPageSize())
|
||||||
|
,new LambdaQueryWrapper<RMpWpPowerDetailM>()
|
||||||
|
.in(RMpWpPowerDetailM::getMeasurementPointId,monitorIds)
|
||||||
|
.eq(RMpWpPowerDetailM::getMonitorTag,param.getMonitorTag())
|
||||||
|
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpWpPowerDetailM::getDataDate, param.getStartTime())
|
||||||
|
.le(StrUtil.isNotBlank(param.getEndTime()), RMpWpPowerDetailM::getDataDate, param.getEndTime())
|
||||||
|
);
|
||||||
|
List<RMpWpPowerDetailVO> rMpWpPowerDetailVOS3 = BeanUtil.copyToList(page1.getRecords(), RMpWpPowerDetailVO.class);
|
||||||
|
page=BeanUtil.copyProperties(page1,Page.class);
|
||||||
|
page.setRecords(rMpWpPowerDetailVOS3);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
page.getRecords().stream().forEach(vo->{
|
||||||
|
if(monitorMap.containsKey(vo.getMeasurementPointId())){
|
||||||
|
PmsMonitorDTO monitorDTO = monitorMap.get(vo.getMeasurementPointId());
|
||||||
|
vo.setOrgName(monitorDTO.getOrgName());
|
||||||
|
vo.setMeasurementPointName(monitorDTO.getName());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<RMpRailwayTractionDetailVO> getRailwayDetailInfo(PowerQualityParam param) {
|
||||||
|
//获取部门id集合
|
||||||
|
List<Dept> deptDTOS = deptFeignClient.getDirectSonSelf(param.getId()).getData();
|
||||||
|
List<String> deptIds = deptDTOS.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//根据部门信息,获取牵引站信息
|
||||||
|
PmsTractionStationParam stationParam=new PmsTractionStationParam();
|
||||||
|
stationParam.setOrgIds(deptIds);
|
||||||
|
List<PmsTractionStationDTO> tractionStationDTOS = tractionStationClient.getPmsTractionStationInfo(stationParam).getData();
|
||||||
|
|
||||||
|
//获取牵引站id集合
|
||||||
|
List<String> ids = tractionStationDTOS.stream().map(PmsTractionStationDTO::getId).collect(Collectors.toList());
|
||||||
|
Map<String, PmsTractionStationDTO> dtoMap = tractionStationDTOS.stream()
|
||||||
|
.collect(Collectors.toMap(PmsTractionStationDTO::getId, Function.identity()));
|
||||||
|
|
||||||
|
Page<RMpRailwayTractionDetail> oldPage = rMpRailwayTractionDetailMapper.selectPage(new Page<>(param.getPageNum(), param.getPageSize()), new LambdaQueryWrapper<RMpRailwayTractionDetail>()
|
||||||
|
.in(RMpRailwayTractionDetail::getTractionStationId, ids)
|
||||||
|
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpRailwayTractionDetail::getDataDate, param.getStartTime())
|
||||||
|
.le(StrUtil.isNotBlank(param.getEndTime()), RMpRailwayTractionDetail::getDataDate, param.getEndTime())
|
||||||
|
);
|
||||||
|
|
||||||
|
List<RMpRailwayTractionDetailVO> newList = BeanUtil.copyToList(oldPage.getRecords(), RMpRailwayTractionDetailVO.class);
|
||||||
|
newList.stream().forEach(vo->{
|
||||||
|
if(dtoMap.containsKey(vo.getTractionStationId())){
|
||||||
|
PmsTractionStationDTO dto = dtoMap.get(vo.getTractionStationId());
|
||||||
|
vo.setOrgName(dto.getOrgName());
|
||||||
|
vo.setRailwayType(dto.getRailwayType());
|
||||||
|
vo.setTractionStationName(dto.getName());
|
||||||
|
vo.setRailwayLineName(dto.getRailwayLineName());
|
||||||
|
vo.setVoltageLevel(dto.getVoltageLevel());
|
||||||
|
vo.setRatedCapacity(dto.getRatedCapacity());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Page<RMpRailwayTractionDetailVO> page=BeanUtil.copyProperties(oldPage,Page.class);
|
||||||
|
page.setRecords(newList);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.njcn.system.enums.DicDataTypeEnum;
|
|||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.utils.WebUtil;
|
import com.njcn.web.utils.WebUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -55,13 +56,13 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
|||||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "台区电能质量事件类型为空");
|
throw new BusinessException(CommonResponseEnum.NO_DATA, "台区电能质量事件类型为空");
|
||||||
}
|
}
|
||||||
//获取部门id集合
|
//获取部门id集合
|
||||||
List<DeptDTO> deptDTOS = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<Dept> deptDTOS = deptFeignClient.getDirectSonSelf(param.getId()).getData();
|
||||||
if(CollectionUtil.isEmpty(deptDTOS)){
|
if(CollectionUtil.isEmpty(deptDTOS)){
|
||||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "获取部门信息为空");
|
throw new BusinessException(CommonResponseEnum.NO_DATA, "获取部门信息为空");
|
||||||
}
|
}
|
||||||
Map<String, DeptDTO> deptDTOMap = deptDTOS.stream().collect
|
Map<String, Dept> deptDTOMap = deptDTOS.stream().collect
|
||||||
(Collectors.toMap(DeptDTO::getCode, Function.identity(), (key, key2) -> key2));
|
(Collectors.toMap(Dept::getCode, Function.identity(), (key, key2) -> key2));
|
||||||
List<String> OrgNOS = deptDTOS.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> OrgNOS = deptDTOS.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
//根据字典Code,取出字典id,拼入sql中
|
//根据字典Code,取出字典id,拼入sql中
|
||||||
dictDataList.stream().forEach(dictData ->{
|
dictDataList.stream().forEach(dictData ->{
|
||||||
if(DicDataEnum.EVENT_TYPE_L.getCode().equals(dictData.getCode())){
|
if(DicDataEnum.EVENT_TYPE_L.getCode().equals(dictData.getCode())){
|
||||||
@@ -81,7 +82,7 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
|||||||
Page<RStatOrgPvPowerStreamVO> page = rStatOrgPvPowerQualityYPOMapper.selectListPage(new Page<>(param.getPageNum(), param.getPageSize()), bearParam);
|
Page<RStatOrgPvPowerStreamVO> page = rStatOrgPvPowerQualityYPOMapper.selectListPage(new Page<>(param.getPageNum(), param.getPageSize()), bearParam);
|
||||||
page.getRecords().stream().forEach(vo->{
|
page.getRecords().stream().forEach(vo->{
|
||||||
if(deptDTOMap.containsKey(vo.getOrgNo())){
|
if(deptDTOMap.containsKey(vo.getOrgNo())){
|
||||||
DeptDTO deptDTO = deptDTOMap.get(vo.getOrgNo());
|
Dept deptDTO = deptDTOMap.get(vo.getOrgNo());
|
||||||
vo.setOrgNo(deptDTO.getName());
|
vo.setOrgNo(deptDTO.getName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -98,7 +99,7 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
|||||||
pwPmsMonitorParam.setMonitorSort(param.getMonitorSort());
|
pwPmsMonitorParam.setMonitorSort(param.getMonitorSort());
|
||||||
//获取监测点信息
|
//获取监测点信息
|
||||||
PowerQualityParam.PowerQualityDetailParam bearParam= BeanUtil.copyProperties(param, PowerQualityParam.PowerQualityDetailParam.class);
|
PowerQualityParam.PowerQualityDetailParam bearParam= BeanUtil.copyProperties(param, PowerQualityParam.PowerQualityDetailParam.class);
|
||||||
List<PwPmsMonitorDTO> pwMonitorList = pwMonitorClient.getPwMonitorList(pwPmsMonitorParam).getData();
|
List<PwPmsMonitorDTO> pwMonitorList = pwMonitorClient.getPwPhotovoltaicMonitorList(pwPmsMonitorParam).getData();
|
||||||
if (CollUtil.isEmpty(pwMonitorList)) {
|
if (CollUtil.isEmpty(pwMonitorList)) {
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,22 @@
|
|||||||
<artifactId>prepare-api</artifactId>
|
<artifactId>prepare-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 多数据源切换,当数据源为oracle时需要使用 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--oracle驱动-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle.database.jdbc</groupId>
|
||||||
|
<artifactId>ojdbc8</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle.database.nls</groupId>
|
||||||
|
<artifactId>orai18n</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
Reference in New Issue
Block a user