初始化influx公共模块项目
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user