修改Dom配置;修改地图功能生成的Dom配置
This commit is contained in:
parent
f77404029b
commit
8e1bf07869
@ -65,6 +65,15 @@ public class MapFunctionController {
|
|||||||
rtsMapFunctionService.delete(id);
|
rtsMapFunctionService.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除地图功能
|
||||||
|
*/
|
||||||
|
@Role(RoleEnum.Admin)
|
||||||
|
@DeleteMapping("/batch/{mapId}")
|
||||||
|
public void batchDelete(@PathVariable long mapId) {
|
||||||
|
rtsMapFunctionService.batchDelete(mapId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新地图系统(新)
|
* 更新地图系统(新)
|
||||||
*/
|
*/
|
||||||
|
@ -40,4 +40,9 @@ public interface RtsMapFunctionService {
|
|||||||
* @return 一些特殊的,但是算不上异常的信息
|
* @return 一些特殊的,但是算不上异常的信息
|
||||||
*/
|
*/
|
||||||
List<String> generateLpf(long mapId, long creatorId);
|
List<String> generateLpf(long mapId, long creatorId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除地图下所有地图功能
|
||||||
|
*/
|
||||||
|
void batchDelete(long mapId);
|
||||||
}
|
}
|
||||||
|
@ -169,6 +169,13 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return msgList;
|
return msgList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batchDelete(long mapId) {
|
||||||
|
RtsMapFunctionExample rtsMapFunctionExample = new RtsMapFunctionExample();
|
||||||
|
rtsMapFunctionExample.createCriteria().andMapIdEqualTo(mapId);
|
||||||
|
rtsMapFunctionDAO.deleteByExample(rtsMapFunctionExample);
|
||||||
|
}
|
||||||
|
|
||||||
private RtsMapFunctionCreateVO buildCreateVO(long mapId, String name, String desc, Simulation.Type simType,
|
private RtsMapFunctionCreateVO buildCreateVO(long mapId, String name, String desc, Simulation.Type simType,
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap, SimulationWorkParamVO.DomConfigVO domConfig) {
|
Map<SimulationWorkParamVO.Item, String> itemMap, SimulationWorkParamVO.DomConfigVO domConfig) {
|
||||||
RtsMapFunctionCreateVO createVO = new RtsMapFunctionCreateVO();
|
RtsMapFunctionCreateVO createVO = new RtsMapFunctionCreateVO();
|
||||||
@ -214,7 +221,8 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleRoleType(true)
|
.singleMember(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
||||||
@ -232,7 +240,8 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleRoleType(true)
|
.singleMember(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, stationSupervisorOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, stationSupervisorOptional.get().getId());
|
||||||
@ -253,7 +262,8 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleRoleType(true)
|
.singleMember(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, memberOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, memberOptional.get().getId());
|
||||||
@ -273,6 +283,7 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleMember(true)
|
.singleMember(true)
|
||||||
.hasTraining(true)
|
.hasTraining(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
||||||
@ -292,6 +303,7 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleMember(true)
|
.singleMember(true)
|
||||||
.hasTraining(true)
|
.hasTraining(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, stationSupervisorOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, stationSupervisorOptional.get().getId());
|
||||||
@ -309,7 +321,6 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleMember(true)
|
|
||||||
.hasExam(true)
|
.hasExam(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
@ -328,7 +339,6 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleMember(true)
|
|
||||||
.hasExam(true)
|
.hasExam(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
@ -351,6 +361,7 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.isJoint(true)
|
.isJoint(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
||||||
};
|
};
|
||||||
@ -369,7 +380,9 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.trainingDesign(true).build();
|
.trainingDesign(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
|
.build();
|
||||||
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -416,7 +429,8 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleRoleType(true)
|
.singleMember(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
||||||
@ -434,7 +448,8 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.singleRoleType(true)
|
.singleMember(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
Map<SimulationWorkParamVO.Item, String> itemMap = new HashMap<>();
|
||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, stationSupervisorOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, stationSupervisorOptional.get().getId());
|
||||||
@ -456,6 +471,7 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.isJoint(true)
|
.isJoint(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
.build();
|
.build();
|
||||||
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
||||||
};
|
};
|
||||||
@ -474,7 +490,9 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
|||||||
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
itemMap.put(SimulationWorkParamVO.Item.DEFAULT_MEMBER, dispatcherOptional.get().getId());
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
SimulationWorkParamVO.DomConfigVO domConfig = SimulationWorkParamVO.DomConfigVO.builder()
|
||||||
.trainingDesign(true).build();
|
.trainingDesign(true)
|
||||||
|
.hasMemberManager(true)
|
||||||
|
.build();
|
||||||
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
return buildCreateVO(mapId, name, name, simType, itemMap, domConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,6 +85,9 @@ public class SimulationWorkParamVO {
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
public static class DomConfigVO {
|
public static class DomConfigVO {
|
||||||
|
/**
|
||||||
|
* 单成员类型
|
||||||
|
*/
|
||||||
private boolean singleMember;
|
private boolean singleMember;
|
||||||
|
|
||||||
private boolean singleClient;
|
private boolean singleClient;
|
||||||
@ -108,8 +111,8 @@ public class SimulationWorkParamVO {
|
|||||||
private boolean hasDeviceManager;
|
private boolean hasDeviceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单角色类型仿真
|
* 有成员管理功能?
|
||||||
*/
|
*/
|
||||||
private boolean singleRoleType;
|
private boolean hasMemberManager;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user