增加<添加行值角色>功能;添加ATP进路<可以自动追踪>字段的判断、赋值
This commit is contained in:
parent
358d8ce130
commit
11d5f6168b
@ -451,6 +451,10 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
if (!CollectionUtils.isEmpty(atpRouteList)) {
|
if (!CollectionUtils.isEmpty(atpRouteList)) {
|
||||||
for (Route route : atpRouteList) {
|
for (Route route : atpRouteList) {
|
||||||
route.setAtp(true);
|
route.setAtp(true);
|
||||||
|
if ((signal.isRight() && signal.getSection().isRightLine())
|
||||||
|
|| (!signal.isRight() && signal.getSection().isLeftLine())) {
|
||||||
|
route.setArs(true);
|
||||||
|
}
|
||||||
routeList.add(route);
|
routeList.add(route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import club.joylink.rtss.simulation.cbtc.communication.vo.fault.DeviceFaultInfo;
|
|||||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.DestinationCodeDefinition;
|
import club.joylink.rtss.simulation.cbtc.data.map.DestinationCodeDefinition;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.MapElement;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.MayOutOfOrderDevice;
|
import club.joylink.rtss.simulation.cbtc.data.map.MayOutOfOrderDevice;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.plan.TripPlan;
|
import club.joylink.rtss.simulation.cbtc.data.plan.TripPlan;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.storage.StorageSimulation;
|
import club.joylink.rtss.simulation.cbtc.data.storage.StorageSimulation;
|
||||||
@ -780,7 +781,10 @@ public class GroupSimulationServiceImpl implements GroupSimulationService {
|
|||||||
@Override
|
@Override
|
||||||
public SimulationMemberVO addMember(String group, MemberAddParamVO param) {
|
public SimulationMemberVO addMember(String group, MemberAddParamVO param) {
|
||||||
Simulation simulation = this.getSimulationByGroup(group);
|
Simulation simulation = this.getSimulationByGroup(group);
|
||||||
SimulationMember member = this.memberManager.addRole(simulation, param.getType(), param.getName());
|
MapElement mapElement = null;
|
||||||
|
if (StringUtils.hasText(param.getDeviceCode()))
|
||||||
|
mapElement = simulation.getRepository().getByCode(param.getDeviceCode());
|
||||||
|
SimulationMember member = this.memberManager.addRole(simulation, param.getType(), param.getName(), mapElement);
|
||||||
return new SimulationMemberVO(member);
|
return new SimulationMemberVO(member);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public interface SimulationConstants {
|
|||||||
int TL_LOOP_RATE = 300;
|
int TL_LOOP_RATE = 300;
|
||||||
|
|
||||||
/** 虚拟真实列车运行逻辑频率(单位ms) */
|
/** 虚拟真实列车运行逻辑频率(单位ms) */
|
||||||
int TRAIN_RUNNING_RATE = 1000/60;
|
int TRAIN_RUNNING_RATE = 1000/50;
|
||||||
|
|
||||||
/** 联锁CI循环逻辑频率(单位ms) */
|
/** 联锁CI循环逻辑频率(单位ms) */
|
||||||
int CI_LOOP_RATE = 500;
|
int CI_LOOP_RATE = 500;
|
||||||
|
@ -94,10 +94,7 @@ public class MemberManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SimulationMember addRole(Simulation simulation, SimulationMember.Type type, String name) {
|
public SimulationMember addRole(Simulation simulation, SimulationMember.Type type, String name) {
|
||||||
SimulationMember member = this.addRole(simulation, type, name, null);
|
return this.addRole(simulation, type, name, null);
|
||||||
SimulationMemberAddEvent memberAddEvent = new SimulationMemberAddEvent(this, simulation, member);
|
|
||||||
this.applicationContext.publishEvent(memberAddEvent);
|
|
||||||
return member;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimulationMember addRole(Simulation simulation,
|
public SimulationMember addRole(Simulation simulation,
|
||||||
@ -128,6 +125,8 @@ public class MemberManager {
|
|||||||
SimulationMember member = new SimulationMember(simulation.getIdGenerator().nextMemberId(), type, device);
|
SimulationMember member = new SimulationMember(simulation.getIdGenerator().nextMemberId(), type, device);
|
||||||
member.setName(name);
|
member.setName(name);
|
||||||
simulation.addSimulationMember(member);
|
simulation.addSimulationMember(member);
|
||||||
|
SimulationMemberAddEvent memberAddEvent = new SimulationMemberAddEvent(this, simulation, member);
|
||||||
|
this.applicationContext.publishEvent(memberAddEvent);
|
||||||
return member;
|
return member;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,12 @@ public class SimulationMemberVO {
|
|||||||
String id;
|
String id;
|
||||||
String userId;
|
String userId;
|
||||||
int sex;
|
int sex;
|
||||||
|
Object role;
|
||||||
|
|
||||||
public SimulationMemberVO(SimulationMember member) {
|
public SimulationMemberVO(SimulationMember member) {
|
||||||
this.id = member.getId();
|
this.id = member.getId();
|
||||||
this.userId = member.getUserId();
|
this.userId = member.getUserId();
|
||||||
this.sex = member.getSex();
|
this.sex = member.getSex();
|
||||||
|
this.role = member.getRole();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,6 @@ public class MemberAddParamVO {
|
|||||||
@ApiModelProperty("要添加的成员的名字")
|
@ApiModelProperty("要添加的成员的名字")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
private String deviceCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user