消除报错

This commit is contained in:
joylink_zhangsai 2022-10-31 13:58:22 +08:00
parent 617e72bfb0
commit 784918e8f1
3 changed files with 30 additions and 11 deletions

View File

@ -169,7 +169,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行调成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(true, false, false, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.singleMember(true)
.build();
return buildCreateVO(mapId, name, name, simType, dispatcherOptional.get().getId(), domConfig);
};
//ATS现地工作站
@ -183,7 +185,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行值成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(true, false, false, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.singleMember(true)
.build();
return buildCreateVO(mapId, name, name, simType, stationSupervisorOptional.get().getId(), domConfig);
};
//司机模拟驾驶系统
@ -200,7 +204,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无司机角色未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(true, false, false, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.singleMember(true)
.build();
return buildCreateVO(mapId, name, name, simType, memberOptional.get().getId(), domConfig);
};
//ATS行调实训系统
@ -214,7 +220,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行调成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(false, false, true, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.hasTraining(true)
.build();
return buildCreateVO(mapId, name, name, simType, dispatcherOptional.get().getId(), domConfig);
};
//ATS现地实训系统
@ -228,7 +236,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行值成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(false, false, true, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.hasTraining(true)
.build();
return buildCreateVO(mapId, name, name, simType, stationSupervisorOptional.get().getId(), domConfig);
};
//ATS行调考试系统
@ -242,7 +252,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行调成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(false, false, false, true);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.hasExam(true)
.build();
return buildCreateVO(mapId, name, name, simType, dispatcherOptional.get().getId(), domConfig);
};
//ATS现地实训系统
@ -256,7 +268,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行值成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(false, false, false, true);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.hasExam(true)
.build();
return buildCreateVO(mapId, name, name, simType, stationSupervisorOptional.get().getId(), domConfig);
};
//综合演练
@ -270,7 +284,7 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行调成员未设置%s默认扮演成员", msgPrefix, name));
}
String memberId = dispatcherOptional.map(MapMemberVO::getId).orElse(null);
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(false, false, false, false);
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO();
return buildCreateVO(mapId, name, name, simType, memberId, domConfig);
};
@ -316,7 +330,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行调成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(true, false, false, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.singleMember(true)
.build();
return buildCreateVO(mapId, name, name, simType, dispatcherOptional.get().getId(), domConfig);
};
//车站
@ -330,7 +346,9 @@ public class RtsMapSystemServiceImpl implements RtsMapSystemService {
msgList.add(String.format("%s无行值成员未生成%s", msgPrefix, name));
return null;
}
SimulationWorkParamVO.DomConfigVO domConfig = new SimulationWorkParamVO.DomConfigVO(true, false, false, false);
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
.singleMember(true)
.build();
return buildCreateVO(mapId, name, name, simType, stationSupervisorOptional.get().getId(), domConfig);
};

View File

@ -71,6 +71,7 @@ public class SimulationWorkParamVO {
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class DomConfigVO {
private boolean singleMember;

View File

@ -59,7 +59,7 @@ class RtsMapSystemServiceImplTest {
createVO.setParamVO(paramVO);
paramVO.setType(simType);
paramVO.setMemberId(memberVO.getId());
paramVO.setDomConfig(new SimulationWorkParamVO.DomConfigVO(true, false, false, false));
paramVO.setDomConfig(SimulationWorkParamVO.DomConfigVO.builder().singleMember(true).build());
rtsMapSystemService.create(createVO, 42L);
RtsMapSystemQueryVO queryVO = new RtsMapSystemQueryVO();