修改influxdb包的字段,类引起的修改
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
package com.njcn;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.imapper.DataVMapper;
|
||||
import com.njcn.influx.pojo.bo.MeasurementCount;
|
||||
import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.utils.InfluxDbUtils;
|
||||
import com.njcn.prepare.PrepareApplication;
|
||||
import com.njcn.prepare.harmonic.service.mysql.Impl.line.IntegrityServiceImpl;
|
||||
import com.njcn.prepare.harmonic.service.mysql.Impl.line.LimitRateServiceImpl;
|
||||
import com.njcn.prepare.harmonic.service.mysql.Impl.line.LimitTargetServiceImpl;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.IntegrityService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.influxdb.impl.InfluxDBResultMapper;
|
||||
@@ -28,11 +21,9 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Array;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -76,7 +67,7 @@ public class BaseJunitTest {
|
||||
.min(DataV::getVZero)
|
||||
.min(DataV::getVlDev)
|
||||
.min(DataV::getVuDev)
|
||||
.groupBy(DataV::getLineId,DataV::getPhasicType,DataV::getQualityFlag,DataV::getValueType)
|
||||
.groupBy(DataV::getLineId,DataV::getPhaseType,DataV::getQualityFlag,DataV::getValueType)
|
||||
.between(DataV::getTime, startTime, endTime);
|
||||
result1 = dataVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
System.out.println("result1==:" + result1);
|
||||
@@ -96,7 +87,7 @@ public class BaseJunitTest {
|
||||
.max(DataV::getVZero)
|
||||
.max(DataV::getVlDev)
|
||||
.max(DataV::getVuDev)
|
||||
.groupBy(DataV::getLineId,DataV::getPhasicType,DataV::getQualityFlag,DataV::getValueType)
|
||||
.groupBy(DataV::getLineId,DataV::getPhaseType,DataV::getQualityFlag,DataV::getValueType)
|
||||
.between(DataV::getTime, startTime, endTime);
|
||||
result1 = dataVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
|
||||
@@ -115,7 +106,7 @@ public class BaseJunitTest {
|
||||
.mean(DataV::getVZero)
|
||||
.mean(DataV::getVlDev)
|
||||
.mean(DataV::getVuDev)
|
||||
.groupBy(DataV::getLineId,DataV::getPhasicType,DataV::getQualityFlag,DataV::getValueType)
|
||||
.groupBy(DataV::getLineId,DataV::getPhaseType,DataV::getQualityFlag,DataV::getValueType)
|
||||
.between(DataV::getTime, startTime, endTime);
|
||||
result1 = dataVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
long time2 = System.currentTimeMillis();
|
||||
@@ -216,7 +207,7 @@ public class BaseJunitTest {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||
influxQueryWrapper.regular(DataV::getLineId, lineIndex)
|
||||
.eq(DataV::getValueType, InfluxDbSqlConstant.CP95)
|
||||
.regular(DataV::getPhasicType, Arrays.asList(InfluxDBTableConstant.PHASE_TYPE_A,InfluxDBTableConstant.PHASE_TYPE_B,InfluxDBTableConstant.PHASE_TYPE_C))
|
||||
.regular(DataV::getPhaseType, Arrays.asList(InfluxDBTableConstant.PHASE_TYPE_A,InfluxDBTableConstant.PHASE_TYPE_B,InfluxDBTableConstant.PHASE_TYPE_C))
|
||||
.eq(DataV::getQualityFlag, InfluxDBTableConstant.NORMAL)
|
||||
.between(DataV::getTime, time1, time2);
|
||||
List<DataV> list = dataVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
|
||||
Reference in New Issue
Block a user