Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1
This commit is contained in:
commit
070dcd41ec
@ -10,6 +10,7 @@ import club.joylink.rtss.simulation.cbtc.SimulationService;
|
|||||||
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
|
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
||||||
import club.joylink.rtss.vo.training2.rule.BgSceneStatusRule;
|
import club.joylink.rtss.vo.training2.rule.BgSceneStatusRule;
|
||||||
import club.joylink.rtss.vo.training2.rule.MapLocationRule;
|
import club.joylink.rtss.vo.training2.rule.MapLocationRule;
|
||||||
import club.joylink.rtss.vo.training2.rule.Training2Rule;
|
import club.joylink.rtss.vo.training2.rule.Training2Rule;
|
||||||
@ -82,8 +83,7 @@ public class Training2RuleService {
|
|||||||
}
|
}
|
||||||
List<PublishedTraining2WithBLOBs> training2WithBLOBs = new ArrayList<>(deviceList.size());
|
List<PublishedTraining2WithBLOBs> training2WithBLOBs = new ArrayList<>(deviceList.size());
|
||||||
for (MapNamedElement device : deviceList) {
|
for (MapNamedElement device : deviceList) {
|
||||||
simulation.reset();
|
simulationService.reset(groupId);
|
||||||
simulation.getRepository().vrDeviceReset();
|
|
||||||
training2WithBLOBs.add(training2Rule.convert2BO(simulation, device));
|
training2WithBLOBs.add(training2Rule.convert2BO(simulation, device));
|
||||||
}
|
}
|
||||||
// 新数据入库
|
// 新数据入库
|
||||||
@ -100,7 +100,7 @@ public class Training2RuleService {
|
|||||||
|
|
||||||
public void test(String groupId) {
|
public void test(String groupId) {
|
||||||
Simulation simulation = simulationManager.getById(groupId , Simulation.class);
|
Simulation simulation = simulationManager.getById(groupId , Simulation.class);
|
||||||
Stand stand = simulation.getRepository().getByCode("PF55602", Stand.class);
|
Switch aSwitch = simulation.getRepository().getByCode("W32728", Switch.class);
|
||||||
System.out.println(MapLocationRule.STATION_MAP_LOCATION.doHandle(simulation,stand));
|
System.out.println(aSwitch.isSingleLock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,6 @@ public enum MapDeviceRule {
|
|||||||
if (aSwitch.isSingleLock()) {
|
if (aSwitch.isSingleLock()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
aSwitch.setSingleLock(false);
|
|
||||||
return true;
|
return true;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
return generateRandomElement(switchList, 1);
|
return generateRandomElement(switchList, 1);
|
||||||
@ -144,7 +143,6 @@ public enum MapDeviceRule {
|
|||||||
if (aSwitch.isSingleLock()) {
|
if (aSwitch.isSingleLock()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
aSwitch.setSingleLock(false);
|
|
||||||
return true;
|
return true;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
return generateRandomElement(switchList, 1);
|
return generateRandomElement(switchList, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user