Commit cddbe853 authored by hanbing's avatar hanbing

方案管理-方案配置,灯组配置增加非机动车转向

parent 021b9fbe
......@@ -73,6 +73,15 @@ public class CrossConfigServiceImpl implements CrossConfigService {
MOTOR_VEH_MAP.put(4, 5);
MOTOR_VEH_MAP.put(5, 6);
}
// 非机动车灯数据库类型与前端类型对应关系
private static final Map<Integer, Integer> NON_MOTOR_VEH_MAP = new HashMap<>(5);
static {
MOTOR_VEH_MAP.put(10, 2);
MOTOR_VEH_MAP.put(11, 3);
MOTOR_VEH_MAP.put(12, 4);
MOTOR_VEH_MAP.put(13, 5);
MOTOR_VEH_MAP.put(14, 6);
}
private final CrossPhaseLightsMapper crossPhaseLightsMapper;
......@@ -178,7 +187,20 @@ public class CrossConfigServiceImpl implements CrossConfigService {
}
} else if (type == 2) { // 非机动车灯
if (signalType == 2) {
// 无转向的非机动车灯
crossLightsPO.setType(10);
} else if (signalType == 3) {
// 左转非机动车灯
crossLightsPO.setType(11);
} else if (signalType == 4) {
// 直行非机动车灯
crossLightsPO.setType(12);
} else if (signalType == 5) {
// 右转非机动车灯
crossLightsPO.setType(13);
} else if (signalType == 6) {
// 掉头非机动车灯
crossLightsPO.setType(14);
}
} else if (type == 3) { // 公交专用
if (signalType == 7) {
......@@ -267,7 +289,8 @@ public class CrossConfigServiceImpl implements CrossConfigService {
ledConfigListElement.setSignalType(signalType);
} else if (type >= 10 && type < 20) { // 非机动车灯
ledConfigListElement.setType(2);
ledConfigListElement.setSignalType(2);
Integer signalType = NON_MOTOR_VEH_MAP.get(type);
ledConfigListElement.setSignalType(signalType);
} else if (type >= 20 && type < 30) { // 行人灯
ledConfigListElement.setType(4);
ledConfigListElement.setSignalType(8);
......
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