Commit 666fadc9 authored by duanruiming's avatar duanruiming

[update] 济南测试平台-添加行人流量和总流量

parent dcc89789
......@@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import net.wanji.common.enums.*;
import net.wanji.common.framework.Constants;
import net.wanji.common.utils.tool.CrossUtil;
import net.wanji.common.utils.tool.StringUtils;
import net.wanji.databus.bo.CrossIdBO;
......@@ -1338,9 +1339,14 @@ public class TrendServiceImpl implements TrendService {
LambdaQueryWrapper<CrossBaseLaneInfoPO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CrossBaseLaneInfoPO::getCrossId, crossId);
List<CrossBaseLaneInfoPO> crossBaseLaneInfoPOS = crossBaseLaneInfoMapper.selectList(queryWrapper);
int pedFlow = 0;
for (CrossLaneDataHistPOExt po : poExtList) {
TableQueryVO.CycleDataElement vo = new TableQueryVO.CycleDataElement();
if (po.getId().contains(crossId.concat(Constants.SystemParam.SEPARATOR_MINUS))) {
pedFlow += po.getFlow();
}
String laneId = po.getId();
Integer batchTime = po.getBatchTime();
// 将10位时间戳转换为毫秒
......@@ -1382,6 +1388,9 @@ public class TrendServiceImpl implements TrendService {
vo.setTrafficFlowC(po.getTrafficFlowC());
vo.setNonMotorFlow(po.getNonMotorFlow());
vo.setV85(po.getV85());
vo.setPedFlow(pedFlow);
vo.setAllFlow(pedFlow + pedFlow + po.getNonMotorFlow());
Integer turn = null;
for (CrossBaseLaneInfoPO crossBaseLaneInfoPO : crossBaseLaneInfoPOS) {
if (StringUtils.equalsIgnoreCase(laneId, crossBaseLaneInfoPO.getId())) {
......
......@@ -96,5 +96,9 @@ public class TableQueryVO {
private double v85;
@ApiModelProperty(value = "非机动车流量")
private int nonMotorFlow;
@ApiModelProperty(value = "行人流量")
private int pedFlow;
@ApiModelProperty(value = "总流量")
private int allFlow;
}
}
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