41 lines
1.2 KiB
Java
41 lines
1.2 KiB
Java
|
|
package com.njcn.influx.service.impl;
|
||
|
|
|
||
|
|
import com.njcn.influx.imapper.IDataIMapper;
|
||
|
|
import com.njcn.influx.pojo.po.DataI;
|
||
|
|
import com.njcn.influx.query.InfluxQueryWrapper;
|
||
|
|
import com.njcn.influx.service.IDataIService;
|
||
|
|
import lombok.RequiredArgsConstructor;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author hongawen
|
||
|
|
* @version 1.0.0
|
||
|
|
* @date 2023年07月17日 11:05
|
||
|
|
*/
|
||
|
|
@Service
|
||
|
|
@RequiredArgsConstructor
|
||
|
|
public class IDataIServiceImpl implements IDataIService {
|
||
|
|
|
||
|
|
private final IDataIMapper dataIMapper;
|
||
|
|
|
||
|
|
@Override
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
}
|