Преглед изворни кода

删除es依赖,修改log版本

yq пре 3 година
родитељ
комит
d0548071ce

+ 1 - 0
fiveep-controller/pom.xml

@@ -52,6 +52,7 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-log4j2</artifactId>
+            <version>2.6.2</version>
         </dependency>
 
         <dependency>

+ 0 - 2
fiveep-controller/src/main/java/com/bizmatics/controller/DemoControllerApplication.java

@@ -5,11 +5,9 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
-@EnableElasticsearchRepositories(basePackages = "com.bizmatics.persistence.mapper.es")
 @ComponentScan("com.bizmatics")
 @SpringBootApplication
 @EnableTransactionManagement

+ 4 - 4
fiveep-model/pom.xml

@@ -17,10 +17,10 @@
             <groupId>com.baomidou</groupId>
             <artifactId>mybatis-plus-boot-starter</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>-->
+<!--        </dependency>-->
         <dependency>
             <groupId>com.bizmatics</groupId>
             <artifactId>fiveep-common-core</artifactId>

+ 0 - 409
fiveep-model/src/main/java/com/bizmatics/model/es/RtAnalog.java

@@ -1,409 +0,0 @@
-package com.bizmatics.model.es;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-import org.springframework.data.annotation.Id;
-import org.springframework.data.elasticsearch.annotations.Document;
-import org.springframework.data.elasticsearch.annotations.Field;
-import org.springframework.data.elasticsearch.annotations.FieldType;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.util.Date;
-
-/**
- * @author yq
- * @date 2021/7/17 18:25
- */
-@Data
-@NoArgsConstructor
-@Accessors(chain = true)
-@Document(indexName = "fiveep",type = "rtAnalog", shards = 1, replicas = 0)
-public class RtAnalog {
-
-    @Id
-    private Integer id;
-
-    /**
-     * 阿里云平台设备名称
-     */
-    @Field(type = FieldType.Keyword)
-    private String deviceName;
-
-    /**
-     * 母线停电次数
-     */
-    @Field(type = FieldType.Integer)
-    private Integer Busot;
-
-    /**
-     * 三相功率因数
-     */
-    @Field(type = FieldType.Double)
-    private Double cos;
-
-    /**
-     * A相功率因数
-     */
-    @Field(type = FieldType.Double)
-    private Double COSa;
-
-    /**
-     * B相功率因数
-     */
-    @Field(type = FieldType.Double)
-    private Double COSb;
-
-    /**
-     * C相功率因数
-     */
-    @Field(type = FieldType.Double)
-    private Double COSc;
-
-    /**
-     * 实时有功需量
-     */
-    @Field(type = FieldType.Double)
-    private Double Demand;
-
-    /**
-     * 设备复位次数
-     */
-    @Field(type = FieldType.Integer)
-    private Integer DevResetTimes;
-
-    /**
-     * 设备温度
-     */
-    @Field(type = FieldType.Double)
-    private Double DeviceTemp;
-
-    /**
-     * 三相反向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epn;
-
-    /**
-     * 尖段反向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epn1;
-
-    /**
-     * 峰段反向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epn2;
-
-    /**
-     * 平段反向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epn3;
-
-    /**
-     * 谷段反向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epn4;
-
-    /**
-     * 三相正向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epp;
-
-    /**
-     * 尖段正向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epp1;
-
-    /**
-     * 峰段正向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epp2;
-
-    /**
-     * 平段正向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epp3;
-
-    /**
-     * 谷段正向有功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Epp4;
-
-    /**
-     * 三相反向无功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Eqn;
-
-    /**
-     * 三相正向无功电度
-     */
-    @Field(type = FieldType.Double)
-    private Double Eqp;
-
-    /**
-     * 频率
-     */
-    @Field(type = FieldType.Double)
-    private Double f;
-
-    /**
-     * 零序电流
-     */
-    @Field(type = FieldType.Double)
-    private Double i0;
-
-    /**
-     * 负序电流
-     */
-    @Field(type = FieldType.Double)
-    private Double i2;
-
-    /**
-     * A相总谐波电流
-     */
-    @Field(type = FieldType.Double)
-    private Double IHa;
-
-    /**
-     * B相总谐波电流
-     */
-    @Field(type = FieldType.Double)
-    private Double IHb;
-
-    /**
-     * C相总谐波电流
-     */
-    @Field(type = FieldType.Double)
-    private Double IHc;
-
-    /**
-     * A相电流
-     */
-    @Field(type = FieldType.Double)
-    private Double Ia;
-
-    /**
-     * B相电流
-     */
-    @Field(type = FieldType.Double)
-    private Double Ib;
-
-    /**
-     * C相电流
-     */
-    @Field(type = FieldType.Double)
-    private Double Ic;
-
-    /**
-     * 剩余电流
-     */
-    @Field(type = FieldType.Double)
-    private Double Ir;
-
-    /**
-     * 昨日有功最大需量
-     */
-    @Field(type = FieldType.Double)
-    private Double LastDayMD;
-
-    /**
-     * 昨日有功最大需量发生时间
-     */
-    @Field(type = FieldType.Double)
-    private Double LastDayMDt;
-
-    /**
-     * 三相总有功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double p;
-
-    /**
-     * A相有功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double Pa;
-
-    /**
-     * B相有功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double Pb;
-
-    /**
-     * C相有功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double Pc;
-
-    /**
-     * 三相总无功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double q;
-
-    /**
-     * A相无功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double Qa;
-
-    /**
-     * B相无功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double Qb;
-
-    /**
-     * C相无功功率
-     */
-    @Field(type = FieldType.Double)
-    private Double Qc;
-
-    /**
-     * 信号强度
-     */
-    @Field(type = FieldType.Double)
-    private Double SignalIntensity;
-
-    /**
-     * 第1路温度
-     */
-    @Field(type = FieldType.Double)
-    private Double t1;
-
-    /**
-     * 第2路温度
-     */
-    @Field(type = FieldType.Double)
-    private Double t2;
-
-    /**
-     * 第3路温度
-     */
-    @Field(type = FieldType.Double)
-    private Double t3;
-
-    /**
-     * 第4路温度
-     */
-    @Field(type = FieldType.Double)
-    private Double t4;
-
-    /**
-     * A相电压THD
-     */
-    @Field(type = FieldType.Double)
-    private Double THDUa;
-
-    /**
-     * B相电压THD
-     */
-    @Field(type = FieldType.Double)
-    private Double THDUb;
-
-    /**
-     * C相电压THD
-     */
-    @Field(type = FieldType.Double)
-    private Double THDUc;
-
-    /**
-     * A相电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Ua;
-
-    /**
-     * AB线电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Uab;
-
-    /**
-     * B相电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Ub;
-
-    /**
-     * BC线电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Ubc;
-
-    /**
-     * 零序电压不平衡度
-     */
-    @Field(type = FieldType.Double)
-    private Double UblU0;
-
-    /**
-     * 负序电压不平衡度
-     */
-    @Field(type = FieldType.Double)
-    private Double UblU2;
-
-    /**
-     * C相电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Uc;
-
-    /**
-     * CA线电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Uca;
-
-    /**
-     * 电压暂降次数
-     */
-    @Field(type = FieldType.Integer)
-    private Integer Udt;
-
-    /**
-     * 线路侧电压
-     */
-    @Field(type = FieldType.Double)
-    private Double Ul;
-
-    /**
-     * 电压暂升次数
-     */
-    @Field(type = FieldType.Integer)
-    private Integer Upt;
-
-    /**
-     * 电压短时中断次数
-     */
-    @Field(type = FieldType.Integer)
-    private Integer Ust;
-
-    /**
-     * 冻结时间
-     */
-    @Field(type = FieldType.Date)
-    private Date freezingTime;
-
-    /**
-     * 上报时间
-     */
-    @Field(type = FieldType.Date)
-    private Date dataTime;
-}

