Commit f27b9666 authored by duanruiming's avatar duanruiming

[update] review-代码逻辑优化

parent 29b884c4
...@@ -2052,7 +2052,7 @@ public class TrendServiceImpl implements TrendService { ...@@ -2052,7 +2052,7 @@ public class TrendServiceImpl implements TrendService {
resultPojo.setDirName(BaseEnum.SignalDirectionEnum.getNameByCode(dir)); resultPojo.setDirName(BaseEnum.SignalDirectionEnum.getNameByCode(dir));
resultPojo.setOverflowId(String.valueOf(dir)); resultPojo.setOverflowId(String.valueOf(dir));
resultPojo.setOverflowNums(overflowNums); resultPojo.setOverflowNums(overflowNums);
resultPojo.setSpeed(Math.round(meanV / dirList.size() * 100) / 100); resultPojo.setSpeed( Math.round((meanV / dirList.size()) * 100) / 100.0);
resultPojo.setVehicleLengthRatio(Math.round(vehicleLengthRatio / dirList.size() * 100)); resultPojo.setVehicleLengthRatio(Math.round(vehicleLengthRatio / dirList.size() * 100));
return resultPojo; return resultPojo;
} }
...@@ -2064,9 +2064,7 @@ public class TrendServiceImpl implements TrendService { ...@@ -2064,9 +2064,7 @@ public class TrendServiceImpl implements TrendService {
int pageNum = laneSnapshotIndexVO.getPageNum(); int pageNum = laneSnapshotIndexVO.getPageNum();
boolean overFlow = laneSnapshotIndexVO.isOverFlow(); boolean overFlow = laneSnapshotIndexVO.isOverFlow();
// 查询秒级数据 // 查询秒级数据
List<CrossLaneSnapshotDataDTO> dtoList = return laneSnapshotDataQueryService.queryByCrossIdAndTimeSpan(crossId, start, end, pageNum, null, overFlow);
laneSnapshotDataQueryService.queryByCrossIdAndTimeSpan(crossId, start, end, pageNum, null, overFlow);
return dtoList;
} }
@Override @Override
......
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