【增加点击初始化清除人员操作,编制时找不到列车问题】
This commit is contained in:
parent
28c74a75cd
commit
700d95e4a7
File diff suppressed because it is too large
Load Diff
@ -310,6 +310,9 @@ public class SimulationDataRepository {
|
|||||||
|
|
||||||
public MapElement getByCode(String code) {
|
public MapElement getByCode(String code) {
|
||||||
MapElement mapElement = this.deviceMap.get(code);
|
MapElement mapElement = this.deviceMap.get(code);
|
||||||
|
if (Objects.isNull(mapElement)) {
|
||||||
|
mapElement = this.vrDeviceMap.get(code);
|
||||||
|
}
|
||||||
if (Objects.isNull(mapElement)) {
|
if (Objects.isNull(mapElement)) {
|
||||||
throw new SimulationException(SimulationExceptionType.System_Fault,
|
throw new SimulationException(SimulationExceptionType.System_Fault,
|
||||||
String.format("地图数据异常:不存在code为[%s]的数据", code));
|
String.format("地图数据异常:不存在code为[%s]的数据", code));
|
||||||
|
@ -314,15 +314,18 @@ public class MemberManager {
|
|||||||
}
|
}
|
||||||
// 删除在原始数据中不存在的成员
|
// 删除在原始数据中不存在的成员
|
||||||
List<SimulationMember> members = simulation.getSimulationMembers();
|
List<SimulationMember> members = simulation.getSimulationMembers();
|
||||||
|
Map<String, SimulationMember> simMemberMap = new HashMap<>(members.size());
|
||||||
for (SimulationMember m : members) {
|
for (SimulationMember m : members) {
|
||||||
if (!originMemberMap.containsKey(m.getId())) {
|
simMemberMap.put(m.getId(), m);
|
||||||
simulation.removeSimulationMember(m.getId());
|
if (originMemberMap.containsKey(m.getId())) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
simulation.removeSimulationMember(m.getId());
|
||||||
}
|
}
|
||||||
// 加入额外的成员
|
// 加入额外的成员
|
||||||
if (!CollectionUtils.isEmpty(memberPOS)) {
|
if (!CollectionUtils.isEmpty(memberPOS)) {
|
||||||
for (SimulationMemberPO p : memberPOS) {
|
for (SimulationMemberPO p : memberPOS) {
|
||||||
if (originMemberMap.containsKey(p.getId())) {
|
if (simMemberMap.containsKey(p.getId())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
MapElement mapElement = null;
|
MapElement mapElement = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user