Commit b9b4bb6d authored by duwei's avatar duwei

/opt/runningEvaluate/scopeTree 接口优化

parent 16b02b9e
...@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil; ...@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.wanji.common.enums.CrossStatusEnum; import net.wanji.common.enums.CrossStatusEnum;
import net.wanji.common.enums.TurnConvertEnum; import net.wanji.common.enums.TurnConvertEnum;
...@@ -836,9 +837,14 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService { ...@@ -836,9 +837,14 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
List<RunningEvaluateScopeTreeVO.TurnVO> res = new ArrayList<>(); List<RunningEvaluateScopeTreeVO.TurnVO> res = new ArrayList<>();
List<CrossTurnInfoPO> crossTurnInfoPOList = baseCrossTurnInfoMapper.selectByCrossIdAndDir(crossId, dir); List<CrossTurnInfoPO> crossTurnInfoPOList = baseCrossTurnInfoMapper.selectByCrossIdAndDir(crossId, dir);
Map<String, Boolean> m = Maps.newHashMap();
for (CrossTurnInfoPO crossTurnInfoPO : crossTurnInfoPOList) { for (CrossTurnInfoPO crossTurnInfoPO : crossTurnInfoPOList) {
RunningEvaluateScopeTreeVO.TurnVO turnVO = new RunningEvaluateScopeTreeVO.TurnVO(); RunningEvaluateScopeTreeVO.TurnVO turnVO = new RunningEvaluateScopeTreeVO.TurnVO();
String turnType = crossTurnInfoPO.getTurnType(); String turnType = crossTurnInfoPO.getTurnType();
if (m.get(turnType) != null){
continue;
}
m.put(turnType, true);
turnVO.setTurn(turnType); turnVO.setTurn(turnType);
List<RunningEvaluateScopeTreeVO.LaneVO> laneVOList = buildLaneVOList(crossId, dir, turnType); List<RunningEvaluateScopeTreeVO.LaneVO> laneVOList = buildLaneVOList(crossId, dir, turnType);
turnVO.setChild(laneVOList); turnVO.setChild(laneVOList);
......
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