处理依赖冲突问题
自定义报表问题处理
This commit is contained in:
86
pom.xml
86
pom.xml
@@ -40,7 +40,7 @@
|
|||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<!--中间件目标地址-->
|
<!--中间件目标地址-->
|
||||||
<!-- <middle.server.url>101.132.25.239</middle.server.url>-->
|
<!-- <middle.server.url>101.132.25.239</middle.server.url>-->
|
||||||
<middle.server.url>192.168.1.13</middle.server.url>
|
<middle.server.url>192.168.1.13</middle.server.url>
|
||||||
<!--微服务模块发布地址-->
|
<!--微服务模块发布地址-->
|
||||||
<service.server.url>127.0.0.1</service.server.url>
|
<service.server.url>127.0.0.1</service.server.url>
|
||||||
@@ -49,7 +49,8 @@
|
|||||||
<!--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>1dd11af6-e668-41fd-a663-02a05705304d</nacos.namespace>-->
|
||||||
<nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>
|
<nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>
|
||||||
<!--sentinel:port-->
|
<!--sentinel:port-->
|
||||||
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
||||||
@@ -63,14 +64,14 @@
|
|||||||
<docker.registry.name>njcn</docker.registry.name>
|
<docker.registry.name>njcn</docker.registry.name>
|
||||||
<!--切换阿里&华为的配置sdk-->
|
<!--切换阿里&华为的配置sdk-->
|
||||||
<micro.sdk>common-microservice</micro.sdk>
|
<micro.sdk>common-microservice</micro.sdk>
|
||||||
<!-- <micro.sdk>common-huawei</micro.sdk>-->
|
<!-- <micro.sdk>common-huawei</micro.sdk>-->
|
||||||
<docker.operate>site</docker.operate>
|
<docker.operate>site</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>
|
||||||
<!--三剑客版本-->
|
<!--三剑客版本-->
|
||||||
<springboot.version>2.3.12.RELEASE</springboot.version>
|
<springboot.version>2.3.12.RELEASE</springboot.version>
|
||||||
<!-- <springcloud.version>Hoxton.SR12</springcloud.version>-->
|
<!-- <springcloud.version>Hoxton.SR12</springcloud.version>-->
|
||||||
<springcloud.version>Hoxton.SR12</springcloud.version>
|
<springcloud.version>Hoxton.SR12</springcloud.version>
|
||||||
<springcloud.alibaba.version>2.2.7.RELEASE</springcloud.alibaba.version>
|
<springcloud.alibaba.version>2.2.7.RELEASE</springcloud.alibaba.version>
|
||||||
<hutool.version>5.7.9</hutool.version>
|
<hutool.version>5.7.9</hutool.version>
|
||||||
@@ -90,6 +91,7 @@
|
|||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<jjwt.version>0.9.1</jjwt.version>
|
<jjwt.version>0.9.1</jjwt.version>
|
||||||
<feignOkhttp.version>11.2</feignOkhttp.version>
|
<feignOkhttp.version>11.2</feignOkhttp.version>
|
||||||
|
<okhttp3.version>4.9.0</okhttp3.version>
|
||||||
<antisamy.version>1.6.4</antisamy.version>
|
<antisamy.version>1.6.4</antisamy.version>
|
||||||
<kaptcha.version>2.3.2</kaptcha.version>
|
<kaptcha.version>2.3.2</kaptcha.version>
|
||||||
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
|
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
|
||||||
@@ -105,9 +107,6 @@
|
|||||||
<xxl-job.version>2.3.0</xxl-job.version>
|
<xxl-job.version>2.3.0</xxl-job.version>
|
||||||
<mqtt.version>1.2.7</mqtt.version>
|
<mqtt.version>1.2.7</mqtt.version>
|
||||||
<easypoi.version>4.4.0</easypoi.version>
|
<easypoi.version>4.4.0</easypoi.version>
|
||||||
<progressbar.version>0.5.3</progressbar.version>
|
|
||||||
<okhttp.version>4.8.1</okhttp.version>
|
|
||||||
<minio.version>8.2.1</minio.version>
|
|
||||||
<spring-cloud-huawei.version>1.7.0-Hoxton</spring-cloud-huawei.version>
|
<spring-cloud-huawei.version>1.7.0-Hoxton</spring-cloud-huawei.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@@ -335,35 +334,62 @@
|
|||||||
<artifactId>easypoi-spring-boot-starter</artifactId>
|
<artifactId>easypoi-spring-boot-starter</artifactId>
|
||||||
<version>${easypoi.version}</version>
|
<version>${easypoi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--调用minio服务器-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>me.tongfei</groupId>
|
|
||||||
<artifactId>progressbar</artifactId>
|
|
||||||
<version>${progressbar.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>${okhttp.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.minio</groupId>
|
|
||||||
<artifactId>minio</artifactId>
|
|
||||||
<version>${minio.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<!-- 多数据源切换,当数据源为oracle时需要使用 -->
|
<!-- 多数据源切换,当数据源为oracle时需要使用 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
<version>${dynamic-datasource.version}</version>
|
<version>${dynamic-datasource.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>logging-interceptor</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>mockwebserver</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okcurl</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp-dnsoverhttps</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp-sse</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp-testing-support</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp-tls</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp-urlconnection</artifactId>
|
||||||
|
<version>${okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.influxdb</groupId>
|
||||||
|
<artifactId>influxdb-java</artifactId>
|
||||||
|
<version>2.22</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -107,6 +107,13 @@
|
|||||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<!-- <artifactId>spring-boot-starter-log4j2</artifactId>-->
|
<!-- <artifactId>spring-boot-starter-log4j2</artifactId>-->
|
||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>logging-interceptor</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@@ -69,11 +69,6 @@
|
|||||||
<groupId>com.nimbusds</groupId>
|
<groupId>com.nimbusds</groupId>
|
||||||
<artifactId>nimbus-jose-jwt</artifactId>
|
<artifactId>nimbus-jose-jwt</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.influxdb</groupId>
|
|
||||||
<artifactId>influxdb-java</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -59,13 +59,6 @@
|
|||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pqs-influx</artifactId>
|
<artifactId>pqs-influx</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<!--排除okhttp3的依赖-->
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<artifactId>pq-device-boot</artifactId>
|
<artifactId>pq-device-boot</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pms-device-boot</artifactId>
|
<artifactId>pms-device-boot</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
|||||||
@@ -44,24 +44,6 @@
|
|||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>common-oss</artifactId>
|
<artifactId>common-oss</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>4.8.1</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>logging-interceptor</artifactId>
|
|
||||||
<version>4.8.1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -52,13 +52,6 @@
|
|||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pqs-influx</artifactId>
|
<artifactId>pqs-influx</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<!--排除okhttp3的依赖-->
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
@@ -66,7 +59,6 @@
|
|||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
<groupId>com.github.jeffreyning</groupId>
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
<artifactId>mybatisplus-plus</artifactId>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.njcn.web.utils;
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -57,24 +57,6 @@
|
|||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>common-oss</artifactId>
|
<artifactId>common-oss</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>4.8.1</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>logging-interceptor</artifactId>
|
|
||||||
<version>4.8.1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import com.njcn.device.pq.pojo.param.PulicTimeStatisParam;
|
import com.njcn.device.pq.pojo.param.PulicTimeStatisParam;
|
||||||
import com.njcn.harmonic.mapper.RStatComassesDMapper;
|
import com.njcn.harmonic.mapper.RStatComassesDMapper;
|
||||||
import com.njcn.harmonic.pojo.po.PQSComAssesPO;
|
import com.njcn.harmonic.pojo.po.PQSComAssesPO;
|
||||||
|
import com.njcn.harmonic.pojo.po.PqsComasses;
|
||||||
import com.njcn.harmonic.pojo.vo.AssesVO;
|
import com.njcn.harmonic.pojo.vo.AssesVO;
|
||||||
import com.njcn.harmonic.service.AssesService;
|
import com.njcn.harmonic.service.AssesService;
|
||||||
import com.njcn.web.utils.ComAssesUtil;
|
import com.njcn.harmonic.util.ComAssesUtil;
|
||||||
import com.njcn.web.utils.PqsComasses;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@@ -191,25 +191,25 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
@Override
|
@Override
|
||||||
public List<ReportTreeVO> deviceUnitTree() {
|
public List<ReportTreeVO> deviceUnitTree() {
|
||||||
List<DictData> dictData = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEVICE_UNIT.getCode()).getData();
|
List<DictData> dictData = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEVICE_UNIT.getCode()).getData();
|
||||||
Map<String,String> unit=new HashMap<>();
|
Map<String, String> unit = new HashMap<>();
|
||||||
List<String> list = dictData.stream().map(DictData::getCode).collect(Collectors.toList());
|
List<String> list = dictData.stream().map(DictData::getCode).collect(Collectors.toList());
|
||||||
List<ReportTreeVO> info=new ArrayList<>();
|
List<ReportTreeVO> info = new ArrayList<>();
|
||||||
List<ReportTreeVO> treeVOS=new ArrayList<>();
|
List<ReportTreeVO> treeVOS = new ArrayList<>();
|
||||||
ReportTreeVO reportTreeVO;
|
ReportTreeVO reportTreeVO;
|
||||||
for (String s : list) {
|
for (String s : list) {
|
||||||
treeVOS=new ArrayList<>();
|
treeVOS = new ArrayList<>();
|
||||||
//有效值
|
//有效值
|
||||||
if(s.equals(DicDataEnum.EFFECTIVE.getCode())){
|
if (s.equals(DicDataEnum.EFFECTIVE.getCode())) {
|
||||||
reportTreeVO=new ReportTreeVO();
|
reportTreeVO = new ReportTreeVO();
|
||||||
reportTreeVO.setName("$"+s+"#i$");
|
reportTreeVO.setName("$" + s + "#i$");
|
||||||
reportTreeVO.setShowName(DicDataEnum.EFFECTIVE.getName());
|
reportTreeVO.setShowName(DicDataEnum.EFFECTIVE.getName());
|
||||||
treeVOS.add(reportTreeVO);
|
treeVOS.add(reportTreeVO);
|
||||||
reportTreeVO=new ReportTreeVO();
|
reportTreeVO = new ReportTreeVO();
|
||||||
reportTreeVO.setName("$"+s+"#v$");
|
reportTreeVO.setName("$" + s + "#v$");
|
||||||
reportTreeVO.setShowName(DicDataEnum.EFFECTIVE.getName());
|
reportTreeVO.setShowName(DicDataEnum.EFFECTIVE.getName());
|
||||||
treeVOS.add(reportTreeVO);
|
treeVOS.add(reportTreeVO);
|
||||||
|
|
||||||
reportTreeVO=new ReportTreeVO();
|
reportTreeVO = new ReportTreeVO();
|
||||||
reportTreeVO.setName(s);
|
reportTreeVO.setName(s);
|
||||||
reportTreeVO.setShowName(DicDataEnum.EFFECTIVE.getName());
|
reportTreeVO.setShowName(DicDataEnum.EFFECTIVE.getName());
|
||||||
reportTreeVO.setChildren(treeVOS);
|
reportTreeVO.setChildren(treeVOS);
|
||||||
@@ -300,7 +300,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
//报表日期
|
//报表日期
|
||||||
.eq(ExcelRpt::getDataDate, reportSearchParam.getStartTime());
|
.eq(ExcelRpt::getDataDate, reportSearchParam.getStartTime());
|
||||||
try {
|
try {
|
||||||
List<ExcelRpt> excelRpts = excelRptMapper.selectList(lambdaQuery);
|
List<ExcelRpt> excelRpts = excelRptMapper.selectList(lambdaQuery);
|
||||||
if (CollUtil.isNotEmpty(excelRpts)) {
|
if (CollUtil.isNotEmpty(excelRpts)) {
|
||||||
fileStorageUtil.downloadStream(response, excelRpts.get(0).getContent());
|
fileStorageUtil.downloadStream(response, excelRpts.get(0).getContent());
|
||||||
} else {
|
} else {
|
||||||
@@ -429,7 +429,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
//根据content,获取v值并进行处理
|
//根据content,获取v值并进行处理
|
||||||
List<ReportTemplateDTO> reportTemplateDTOList = new ArrayList<>();
|
List<ReportTemplateDTO> reportTemplateDTOList = new ArrayList<>();
|
||||||
JSONArray jsonArray;
|
JSONArray jsonArray;
|
||||||
try(InputStream fileStream = fileStorageUtil.getFileStream(excelRptTemp.getContent())) {
|
try (InputStream fileStream = fileStorageUtil.getFileStream(excelRptTemp.getContent())) {
|
||||||
//通过文件服务器获取
|
//通过文件服务器获取
|
||||||
jsonArray = new JSONArray(new JSONTokener(fileStream, new JSONConfig()));
|
jsonArray = new JSONArray(new JSONTokener(fileStream, new JSONConfig()));
|
||||||
jsonArray.forEach(item -> {
|
jsonArray.forEach(item -> {
|
||||||
@@ -486,7 +486,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
} else if (InfluxDbSqlConstant.AVG.equalsIgnoreCase(data.getStatMethod())) {
|
} else if (InfluxDbSqlConstant.AVG.equalsIgnoreCase(data.getStatMethod())) {
|
||||||
assSql(data, sql, endList, InfluxDbSqlConstant.AVG, reportSearchParam);
|
assSql(data, sql, endList, InfluxDbSqlConstant.AVG, reportSearchParam);
|
||||||
} else if (InfluxDbSqlConstant.CP95.equalsIgnoreCase(data.getStatMethod())) {
|
} else if (InfluxDbSqlConstant.CP95.equalsIgnoreCase(data.getStatMethod())) {
|
||||||
assSql(data, sql, endList, InfluxDbSqlConstant.CP95, reportSearchParam);
|
assSql(data, sql, endList, InfluxDbSqlConstant.PERCENTILE, reportSearchParam);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -510,19 +510,22 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
String v = son.getStr("v");
|
String v = son.getStr("v");
|
||||||
//数据格式:$HA[_25]#B#max#classId$ 或 $HA[_25]#max#classId$
|
//数据格式:$HA[_25]#B#max#classId$ 或 $HA[_25]#max#classId$
|
||||||
if (v.charAt(0) == '$' && v.contains("#")) {
|
if (v.charAt(0) == '$' && v.contains("#")) {
|
||||||
String str = assMap.get(v.replace("$", "")).get(0).getValue();
|
String str = "";
|
||||||
//没有值,赋"/"
|
if(Objects.nonNull(assMap.get(v.replace("$", "")))){
|
||||||
if (StringUtils.isBlank(str)) {
|
str = assMap.get(v.replace("$", "")).get(0).getValue();
|
||||||
str = "/";
|
//没有值,赋"/"
|
||||||
|
if (StringUtils.isBlank(str)) {
|
||||||
|
str = "/";
|
||||||
|
}
|
||||||
|
son.set("v", str);
|
||||||
}
|
}
|
||||||
son.set("v", str);
|
|
||||||
}
|
}
|
||||||
//解决数据单位问题 @指标#类型@
|
//解决数据单位问题 @指标#类型@
|
||||||
if (v.charAt(0) == '@' && v.contains("#")) {
|
if (v.charAt(0) == '@' && v.contains("#")) {
|
||||||
String replace = v.replace("@", "");
|
String replace = v.replace("@", "");
|
||||||
if(unit.containsKey(replace)){
|
if (unit.containsKey(replace)) {
|
||||||
son.set("v", unit.get(replace));
|
son.set("v", unit.get(replace));
|
||||||
}else{
|
} else {
|
||||||
son.set("v", "/");
|
son.set("v", "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,54 +556,55 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据单位信息
|
* 数据单位信息
|
||||||
|
*
|
||||||
* @param lineID
|
* @param lineID
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Map<String,String> unitMap(String lineID){
|
private Map<String, String> unitMap(String lineID) {
|
||||||
PqsDeviceUnit deviceUnit = deviceUnitClient.lineUnitDetail(lineID).getData();
|
PqsDeviceUnit deviceUnit = deviceUnitClient.lineUnitDetail(lineID).getData();
|
||||||
List<DictData> dictData = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEVICE_UNIT.getCode()).getData();
|
List<DictData> dictData = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEVICE_UNIT.getCode()).getData();
|
||||||
Map<String,String> unit=new HashMap<>();
|
Map<String, String> unit = new HashMap<>();
|
||||||
List<String> list = dictData.stream().map(DictData::getCode).collect(Collectors.toList());
|
List<String> list = dictData.stream().map(DictData::getCode).collect(Collectors.toList());
|
||||||
for (String s : list) {
|
for (String s : list) {
|
||||||
//有效值
|
//有效值
|
||||||
if(s.equals(DicDataEnum.EFFECTIVE.getCode())){
|
if (s.equals(DicDataEnum.EFFECTIVE.getCode())) {
|
||||||
unit.put(s+"#i",deviceUnit.getIeffective());
|
unit.put(s + "#i", deviceUnit.getIeffective());
|
||||||
unit.put(s+"#v",deviceUnit.getLineVoltage());
|
unit.put(s + "#v", deviceUnit.getLineVoltage());
|
||||||
}
|
}
|
||||||
//功率
|
//功率
|
||||||
if(s.equals(DicDataEnum.POWER.getCode())){
|
if (s.equals(DicDataEnum.POWER.getCode())) {
|
||||||
unit.put(s+"#p",deviceUnit.getTotalActiveP());
|
unit.put(s + "#p", deviceUnit.getTotalActiveP());
|
||||||
unit.put(s+"#q",deviceUnit.getTotalNoP());
|
unit.put(s + "#q", deviceUnit.getTotalNoP());
|
||||||
unit.put(s+"#s",deviceUnit.getTotalViewP());
|
unit.put(s + "#s", deviceUnit.getTotalViewP());
|
||||||
}
|
}
|
||||||
//畸变率
|
//畸变率
|
||||||
if(s.equals(DicDataEnum.DISTORTION.getCode())){
|
if (s.equals(DicDataEnum.DISTORTION.getCode())) {
|
||||||
unit.put(s+"#v",deviceUnit.getVdistortion());
|
unit.put(s + "#v", deviceUnit.getVdistortion());
|
||||||
}
|
}
|
||||||
//电压偏差
|
//电压偏差
|
||||||
if(s.equals(DicDataEnum.VOLTAGE.getCode())){
|
if (s.equals(DicDataEnum.VOLTAGE.getCode())) {
|
||||||
unit.put(s+"#v",deviceUnit.getVoltageDev());
|
unit.put(s + "#v", deviceUnit.getVoltageDev());
|
||||||
}
|
}
|
||||||
//频率
|
//频率
|
||||||
if(s.equals(DicDataEnum.UNIT_FREQUENCY.getCode())){
|
if (s.equals(DicDataEnum.UNIT_FREQUENCY.getCode())) {
|
||||||
unit.put(s+"#freq",deviceUnit.getUnitFrequency());
|
unit.put(s + "#freq", deviceUnit.getUnitFrequency());
|
||||||
unit.put(s+"#freqDev",deviceUnit.getUnitFrequencyDev());
|
unit.put(s + "#freqDev", deviceUnit.getUnitFrequencyDev());
|
||||||
}
|
}
|
||||||
//三项不平衡度
|
//三项不平衡度
|
||||||
if(s.equals(DicDataEnum.UNBALANCE.getCode())){
|
if (s.equals(DicDataEnum.UNBALANCE.getCode())) {
|
||||||
unit.put(s+"#v","%");
|
unit.put(s + "#v", "%");
|
||||||
unit.put(s+"#vPos",deviceUnit.getPositiveV());
|
unit.put(s + "#vPos", deviceUnit.getPositiveV());
|
||||||
unit.put(s+"#vNeg",deviceUnit.getNoPositiveV());
|
unit.put(s + "#vNeg", deviceUnit.getNoPositiveV());
|
||||||
unit.put(s+"#vZero",deviceUnit.getNoPositiveV());
|
unit.put(s + "#vZero", deviceUnit.getNoPositiveV());
|
||||||
unit.put(s+"#i","%");
|
unit.put(s + "#i", "%");
|
||||||
unit.put(s+"#iPos","A");
|
unit.put(s + "#iPos", "A");
|
||||||
unit.put(s+"#iNeg","A");
|
unit.put(s + "#iNeg", "A");
|
||||||
unit.put(s+"#iZero","A");
|
unit.put(s + "#iZero", "A");
|
||||||
}
|
}
|
||||||
//基波
|
//基波
|
||||||
if(s.equals(DicDataEnum.FUND.getCode())){
|
if (s.equals(DicDataEnum.FUND.getCode())) {
|
||||||
unit.put(s+"#i",deviceUnit.getIfund());
|
unit.put(s + "#i", deviceUnit.getIfund());
|
||||||
unit.put(s+"#v",deviceUnit.getVfundEffective());
|
unit.put(s + "#v", deviceUnit.getVfundEffective());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -616,7 +620,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
//sql拼接示例:select MAX(IHA2) as IHA2 from power_quality_data where Phase = 'A' and LineId='1324564568' and Stat_Method='max' tz('Asia/Shanghai')
|
//sql拼接示例:select MAX(IHA2) as IHA2 from power_quality_data where Phase = 'A' and LineId='1324564568' and Stat_Method='max' tz('Asia/Shanghai')
|
||||||
|
|
||||||
//cp95函数特殊处理 PERCENTILE(field_key, N)
|
//cp95函数特殊处理 PERCENTILE(field_key, N)
|
||||||
if (InfluxDbSqlConstant.CP95.equals(method)) {
|
if (InfluxDbSqlConstant.PERCENTILE.equals(method)) {
|
||||||
sql.append(method)
|
sql.append(method)
|
||||||
.append(InfluxDbSqlConstant.LBK)
|
.append(InfluxDbSqlConstant.LBK)
|
||||||
.append(data.getTemplateName())
|
.append(data.getTemplateName())
|
||||||
@@ -660,11 +664,13 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//频率和频率偏差仅统计T相
|
//频率和频率偏差仅统计T相
|
||||||
if(data.getTemplateName().equals("freq_dev") || data.getTemplateName().equals("freq")){
|
if (data.getTemplateName().equals("freq_dev") || data.getTemplateName().equals("freq")) {
|
||||||
sql.append(InfluxDbSqlConstant.AND)
|
sql.append(InfluxDbSqlConstant.AND)
|
||||||
.append(InfluxDBTableConstant.PHASIC_TYPE)
|
.append(InfluxDBTableConstant.PHASIC_TYPE)
|
||||||
.append(InfluxDbSqlConstant.EQ)
|
.append(InfluxDbSqlConstant.EQ)
|
||||||
.append(InfluxDBTableConstant.PHASE_TYPE_T);
|
.append(InfluxDbSqlConstant.QM)
|
||||||
|
.append(InfluxDBTableConstant.PHASE_TYPE_T)
|
||||||
|
.append(InfluxDbSqlConstant.QM);
|
||||||
}
|
}
|
||||||
//时间范围处理
|
//时间范围处理
|
||||||
sql
|
sql
|
||||||
@@ -675,12 +681,21 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
|
|
||||||
sql.append(InfluxDbSqlConstant.TZ);
|
sql.append(InfluxDbSqlConstant.TZ);
|
||||||
|
|
||||||
|
if (data.getTemplateName().equals("freq_dev") || data.getTemplateName().equals("freq")) {
|
||||||
|
System.out.println(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//根据不同的库表赋值
|
//根据不同的库表赋值
|
||||||
StatisticalDataDTO statisticalDataDTO = commonService.selectBySql(sql);
|
StatisticalDataDTO statisticalDataDTO = commonService.selectBySql(sql);
|
||||||
data.setValue(String.format("%.3f",statisticalDataDTO.getValue()));
|
if (Objects.isNull(statisticalDataDTO)) {
|
||||||
|
data.setValue("/");
|
||||||
|
} else {
|
||||||
|
|
||||||
|
data.setValue(String.format("%.3f", statisticalDataDTO.getValue()));
|
||||||
|
}
|
||||||
endList.add(data);
|
endList.add(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.njcn.web.utils;
|
package com.njcn.harmonic.util;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.harmonic.pojo.po.PqsComasses;
|
||||||
|
import com.njcn.web.utils.FloatUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -17,42 +17,21 @@
|
|||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>influxdb-springboot-starter</artifactId>
|
<artifactId>influxdb-springboot-starter</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>logging-interceptor</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>4.9.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>logging-interceptor</artifactId>
|
|
||||||
<version>4.9.0</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>system-api</artifactId>
|
<artifactId>system-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>cs-device-api</artifactId>
|
<artifactId>cs-device-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -115,15 +115,6 @@
|
|||||||
<artifactId>common-oss</artifactId>
|
<artifactId>common-oss</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>4.8.1</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>prepare-api</artifactId>
|
<artifactId>prepare-api</artifactId>
|
||||||
|
|||||||
@@ -113,6 +113,18 @@
|
|||||||
<artifactId>http-client</artifactId>
|
<artifactId>http-client</artifactId>
|
||||||
<version>1.1.5.11</version>
|
<version>1.1.5.11</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--liteFlow相关依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.yomahub</groupId>
|
||||||
|
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||||
|
<version>2.10.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.yomahub</groupId>
|
||||||
|
<artifactId>liteflow-rule-nacos</artifactId>
|
||||||
|
<version>2.10.7</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
Reference in New Issue
Block a user