Commit 040fc9da authored by hanbing's avatar hanbing

方案管理-灯组配置-保存灯组设置、车道配置兼容灯组号为null

parent 4f092af8
...@@ -110,14 +110,15 @@ public class CrossConfigServiceImpl implements CrossConfigService { ...@@ -110,14 +110,15 @@ public class CrossConfigServiceImpl implements CrossConfigService {
LaneInfoPO laneInfoPO = laneInfoMapper.selectByCrossIdDirCode(crossId, dir, code); LaneInfoPO laneInfoPO = laneInfoMapper.selectByCrossIdDirCode(crossId, dir, code);
String laneId = laneInfoPO.getId(); String laneId = laneInfoPO.getId();
CrossLaneLightsPO crossLaneLightsPO = new CrossLaneLightsPO(); CrossLaneLightsPO crossLaneLightsPO = new CrossLaneLightsPO();
// 根据路口ID和灯组代码获取灯组ID
String ledNum = laneListElement.getLedNum();
CrossLightsPO crossLightsPO = crossLightsMapper.selectByCrossIdAndLedNum(crossId, ledNum);
Integer lightsId = crossLightsPO.getId();
crossLaneLightsPO.setLightsId(lightsId);
crossLaneLightsPO.setLaneId(laneId); crossLaneLightsPO.setLaneId(laneId);
crossLaneLightsPO.setCrossId(crossId); crossLaneLightsPO.setCrossId(crossId);
// 根据路口ID和灯组代码获取灯组ID
String ledNum = laneListElement.getLedNum();
if (ledNum != null) {
CrossLightsPO crossLightsPO = crossLightsMapper.selectByCrossIdAndLedNum(crossId, ledNum);
Integer lightsId = crossLightsPO.getId();
crossLaneLightsPO.setLightsId(lightsId);
}
crossLaneLightsPOList.add(crossLaneLightsPO); crossLaneLightsPOList.add(crossLaneLightsPO);
} }
} }
...@@ -314,7 +315,9 @@ public class CrossConfigServiceImpl implements CrossConfigService { ...@@ -314,7 +315,9 @@ public class CrossConfigServiceImpl implements CrossConfigService {
// 根据laneId获取灯组代码 // 根据laneId获取灯组代码
String laneId = laneInfoPO.getId(); String laneId = laneInfoPO.getId();
String lightsCode = crossLaneLightsMapper.selectLightsCodeByLaneId(laneId); String lightsCode = crossLaneLightsMapper.selectLightsCodeByLaneId(laneId);
laneListElement.setLedNum(lightsCode); if (lightsCode != null) {
laneListElement.setLedNum(lightsCode);
}
laneListElementList.add(laneListElement); laneListElementList.add(laneListElement);
} }
dirListElement.setLaneList(laneListElementList); dirListElement.setLaneList(laneListElementList);
......
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