实时数据查询,历史区间数据查询接口新增
This commit is contained in:
parent
e3c6d293b6
commit
ca0195cb38
@ -114,10 +114,19 @@ public class DataService {
|
||||
lowSpeedField.add(field);
|
||||
}
|
||||
}
|
||||
Map<String, Map<String, Map<String, Object>>> lowHistoryCurve = tdEngineService.fetchLowHistoryCurve(irn, startTime, endTime, interval, lowSpeedField);
|
||||
Map<String, Map<String, Map<String, Object>>> result = new HashMap<>();
|
||||
if (!CollectionUtils.isEmpty(highSpeedField)) {
|
||||
Map<String, Map<String, Map<String, Object>>> highHistoryCurve = tdEngineService.fetchHighHistoryCurve(irn, startTime, endTime, interval, highSpeedField);
|
||||
Map<String, Map<String, Map<String, Object>>> result = new HashMap<>(lowHistoryCurve);
|
||||
result.get(irn.toString()).putAll(highHistoryCurve.get(irn.toString()));
|
||||
result.putAll(highHistoryCurve);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(lowSpeedField)) {
|
||||
Map<String, Map<String, Map<String, Object>>> lowHistoryCurve = tdEngineService.fetchLowHistoryCurve(irn, startTime, endTime, interval, lowSpeedField);
|
||||
if (result.get(irn.toString()) == null) {
|
||||
result.putAll(lowHistoryCurve);
|
||||
} else {
|
||||
result.get(irn.toString()).putAll(lowHistoryCurve.get(irn.toString()));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user