问题单修复
This commit is contained in:
@@ -168,7 +168,7 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
|||||||
List<TopMsgPO> comMsgs = new ArrayList<>();
|
List<TopMsgPO> comMsgs = new ArrayList<>();
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||||
Map<String, List<Communicate>> comMap = communicates.stream().collect(Collectors.groupingBy(Communicate::getDevId));
|
Map<String, List<Communicate>> comMap = communicates.stream().collect(Collectors.groupingBy(Communicate::getDevId));
|
||||||
if (CollectionUtil.isNotEmpty(communicates)) {
|
if (CollectionUtil.isNotEmpty(comMap)) {
|
||||||
for (Map.Entry<String, List<Communicate>> entry : comMap.entrySet()) {
|
for (Map.Entry<String, List<Communicate>> entry : comMap.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
List<Communicate> value = entry.getValue();
|
List<Communicate> value = entry.getValue();
|
||||||
@@ -223,6 +223,9 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
|||||||
QueryResult result1 = influxDbUtils.query(sql1);
|
QueryResult result1 = influxDbUtils.query(sql1);
|
||||||
InfluxDBResultMapper influxDBResultMapper1 = new InfluxDBResultMapper();
|
InfluxDBResultMapper influxDBResultMapper1 = new InfluxDBResultMapper();
|
||||||
List<Communicate> earlyData = influxDBResultMapper1.toPOJO(result1, Communicate.class);
|
List<Communicate> earlyData = influxDBResultMapper1.toPOJO(result1, Communicate.class);
|
||||||
|
if (earlyData.size()==0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Communicate early = earlyData.get(0);
|
Communicate early = earlyData.get(0);
|
||||||
Communicate communicate = new Communicate();
|
Communicate communicate = new Communicate();
|
||||||
if (early.getType() == 0) {
|
if (early.getType() == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user