diff --git a/pqs-influx/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java b/pqs-influx/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java index 820c13222..13f5963b3 100644 --- a/pqs-influx/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java +++ b/pqs-influx/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java @@ -29,22 +29,13 @@ public class CommonServiceImpl implements CommonService { @Override public StatisticalDataDTO getLineRtData(String lineId, String tableName, String columnName, String phasic, String dataType) { InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(tableName,StatisticalDataDTO.class); - if (Objects.equals(dataType,"M")){ - influxQueryWrapper.select(StatisticalDataDTO::getLineId) - .select(StatisticalDataDTO::getPhaseType) - .select(StatisticalDataDTO::getValueType) - .last(columnName) - .eq(InfluxDBTableConstant.LINE_ID,lineId) - .eq(InfluxDBTableConstant.PHASIC_TYPE,phasic); - } else { - influxQueryWrapper.select(StatisticalDataDTO::getLineId) - .select(StatisticalDataDTO::getPhaseType) - .select(StatisticalDataDTO::getValueType) - .last(columnName) - .eq(InfluxDBTableConstant.LINE_ID,lineId) - .eq(InfluxDBTableConstant.PHASIC_TYPE,phasic) - .eq(InfluxDBTableConstant.VALUE_TYPE,dataType); - } + influxQueryWrapper.select(StatisticalDataDTO::getLineId) + .select(StatisticalDataDTO::getPhaseType) + .select(StatisticalDataDTO::getValueType) + .last(columnName) + .eq(InfluxDBTableConstant.LINE_ID,lineId) + .eq(InfluxDBTableConstant.PHASIC_TYPE,phasic) + .eq(InfluxDBTableConstant.VALUE_TYPE,dataType); return commonMapper.getLineRtData(influxQueryWrapper); }