|
|
@ -224,8 +224,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { |
|
|
|
int thisTimeValue = entry.getValue(); |
|
|
|
Map<String, Object> row = new HashMap<>(); |
|
|
|
row.put("stakeMark", stakeMark); |
|
|
|
row.put("thisTimeList", thisTimeValue); |
|
|
|
row.put("lastTimeList", lastTimeList.getOrDefault(stakeMark, 0)); |
|
|
|
row.put(thisTime, thisTimeValue); |
|
|
|
row.put(lastTime, lastTimeList.getOrDefault(stakeMark, 0)); |
|
|
|
sortedResult.add(row); |
|
|
|
} |
|
|
|
// 添加那些只在lastTimeList中的键
|
|
|
@ -233,8 +233,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { |
|
|
|
if (!thisTimeList.containsKey(stakeMark)) { |
|
|
|
Map<String, Object> row = new HashMap<>(); |
|
|
|
row.put("stakeMark", stakeMark); |
|
|
|
row.put("thisTimeList", 0); |
|
|
|
row.put("lastTimeList", lastTimeList.get(stakeMark)); |
|
|
|
row.put(thisTime, 0); |
|
|
|
row.put(lastTime, lastTimeList.get(stakeMark)); |
|
|
|
sortedResult.add(row); |
|
|
|
} |
|
|
|
} |
|
|
@ -315,8 +315,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { |
|
|
|
String thisTimeValue = entry.getValue(); |
|
|
|
Map<String, Object> row = new HashMap<>(); |
|
|
|
row.put("stakeMark", stakeMark); |
|
|
|
row.put("thisTimeList", thisTimeValue); |
|
|
|
row.put("lastTimeList", lastTimeList.getOrDefault(stakeMark, "0.00")); |
|
|
|
row.put(thisTime, thisTimeValue); |
|
|
|
row.put(lastTime, lastTimeList.getOrDefault(stakeMark, "0.00")); |
|
|
|
sortedResult.add(row); |
|
|
|
} |
|
|
|
// 添加那些只在lastTimeList中的键
|
|
|
@ -324,8 +324,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { |
|
|
|
if (!thisTimeList.containsKey(stakeMark)) { |
|
|
|
Map<String, Object> row = new HashMap<>(); |
|
|
|
row.put("stakeMark", stakeMark); |
|
|
|
row.put("thisTimeList", "0.00"); |
|
|
|
row.put("lastTimeList", lastTimeList.get(stakeMark)); |
|
|
|
row.put(thisTime, "0.00"); |
|
|
|
row.put(lastTime, lastTimeList.get(stakeMark)); |
|
|
|
sortedResult.add(row); |
|
|
|
} |
|
|
|
} |
|
|
@ -377,7 +377,7 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { |
|
|
|
Integer differenceInMinute = (int)differenceInMinutes; |
|
|
|
|
|
|
|
if (averageMap.get(groupKey)==null){ //事件还为存入map
|
|
|
|
averageMap.putIfAbsent(groupKey, UniversalEnum.ONE.getNumber());//事件类型不存在存1
|
|
|
|
averageMap.putIfAbsent(groupKey, differenceInMinute);//
|
|
|
|
}else { |
|
|
|
Integer currentSum = averageMap.get(groupKey); |
|
|
|
averageMap.put(groupKey, currentSum +differenceInMinute ); |
|
|
|