【草稿发布功能修改】

【仿真数据加载逻辑修改】

Signed-off-by: weizhihong <weizhihong@joylink.club>
This commit is contained in:
weizhihong 2022-04-24 13:02:08 +08:00
parent 9d7a9422d0
commit ce25b8458d
3 changed files with 35 additions and 37 deletions

View File

@ -97,8 +97,11 @@ public class DraftMapService implements IDraftMapService {
@Autowired @Autowired
private DraftMapRouteService draftMapRouteService; private DraftMapRouteService draftMapRouteService;
@Autowired
private IAssistButtonIndicatorService assistButtonIndicatorService;
@Override @Override
public List<DraftMapVO> list( AccountVO accountVO) { public List<DraftMapVO> list(AccountVO accountVO) {
DraftMapExample example = new DraftMapExample(); DraftMapExample example = new DraftMapExample();
DraftMapExample.Criteria criteria = example.createCriteria(); DraftMapExample.Criteria criteria = example.createCriteria();
if (Objects.nonNull(accountVO)) { if (Objects.nonNull(accountVO)) {
@ -505,6 +508,9 @@ public class DraftMapService implements IDraftMapService {
flankProtectionExample.createCriteria().andMapIdEqualTo(id); flankProtectionExample.createCriteria().andMapIdEqualTo(id);
List<DraftMapRouteFlankProtection> draftMapRouteFlankProtections = this.draftMapRouteFlankProtectionDAO.selectByExampleWithBLOBs(flankProtectionExample); List<DraftMapRouteFlankProtection> draftMapRouteFlankProtections = this.draftMapRouteFlankProtectionDAO.selectByExampleWithBLOBs(flankProtectionExample);
logicDataVO.setFlankProtectionList(MapRouteFlankProtectionNewVO.convert2VOList(draftMapRouteFlankProtections)); logicDataVO.setFlankProtectionList(MapRouteFlankProtectionNewVO.convert2VOList(draftMapRouteFlankProtections));
// 获取指示灯按钮等关联关系
logicDataVO.setIndicatorButtonVOList(assistButtonIndicatorService.queryAllIndicatorSectionByMapId(id));
return logicDataVO; return logicDataVO;
} }

View File

@ -2,7 +2,6 @@ package club.joylink.rtss.services.draftData;
import club.joylink.rtss.dao.*; import club.joylink.rtss.dao.*;
import club.joylink.rtss.entity.*; import club.joylink.rtss.entity.*;
import club.joylink.rtss.services.IAssistButtonIndicatorService;
import club.joylink.rtss.util.JsonUtils; import club.joylink.rtss.util.JsonUtils;
import club.joylink.rtss.vo.map.MapLogicDataNewVO; import club.joylink.rtss.vo.map.MapLogicDataNewVO;
import club.joylink.rtss.vo.map.MapVO; import club.joylink.rtss.vo.map.MapVO;
@ -54,9 +53,6 @@ public class DraftMapServiceImpl implements DraftMapService {
@Autowired @Autowired
private DraftMapSignalApproachSectionService draftMapSignalApproachSectionService; private DraftMapSignalApproachSectionService draftMapSignalApproachSectionService;
@Autowired
private IAssistButtonIndicatorService assistButtonIndicatorService;
@Override @Override
public MapVO getDraftMapData(Long mapId) { public MapVO getDraftMapData(Long mapId) {
DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(mapId); DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(mapId);
@ -80,8 +76,6 @@ public class DraftMapServiceImpl implements DraftMapService {
// logicDataNew.setRoutingList(); 待补 // logicDataNew.setRoutingList(); 待补
logicDataNew.setSignalApproachSectionList(draftMapSignalApproachSectionService.queryAll(mapId)); logicDataNew.setSignalApproachSectionList(draftMapSignalApproachSectionService.queryAll(mapId));
// 获取指示灯按钮等关联关系
logicDataNew.setIndicatorButtonVOList(assistButtonIndicatorService.queryAllIndicatorSectionByMapId(mapId));
map.setLogicDataNew(logicDataNew); map.setLogicDataNew(logicDataNew);
return map; return map;
} }

View File

@ -149,8 +149,6 @@ public class SimulationLifeCycleServiceImpl implements SimulationLifeCycleServic
queryVO.setMapId(params.getMap().getId()); queryVO.setMapId(params.getMap().getId());
List<IscsSystemResourcesVO> resourceList = iscsSystemResourcesService.criteriaQuery(queryVO); List<IscsSystemResourcesVO> resourceList = iscsSystemResourcesService.criteriaQuery(queryVO);
params.getMap().setIscsSystemResourceList(resourceList); params.getMap().setIscsSystemResourceList(resourceList);
// 获取指示灯按钮等关联关系
params.getMap().getLogicDataNew().setIndicatorButtonVOList(assistButtonIndicatorService.queryAllIndicatorSectionByMapId(params.getMap().getId()));
Simulation simulation = SimulationBuilder.build(group, params); Simulation simulation = SimulationBuilder.build(group, params);
// 缓存 // 缓存