1.变压器bug修改。

2.冀北首页变压器统计相关业务代码提交
This commit is contained in:
wr
2023-08-09 19:11:21 +08:00
parent 5670524153
commit dc15bd5d20
14 changed files with 205 additions and 42 deletions

View File

@@ -2,6 +2,10 @@ package com.njcn.influx.imapper;
import com.njcn.influx.base.InfluxDbBaseMapper;
import com.njcn.influx.pojo.po.DataHarmPowerP;
import com.njcn.influx.pojo.po.DataV;
import com.njcn.influx.query.InfluxQueryWrapper;
import java.util.List;
/**
* @author hongawen
@@ -9,4 +13,6 @@ import com.njcn.influx.pojo.po.DataHarmPowerP;
* @date 2023年05月05日 09:00
*/
public interface DataHarmPowerPMapper extends InfluxDbBaseMapper<DataHarmPowerP> {
List<DataHarmPowerP> getStatisticsByWraper(InfluxQueryWrapper influxQueryWrapper);
}

View File

@@ -1,9 +1,15 @@
package com.njcn.influx.service;
import com.njcn.influx.pojo.po.DataHarmPowerP;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2023年05月05日 09:51
*/
public interface DataHarmPowerPService {
List<DataHarmPowerP> getHarmonicPowerP(String lineIndex, String startTime, String endTime);
}

View File

@@ -7,4 +7,5 @@ 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);
}

View File

@@ -1,8 +1,14 @@
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
@@ -10,4 +16,17 @@ import org.springframework.stereotype.Service;
*/
@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;
}
}

View File

@@ -48,4 +48,16 @@ public class DataVServiceImpl implements IDataVService {
System.out.println("result1==:" + result1);
return result1;
}
@Override
public List<DataV> getHarmonicDataV(String lineIndex, String startTime, String endTime) {
List<DataV> result1 ;
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
influxQueryWrapper.eq(DataV::getLineId, lineIndex)
.eq(DataV::getValueType, "CP95")
.ne(DataV::getPhasicType, "T")
.between(DataV::getTime, startTime, endTime);;
result1 = dataVMapper.getStatisticsByWraper(influxQueryWrapper);
return result1;
}
}