代码提交
This commit is contained in:
@@ -24,4 +24,6 @@ public interface CommonMapper extends InfluxDbBaseMapper<PowerQualityData> {
|
|||||||
List<StatisticalDataDTO> getDeviceRtData(InfluxQueryWrapper influxQueryWrapper);
|
List<StatisticalDataDTO> getDeviceRtData(InfluxQueryWrapper influxQueryWrapper);
|
||||||
|
|
||||||
List<StatisticalDataDTO> getDeviceRtDataByTime(InfluxQueryWrapper influxQueryWrapper);
|
List<StatisticalDataDTO> getDeviceRtDataByTime(InfluxQueryWrapper influxQueryWrapper);
|
||||||
|
|
||||||
|
StatisticalDataDTO getLineHistoryData(InfluxQueryWrapper influxQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,11 +32,30 @@ public class StatisticalDataDTO {
|
|||||||
@Column(name = "value_type")
|
@Column(name = "value_type")
|
||||||
private String valueType;
|
private String valueType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标值
|
||||||
|
*/
|
||||||
private Double value;
|
private Double value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标名称
|
||||||
|
*/
|
||||||
private String statisticalName;
|
private String statisticalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标
|
||||||
|
*/
|
||||||
private String target;
|
private String target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标最大值
|
||||||
|
*/
|
||||||
|
private Double maxValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标最小值
|
||||||
|
*/
|
||||||
|
private Double minValue;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,4 +49,17 @@ public interface CommonService {
|
|||||||
* @Date: 2023/6/13
|
* @Date: 2023/6/13
|
||||||
*/
|
*/
|
||||||
List<StatisticalDataDTO> getDeviceRtDataByTime(List<String> lineIds, String tableName, String columnName, String phasic, String dataType,String startTime, String endTime);
|
List<StatisticalDataDTO> getDeviceRtDataByTime(List<String> lineIds, String tableName, String columnName, String phasic, String dataType,String startTime, String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件获取监测点时间范围内的最大最小值
|
||||||
|
* @param lineId 监测点Id
|
||||||
|
* @param tableName 表名
|
||||||
|
* @param columnName 字段名
|
||||||
|
* @param phasic 相别
|
||||||
|
* @param dataType 数据类型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
StatisticalDataDTO getLineHistoryData(String lineId, String tableName, String columnName, String startTime, String endTime);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,4 +85,14 @@ public class CommonServiceImpl implements CommonService {
|
|||||||
.eq("value_type",dataType).groupBy("line_id");
|
.eq("value_type",dataType).groupBy("line_id");
|
||||||
return commonMapper.getDeviceRtDataByTime(influxQueryWrapper);
|
return commonMapper.getDeviceRtDataByTime(influxQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatisticalDataDTO getLineHistoryData(String lineId, String tableName, String columnName, String startTime, String endTime) {
|
||||||
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(tableName,StatisticalDataDTO.class);
|
||||||
|
influxQueryWrapper.max(columnName,"maxValue")
|
||||||
|
.min(columnName,"minValue")
|
||||||
|
.eq("line_id",lineId)
|
||||||
|
.between("time", startTime, endTime);
|
||||||
|
return commonMapper.getLineHistoryData(influxQueryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user