海南初始版本提交
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.njcn.influx.service;
|
||||
|
||||
|
||||
import com.njcn.influx.pojo.po.DataHarmPowerQ;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2023年05月05日 09:51
|
||||
*/
|
||||
public interface DataHarmPowerQService {
|
||||
List<DataHarmPowerQ> getHarmonicPowerQ(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.njcn.influx.service;
|
||||
import com.njcn.influx.pojo.po.DataI;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
@@ -11,4 +13,12 @@ import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
public interface IDataIService {
|
||||
|
||||
DataI getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper);
|
||||
/**
|
||||
* @Description: getWeekDataI 承载能力评估获取一周数据
|
||||
* @Param:
|
||||
* @return: java.util.List<com.njcn.influx.pojo.po.DataI>
|
||||
* @Author: clam
|
||||
* @Date: 2024/2/27
|
||||
*/
|
||||
List<DataI> getWeekDataI(String lineIndex, String startTime, String endTime);
|
||||
}
|
||||
|
||||
@@ -8,4 +8,5 @@ public interface IDataVService {
|
||||
|
||||
List<DataV> getDataV(String lineIndex, String startTime, String endTime);
|
||||
List<DataV> getHarmonicDataV(String lineIndex, String startTime, String endTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.influx.service.impl;
|
||||
|
||||
import com.njcn.influx.imapper.DataHarmPowerQMapper;
|
||||
import com.njcn.influx.pojo.po.DataHarmPowerP;
|
||||
import com.njcn.influx.pojo.po.DataHarmPowerQ;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.DataHarmPowerQService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/2/27 14:50【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class DataHarmPowerQServiceImpl implements DataHarmPowerQService {
|
||||
@Resource
|
||||
private DataHarmPowerQMapper dataHarmPowerQMapper;
|
||||
@Override
|
||||
public List<DataHarmPowerQ> getHarmonicPowerQ(String lineIndex, String startTime, String endTime) {
|
||||
List<DataHarmPowerQ> result1 ;
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmPowerP.class);
|
||||
influxQueryWrapper.eq(DataHarmPowerQ::getLineId, lineIndex)
|
||||
.eq(DataHarmPowerQ::getValueType, "AVG")
|
||||
.eq(DataHarmPowerQ::getPhaseType, "T")
|
||||
.between(DataHarmPowerQ::getTime, startTime, endTime);
|
||||
result1 = dataHarmPowerQMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
return result1;
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,7 @@ public class DataVServiceImpl implements IDataVService {
|
||||
return result1;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 自定义需要查询的谐波次数
|
||||
* @author xuyang
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.influx.service.IDataIService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
@@ -22,4 +24,17 @@ public class IDataIServiceImpl implements IDataIService {
|
||||
public DataI getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper) {
|
||||
return dataIMapper.getMeanAllTimesData(influxQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataI> getWeekDataI(String lineIndex, String startTime, String endTime) {
|
||||
List<DataI> result1 ;
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||
influxQueryWrapper
|
||||
.eq(DataI::getLineId, lineIndex)
|
||||
.eq(DataI::getValueType, "CP95")
|
||||
.ne(DataI::getPhaseType, "T")
|
||||
.between(DataI::getTime, startTime, endTime);;
|
||||
result1 = dataIMapper.getStatisticsByWraper(influxQueryWrapper);
|
||||
return result1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user