+ 4 - 7
fiveep-service/src/main/java/com/bizmatics/service/impl/HtAnalogDataServiceImpl.java

@@ -7,7 +7,6 @@ import com.bizmatics.common.core.exception.BusinessException;
 import com.bizmatics.common.core.util.Arith;
 import com.bizmatics.common.core.util.BeanMapperUtils;
 import com.bizmatics.common.core.util.DateUtils;
-import com.bizmatics.common.core.util.StringUtils;
 import com.bizmatics.common.mvc.base.AbstractCrudService;
 import com.bizmatics.common.spring.util.JsonUtils;
 import com.bizmatics.model.*;
@@ -18,19 +17,17 @@ import com.bizmatics.persistence.mapper.HtAnalogDataMapper;
 import com.bizmatics.service.*;
 import com.bizmatics.service.util.FieldEscapeUtils;
 import com.bizmatics.service.util.SecurityUtils;
-import com.bizmatics.service.vo.*;
+import com.bizmatics.service.vo.CommonIcoVO;
+import com.bizmatics.service.vo.HadCountVO;
+import com.bizmatics.service.vo.RealScoreVO;
+import com.bizmatics.service.vo.TimeShareVO;
 import com.fasterxml.jackson.core.type.TypeReference;
-import lombok.SneakyThrows;
-import org.apache.lucene.index.OneMergeWrappingMergePolicy;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
-import java.util.stream.Collectors;
 
 
 /**