【实训步骤对象】

This commit is contained in:
weizhihong 2022-08-22 09:08:35 +08:00
parent b6fd23d036
commit f9276e2632

View File

@ -83,6 +83,9 @@ public class Step2 {
this.simulationMember = simulation.getSimulationMemberById(vo.getMemberId());
}
this.operations = vo.getOperations().stream().map(o -> {
if (o instanceof Operation2VO.SimOperation2VO) {
return new Operation2.SimOperation2((Operation2VO.SimOperation2VO) o, simulation);
} else {
Valuable t = null;
if (o.getTriggerCondition() != null) {
t = o.getTriggerCondition().convert2BO(simulation.getRepository());
@ -91,9 +94,6 @@ public class Step2 {
if (o.getCompletionCondition() != null) {
c = o.getCompletionCondition().convert2BO(simulation.getRepository());
}
if (o instanceof Operation2VO.SimOperation2VO) {
return new Operation2.SimOperation2((Operation2VO.SimOperation2VO) o, simulation);
} else {
return new Operation2.ClientOperation2(t, c);
}
}).collect(Collectors.toList());