Files
pqs-influx/src/main/java/com/njcn/influx/service/impl/DataHarmPowerPServiceImpl.java

33 lines
1.2 KiB
Java
Raw Normal View History

2024-06-27 11:46:52 +08:00
package com.njcn.influx.service.impl;
import com.njcn.influx.imapper.DataHarmPowerPMapper;
import com.njcn.influx.pojo.po.DataHarmPowerP;
import com.njcn.influx.query.InfluxQueryWrapper;
import com.njcn.influx.service.DataHarmPowerPService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 09:51
*/
@Service
public class DataHarmPowerPServiceImpl implements DataHarmPowerPService {
@Resource
private DataHarmPowerPMapper dataHarmPowerPMapper;
@Override
public List<DataHarmPowerP> getHarmonicPowerP(String lineIndex, String startTime, String endTime) {
List<DataHarmPowerP> result1 ;
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmPowerP.class);
influxQueryWrapper.eq(DataHarmPowerP::getLineId, lineIndex)
.eq(DataHarmPowerP::getValueType, "AVG")
.eq(DataHarmPowerP::getPhaseType, "T")
.between(DataHarmPowerP::getTime, startTime, endTime);
result1 = dataHarmPowerPMapper.getStatisticsByWraper(influxQueryWrapper);
return result1;
}
}