处理依赖冲突问题
自定义报表问题处理
This commit is contained in:
78
pom.xml
78
pom.xml
@@ -50,6 +50,7 @@
|
||||
<nacos.url>${middle.server.url}:18848</nacos.url>
|
||||
<!--服务器发布内容为空-->
|
||||
<!-- <nacos.namespace></nacos.namespace>-->
|
||||
<!-- <nacos.namespace>1dd11af6-e668-41fd-a663-02a05705304d</nacos.namespace>-->
|
||||
<nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>
|
||||
<!--sentinel:port-->
|
||||
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
||||
@@ -90,6 +91,7 @@
|
||||
<velocity.version>2.3</velocity.version>
|
||||
<jjwt.version>0.9.1</jjwt.version>
|
||||
<feignOkhttp.version>11.2</feignOkhttp.version>
|
||||
<okhttp3.version>4.9.0</okhttp3.version>
|
||||
<antisamy.version>1.6.4</antisamy.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
|
||||
@@ -105,9 +107,6 @@
|
||||
<xxl-job.version>2.3.0</xxl-job.version>
|
||||
<mqtt.version>1.2.7</mqtt.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>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
@@ -335,35 +334,62 @@
|
||||
<artifactId>easypoi-spring-boot-starter</artifactId>
|
||||
<version>${easypoi.version}</version>
|
||||
</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时需要使用 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>${dynamic-datasource.version}</version>
|
||||
</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>
|
||||
</dependencyManagement>
|
||||
<build>
|
||||
|
||||
@@ -107,6 +107,13 @@
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-starter-log4j2</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>logging-interceptor</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -69,11 +69,6 @@
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.influxdb</groupId>
|
||||
<artifactId>influxdb-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -59,13 +59,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>pqs-influx</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<!--排除okhttp3的依赖-->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -44,24 +44,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-oss</artifactId>
|
||||
<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>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -52,13 +52,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>pqs-influx</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<!--排除okhttp3的依赖-->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
@@ -66,7 +59,6 @@
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.jeffreyning</groupId>
|
||||
<artifactId>mybatisplus-plus</artifactId>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.web.utils;
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
@@ -57,24 +57,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-oss</artifactId>
|
||||
<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>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import cn.hutool.core.date.DateUtil;
|
||||
import com.njcn.device.pq.pojo.param.PulicTimeStatisParam;
|
||||
import com.njcn.harmonic.mapper.RStatComassesDMapper;
|
||||
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.service.AssesService;
|
||||
import com.njcn.web.utils.ComAssesUtil;
|
||||
import com.njcn.web.utils.PqsComasses;
|
||||
import com.njcn.harmonic.util.ComAssesUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -486,7 +486,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
} else if (InfluxDbSqlConstant.AVG.equalsIgnoreCase(data.getStatMethod())) {
|
||||
assSql(data, sql, endList, InfluxDbSqlConstant.AVG, reportSearchParam);
|
||||
} else if (InfluxDbSqlConstant.CP95.equalsIgnoreCase(data.getStatMethod())) {
|
||||
assSql(data, sql, endList, InfluxDbSqlConstant.CP95, reportSearchParam);
|
||||
assSql(data, sql, endList, InfluxDbSqlConstant.PERCENTILE, reportSearchParam);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -510,13 +510,16 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
String v = son.getStr("v");
|
||||
//数据格式:$HA[_25]#B#max#classId$ 或 $HA[_25]#max#classId$
|
||||
if (v.charAt(0) == '$' && v.contains("#")) {
|
||||
String str = assMap.get(v.replace("$", "")).get(0).getValue();
|
||||
String str = "";
|
||||
if(Objects.nonNull(assMap.get(v.replace("$", "")))){
|
||||
str = assMap.get(v.replace("$", "")).get(0).getValue();
|
||||
//没有值,赋"/"
|
||||
if (StringUtils.isBlank(str)) {
|
||||
str = "/";
|
||||
}
|
||||
son.set("v", str);
|
||||
}
|
||||
}
|
||||
//解决数据单位问题 @指标#类型@
|
||||
if (v.charAt(0) == '@' && v.contains("#")) {
|
||||
String replace = v.replace("@", "");
|
||||
@@ -553,6 +556,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
|
||||
/**
|
||||
* 数据单位信息
|
||||
*
|
||||
* @param lineID
|
||||
* @return
|
||||
*/
|
||||
@@ -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')
|
||||
|
||||
//cp95函数特殊处理 PERCENTILE(field_key, N)
|
||||
if (InfluxDbSqlConstant.CP95.equals(method)) {
|
||||
if (InfluxDbSqlConstant.PERCENTILE.equals(method)) {
|
||||
sql.append(method)
|
||||
.append(InfluxDbSqlConstant.LBK)
|
||||
.append(data.getTemplateName())
|
||||
@@ -664,7 +668,9 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
sql.append(InfluxDbSqlConstant.AND)
|
||||
.append(InfluxDBTableConstant.PHASIC_TYPE)
|
||||
.append(InfluxDbSqlConstant.EQ)
|
||||
.append(InfluxDBTableConstant.PHASE_TYPE_T);
|
||||
.append(InfluxDbSqlConstant.QM)
|
||||
.append(InfluxDBTableConstant.PHASE_TYPE_T)
|
||||
.append(InfluxDbSqlConstant.QM);
|
||||
}
|
||||
//时间范围处理
|
||||
sql
|
||||
@@ -675,12 +681,21 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
|
||||
sql.append(InfluxDbSqlConstant.TZ);
|
||||
|
||||
if (data.getTemplateName().equals("freq_dev") || data.getTemplateName().equals("freq")) {
|
||||
System.out.println(sql);
|
||||
}
|
||||
|
||||
|
||||
//根据不同的库表赋值
|
||||
StatisticalDataDTO statisticalDataDTO = commonService.selectBySql(sql);
|
||||
if (Objects.isNull(statisticalDataDTO)) {
|
||||
data.setValue("/");
|
||||
} else {
|
||||
|
||||
data.setValue(String.format("%.3f", statisticalDataDTO.getValue()));
|
||||
}
|
||||
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.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -17,42 +17,21 @@
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>influxdb-springboot-starter</artifactId>
|
||||
<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>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>system-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-device-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -115,15 +115,6 @@
|
||||
<artifactId>common-oss</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.8.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>prepare-api</artifactId>
|
||||
|
||||
@@ -113,6 +113,18 @@
|
||||
<artifactId>http-client</artifactId>
|
||||
<version>1.1.5.11</version>
|
||||
</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>
|
||||
|
||||
<build>
|
||||
|
||||
Reference in New Issue
Block a user