新增一些公共查询方法
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package com.njcn.influx.service;
|
||||
|
||||
import com.njcn.influx.pojo.po.DataFluc;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2023年05月05日 09:10
|
||||
*/
|
||||
public interface DataFlucService {
|
||||
List<DataFluc> getNewDataFluc(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.influx.service;
|
||||
|
||||
import com.njcn.influx.pojo.po.DataHarmRateV;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
@@ -10,4 +11,5 @@ import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
*/
|
||||
public interface DataHarmRateVService {
|
||||
DataHarmRateV getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper);
|
||||
List<DataHarmRateV> getNewDataHarmRateV(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.njcn.influx.service;
|
||||
|
||||
import com.njcn.influx.pojo.po.DataInHarmRateV;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author guofeihu
|
||||
* @version 1.0.0
|
||||
* @date 2024年09月13日 11:01
|
||||
*/
|
||||
public interface DataInHarmRateVService {
|
||||
List<DataInHarmRateV> getNewDataInHarmRateV(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
13
src/main/java/com/njcn/influx/service/DataPltService.java
Normal file
13
src/main/java/com/njcn/influx/service/DataPltService.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.njcn.influx.service;
|
||||
|
||||
import com.njcn.influx.pojo.po.DataPlt;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author guofeihu
|
||||
* @version 1.0.0
|
||||
* @date 2024年09月13日 11:01
|
||||
*/
|
||||
public interface DataPltService {
|
||||
List<DataPlt> getNewDataPlt(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
@@ -21,4 +21,5 @@ public interface IDataIService {
|
||||
* @Date: 2024/2/27
|
||||
*/
|
||||
List<DataI> getWeekDataI(String lineIndex, String startTime, String endTime);
|
||||
List<DataI> getNewDataI(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package com.njcn.influx.service;
|
||||
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IDataVService {
|
||||
|
||||
List<DataV> getDataV(String lineIndex, String startTime, String endTime);
|
||||
List<DataV> getHarmonicDataV(String lineIndex, String startTime, String endTime);
|
||||
|
||||
List<DataV> getNewDataV(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
package com.njcn.influx.service.impl;
|
||||
|
||||
import com.njcn.influx.imapper.DataFlucMapper;
|
||||
import com.njcn.influx.pojo.po.DataFluc;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.DataFlucService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
@@ -8,5 +14,17 @@ import org.springframework.stereotype.Service;
|
||||
* @date 2023年05月05日 09:10
|
||||
*/
|
||||
@Service
|
||||
public class DataFlucServiceImpl {
|
||||
@RequiredArgsConstructor
|
||||
public class DataFlucServiceImpl implements DataFlucService {
|
||||
|
||||
private final DataFlucMapper dataFlucMapper;
|
||||
|
||||
@Override
|
||||
public List<DataFluc> getNewDataFluc(String lineIndex, String startTime, String endTime) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFluc.class);
|
||||
influxQueryWrapper.eq(DataFluc::getLineId, lineIndex)
|
||||
.between(DataFluc::getTime, startTime, endTime);
|
||||
return dataFlucMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ package com.njcn.influx.service.impl;
|
||||
|
||||
import com.njcn.influx.imapper.DataHarmRateVMapper;
|
||||
import com.njcn.influx.pojo.po.DataHarmRateV;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.DataHarmRateVService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
@@ -23,4 +26,12 @@ public class DataHarmRateVServiceImpl implements DataHarmRateVService {
|
||||
public DataHarmRateV getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper) {
|
||||
return dataHarmRateVMapper.getMeanAllTimesData(influxQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataHarmRateV> getNewDataHarmRateV(String lineIndex, String startTime, String endTime) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmRateV.class);
|
||||
influxQueryWrapper.eq(DataHarmRateV::getLineId, lineIndex)
|
||||
.between(DataHarmRateV::getTime, startTime, endTime);;
|
||||
return dataHarmRateVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.influx.service.impl;
|
||||
|
||||
import com.njcn.influx.imapper.DataInHarmRateVMapper;
|
||||
import com.njcn.influx.pojo.po.DataInHarmRateV;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.DataInHarmRateVService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author guofeihu
|
||||
* @version 1.0.0
|
||||
* @date 2024年09月13日 11:01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DataInHarmRateVServiceImpl implements DataInHarmRateVService {
|
||||
|
||||
private final DataInHarmRateVMapper dataInHarmRateVMapper;
|
||||
|
||||
@Override
|
||||
public List<DataInHarmRateV> getNewDataInHarmRateV(String lineIndex, String startTime, String endTime) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInHarmRateV.class);
|
||||
influxQueryWrapper.eq(DataInHarmRateV::getLineId, lineIndex)
|
||||
.between(DataInHarmRateV::getTime, startTime, endTime);;
|
||||
return dataInHarmRateVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.influx.service.impl;
|
||||
|
||||
import com.njcn.influx.imapper.DataPltMapper;
|
||||
import com.njcn.influx.pojo.po.*;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.DataPltService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author guofeihu
|
||||
* @version 1.0.0
|
||||
* @date 2024年09月13日 11:01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DataPltServiceImpl implements DataPltService {
|
||||
|
||||
private final DataPltMapper dataPltMapper;
|
||||
|
||||
@Override
|
||||
public List<DataPlt> getNewDataPlt(String lineIndex, String startTime, String endTime) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataPlt.class);
|
||||
influxQueryWrapper.eq(DataPlt::getLineId, lineIndex)
|
||||
.between(DataPlt::getTime, startTime, endTime);;
|
||||
return dataPltMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,14 @@ public class DataVServiceImpl implements IDataVService {
|
||||
return result1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataV> getNewDataV(String lineIndex, String startTime, String endTime) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||
influxQueryWrapper.eq(DataV::getLineId, lineIndex)
|
||||
.between(DataV::getTime, startTime, endTime);;
|
||||
return dataVMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 自定义需要查询的谐波次数
|
||||
|
||||
@@ -37,4 +37,12 @@ public class IDataIServiceImpl implements IDataIService {
|
||||
result1 = dataIMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
return result1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataI> getNewDataI(String lineIndex, String startTime, String endTime) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||
influxQueryWrapper.eq(DataI::getLineId, lineIndex)
|
||||
.between(DataI::getTime, startTime, endTime);;
|
||||
return dataIMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user