Commit 79698683 authored by duanruiming's avatar duanruiming

[update] 优化车道周期查询

parent e3ca3dd3
......@@ -1357,10 +1357,6 @@ public class TrendServiceImpl implements TrendService {
private List<TableQueryVO.CycleDataElement> buildCycleData(String crossId, List<CrossLaneDataHistPOExt> poExtList) {
List<TableQueryVO.CycleDataElement> res = new ArrayList<>();
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();
......@@ -1411,17 +1407,10 @@ public class TrendServiceImpl implements TrendService {
vo.setPedFlow(pedFlow);
vo.setAllFlow(pedFlow + pedFlow + po.getNonMotorFlow() + po.getFlow());
vo.setAllVehiceleFlow(po.getFlow() + po.getNonMotorFlow());
Integer turn = null;
for (CrossBaseLaneInfoPO crossBaseLaneInfoPO : crossBaseLaneInfoPOS) {
if (StringUtils.equalsIgnoreCase(laneId, crossBaseLaneInfoPO.getId())) {
turn = crossBaseLaneInfoPO.getTurn();
}
}
vo.setTurn(turn);
vo.setTurn(po.getTurn());
String dirName = BaseEnum.SignalDirectionEnum.getNameByCode(po.getDir());
String turnName = TurnConvertEnum.getDescByKey(turn);
String turnName = TurnConvertEnum.getDescByKey(po.getTurn());
vo.setLaneSort(String.join("-", dirName, turnName, String.valueOf(po.getSort())));
res.add(vo);
......
......@@ -103,7 +103,7 @@
</select>
<select id="selectByCrossIdAndTimeSpan" resultType="net.wanji.databus.po.CrossLaneDataHistPOExt">
SELECT t1.id, t2.dir, t2.sort, t1.flow, t1.speed, t1.queue_length, t1.delay_time, t1.stop_times,
SELECT t1.id, t2.dir,t2.turn, t2.sort, t1.flow, t1.speed, t1.queue_length, t1.delay_time, t1.stop_times,
t1.vehhead_time, t1.batch_time, t1.time_occupancy, t1.vehicle_nums_ratio_mean, t1.start_time,
t1.traffic_flow_A, t1.traffic_flow_B, t1.traffic_flow_C,t1.v_85, t1.non_motor_flow, t1.time_occupancy
FROM t_lane_data_hist t1 JOIN t_base_lane_info t2 ON t1.id = t2.id
......
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