Commit 57203f62 authored by duanruiming's avatar duanruiming

[update] 态势监测-数据分组通过bathtime

parent d44136f3
......@@ -1706,9 +1706,9 @@ public class TrendServiceImpl implements TrendService {
.between(CrossDirDataHistPO::getBatchTime, abnormalCrossListVO.getBatchTime() - 3600, abnormalCrossListVO.getBatchTime());
List<CrossDirDataHistPO> histPOS = crossDirDataHistMapper.selectList(histQuery);
if (!CollectionUtils.isEmpty(histPOS)) {
Map<Date, List<CrossDirDataHistPO>> map = histPOS.stream().collect(Collectors.groupingBy(CrossDirDataHistPO::getStartTime));
Map<Integer, List<CrossDirDataHistPO>> map = histPOS.stream().collect(Collectors.groupingBy(CrossDirDataHistPO::getBatchTime));
if (!map.isEmpty()) {
for (Map.Entry<Date, List<CrossDirDataHistPO>> entry : map.entrySet()) {
for (Map.Entry<Integer, List<CrossDirDataHistPO>> entry : map.entrySet()) {
HotspotCrossVO hotspotCrossVO = new HotspotCrossVO();
List<CrossDirDataHistPO> value = entry.getValue();
if (!CollectionUtils.isEmpty(value)) {
......@@ -1722,7 +1722,7 @@ public class TrendServiceImpl implements TrendService {
dirDetails.add(dirDetail);
}
hotspotCrossVO.setDetailList(dirDetails);
hotspotCrossVO.setTimeStamp(entry.getKey());
hotspotCrossVO.setTimeStamp(new Date(entry.getKey()));
hotspotCrossVO.setCrossId(abnormalCrossListVO.getId());
hotspotCrossVOS.add(hotspotCrossVO);
}
......@@ -1794,9 +1794,9 @@ public class TrendServiceImpl implements TrendService {
List<CrossLaneDataHistPOExt> crossLaneDataHistPOS =
crossLaneDataHistMapper.selectByCrossIdAndTimeSpan(crossId, (int) (dateTime - 3600), (int) dateTime);
if (!CollectionUtils.isEmpty(crossLaneDataHistPOS)) {
Map<Date, List<CrossLaneDataHistPOExt>> collect = crossLaneDataHistPOS.stream().collect(Collectors.groupingBy(CrossLaneDataHistPOExt::getStartTime));
for (Map.Entry<Date, List<CrossLaneDataHistPOExt>> entry : collect.entrySet()) {
Date timeStamp = entry.getKey();
Map<Integer, List<CrossLaneDataHistPOExt>> collect = crossLaneDataHistPOS.stream().collect(Collectors.groupingBy(CrossLaneDataHistPOExt::getBatchTime));
for (Map.Entry<Integer, List<CrossLaneDataHistPOExt>> entry : collect.entrySet()) {
Integer timeStamp = entry.getKey();
List<CrossLaneDataHistPOExt> value = entry.getValue();
Map<Integer, List<CrossLaneDataHistPOExt>> dirLaneMap = value.stream().collect(Collectors.groupingBy(CrossLaneDataHistPOExt::getDir));
for (Map.Entry<Integer, List<CrossLaneDataHistPOExt>> dirEntry : dirLaneMap.entrySet()) {
......@@ -1814,7 +1814,7 @@ public class TrendServiceImpl implements TrendService {
}
hotspotCrossLaneVO.setCrossId(crossId);
hotspotCrossLaneVO.setDir(dir);
hotspotCrossLaneVO.setTimeStamp(timeStamp);
hotspotCrossLaneVO.setTimeStamp(new Date(timeStamp));
hotspotCrossLaneVO.setTurnList(laneDetails);
results.add(hotspotCrossLaneVO);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment