代码提交

This commit is contained in:
2023-06-06 08:47:23 +08:00
parent ffca9a7cec
commit 3c2c5d9035
6 changed files with 71 additions and 1 deletions

View File

@@ -38,4 +38,16 @@ public class CommonServiceImpl implements CommonService {
return statistical;
}
@Override
public StatisticalDataDTO getLineRtData(String lineId, String tableName, String columnName, String phasic, String dataType) {
HashMap<String, Class<?>> entityClassesByAnnotation = ReflectUitl.getEntityClassesByAnnotation();
Class<?> aClass = entityClassesByAnnotation.get(tableName);
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(aClass,StatisticalDataDTO.class);
influxQueryWrapper.eq("line_id",lineId)
.eq("phasic_type",phasic)
.eq("value_type",dataType)
.last(columnName,"statisticalData");
return commonMapper.getLineRtData(influxQueryWrapper);
}
}