Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1

This commit is contained in:
xzb 2022-08-26 11:30:37 +08:00
commit 410deb28e3
2 changed files with 25 additions and 0 deletions

View File

@ -149,8 +149,23 @@ public abstract class Operation2 {
@Getter
public static class ClientOperation2 extends Operation2 {
private String deviceCode;
private String operationType;
private String domId;
private String cmdType;
private String params;
public ClientOperation2(Operation2VO.ClientOperation2VO vo, Simulation simulation) {
super(vo.getId());
this.deviceCode = vo.getDeviceCode();
this.operationType = vo.getOperationType();
this.domId = vo.getDomId();
this.cmdType = vo.getCmdType();
this.params = vo.getParams();
if (vo.getTriggerCondition() != null) {
this.setTriggerCondition(vo.getTriggerCondition().convert2BO(simulation.getRepository()));
}

View File

@ -66,6 +66,16 @@ public abstract class Operation2VO {
@Setter
@NoArgsConstructor
public static class ClientOperation2VO extends Operation2VO {
private String deviceCode;
private String operationType;
private String domId;
private String cmdType;
private String params;
@Override
public Operation2 convert2BO(Simulation simulation) {
return new Operation2.ClientOperation2(this, simulation);