From e3532ea8b4233a6edf1b34a9cd43f6217c89a1fc Mon Sep 17 00:00:00 2001 From: weizhihong Date: Tue, 26 Jul 2022 09:35:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simulation/cbtc/member/MemberManager.java | 15 ++++++++------- .../simulation/cbtc/member/SimulationMember.java | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/member/MemberManager.java b/src/main/java/club/joylink/rtss/simulation/cbtc/member/MemberManager.java index 6f06a165c..8d35ff7be 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/member/MemberManager.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/member/MemberManager.java @@ -17,6 +17,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; +import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -51,13 +52,13 @@ public class MemberManager { // 大铁CTC if (simulation.getRepository().getConfig().isRailway()) { // this.addRole(simulation, SimulationMember.Type.RAIL_CTC, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_ASSISTANT, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_MASTER, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_SIGNALER, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_PASSENGER, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_SWITCH_MAN, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_FACILITATOR, null, station); - this.addRole(simulation, SimulationMember.Type.STATION_WORKER, null, station); + this.addRole(simulation, SimulationMember.Type.DEVICE_MANAGER); + Arrays.asList( + SimulationMember.Type.STATION_ASSISTANT, SimulationMember.Type.STATION_MASTER, + SimulationMember.Type.STATION_SIGNALER, SimulationMember.Type.STATION_PASSENGER, + SimulationMember.Type.STATION_SWITCH_MAN, SimulationMember.Type.STATION_FACILITATOR, + SimulationMember.Type.STATION_WORKER + ).forEach(type -> this.addRole(simulation, type, station.getName(), station)); } } // 司机 diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/member/SimulationMember.java b/src/main/java/club/joylink/rtss/simulation/cbtc/member/SimulationMember.java index 2246c22bf..a47244095 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/member/SimulationMember.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/member/SimulationMember.java @@ -177,6 +177,8 @@ public class SimulationMember extends club.joylink.rtss.simulation.SimulationMem STATION_FACILITATOR, /*** 车站工务工*/ STATION_WORKER, + /*** 设备管理员 **/ + DEVICE_MANAGER, } public enum Gender {