信号机添加<所属车站>绘图属性;交出控制权添加<控制权所属校验>
This commit is contained in:
parent
35409a3901
commit
ad529992af
@ -77,7 +77,8 @@ public class AtsRouteService {
|
||||
String.format("信号机[%s(%s)]没有已锁闭进路,不能设置联锁自动进路", signal.getName(), signal.getCode()));
|
||||
}
|
||||
if (!lockedRoute.isFlt()) {
|
||||
throw new SimulationException(SimulationExceptionType.Unsupported_Operation);
|
||||
throw new SimulationException(SimulationExceptionType.Unsupported_Operation,
|
||||
String.format("进路[%s]不能设置车队进路", lockedRoute.getCode()));
|
||||
}
|
||||
if (lockedRoute.isCiControl()) {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Conflict,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package club.joylink.rtss.simulation.cbtc.ATS.service;
|
||||
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.ATSMessageCollectAndDispatcher;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
@ -285,6 +286,11 @@ public class AtsStationService {
|
||||
} else {
|
||||
deviceStation = station.getDeviceStation();
|
||||
}
|
||||
//确认控制权现在属于该成员
|
||||
BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue((member.isDispatcher() && station.isCenterControl())
|
||||
|| (member.isStationSupervisor() && station.isStandControl()),
|
||||
String.format("车站[%s]所属设备集中站[%s]当前控制权不在成员[%s]手中", station.getCode(), deviceStation.getCode(), member.getId()));
|
||||
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
Set<Station> stations = repository.getStationsByDeviceStations(deviceStation);
|
||||
stations.forEach(Station::surrenderControl);
|
||||
|
@ -52,6 +52,9 @@ public class MapSignalNewVO {
|
||||
@NotBlank(message = "所属区段编码不能为空")
|
||||
private String sectionCode;
|
||||
|
||||
@ApiModelProperty(value = "所属车站编码")
|
||||
private String belongStationCode;
|
||||
|
||||
/**
|
||||
* 所属车站 编号
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user