Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
5e818e06ec
@ -34,8 +34,8 @@ public class AuthenticateInterceptor implements HandlerInterceptor {
|
|||||||
throws Exception {
|
throws Exception {
|
||||||
// 登陆权限验证
|
// 登陆权限验证
|
||||||
if(RequestMethod.OPTIONS.name().equals(request.getMethod())) return true;
|
if(RequestMethod.OPTIONS.name().equals(request.getMethod())) return true;
|
||||||
log.debug(String.format("request[Method: '%s', RequestURI: '%s']",
|
log.debug(String.format("request[%s %s from:%s]",
|
||||||
request.getMethod(), request.getRequestURI()));
|
request.getMethod(), request.getRequestURI(), request.getRemoteAddr()));
|
||||||
String token = request.getHeader("X-Token");
|
String token = request.getHeader("X-Token");
|
||||||
BusinessExceptionAssertEnum.NOT_LOGIN.assertTrue(StringUtils.hasText(token));
|
BusinessExceptionAssertEnum.NOT_LOGIN.assertTrue(StringUtils.hasText(token));
|
||||||
LoginUserInfoVO loginUserInfoVO = null;
|
LoginUserInfoVO loginUserInfoVO = null;
|
||||||
|
@ -342,38 +342,38 @@ public class DraftMapController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*-------------- 延续保护 ------------------*/
|
/*-------------- 延续保护 ------------------*/
|
||||||
|
//
|
||||||
@ApiOperation(value = "创建延续保护")
|
// @ApiOperation(value = "创建延续保护")
|
||||||
@PostMapping(path = "/overlap")
|
// @PostMapping(path = "/overlap")
|
||||||
public void createOverlap(@RequestBody @Validated MapOverlapVO mapOverlapVO) {
|
// public void createOverlap(@RequestBody @Validated MapOverlapVO mapOverlapVO) {
|
||||||
this.iDraftMapService.createOverlap(mapOverlapVO);
|
// this.iDraftMapService.createOverlap(mapOverlapVO);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "分页查询延续保护列表")
|
// @ApiOperation(value = "分页查询延续保护列表")
|
||||||
@GetMapping(path = "/{mapId}/overlap/paging")
|
// @GetMapping(path = "/{mapId}/overlap/paging")
|
||||||
public PageVO<MapOverlapVO> queryPagedOverlap(
|
// public PageVO<MapOverlapVO> queryPagedOverlap(
|
||||||
@PathVariable Long mapId,
|
// @PathVariable Long mapId,
|
||||||
MapOverlapQueryVO queryVO) {
|
// MapOverlapQueryVO queryVO) {
|
||||||
return this.iDraftMapService.queryPagedOverlap(mapId, queryVO);
|
// return this.iDraftMapService.queryPagedOverlap(mapId, queryVO);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "根据id查询延续保护")
|
// @ApiOperation(value = "根据id查询延续保护")
|
||||||
@GetMapping(path = "/overlap/{id}")
|
// @GetMapping(path = "/overlap/{id}")
|
||||||
public MapOverlapVO getOverlapById(@PathVariable Long id) {
|
// public MapOverlapVO getOverlapById(@PathVariable Long id) {
|
||||||
return this.iDraftMapService.getOverlapById(id);
|
// return this.iDraftMapService.getOverlapById(id);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "更新延续保护")
|
// @ApiOperation(value = "更新延续保护")
|
||||||
@PutMapping(path = "/overlap/{id}")
|
// @PutMapping(path = "/overlap/{id}")
|
||||||
public void updateOverlap(@PathVariable Long id, @RequestBody @Validated MapOverlapVO mapOverlapVO) {
|
// public void updateOverlap(@PathVariable Long id, @RequestBody @Validated MapOverlapVO mapOverlapVO) {
|
||||||
this.iDraftMapService.updateOverlap(id, mapOverlapVO);
|
// this.iDraftMapService.updateOverlap(id, mapOverlapVO);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "删除延续保护")
|
// @ApiOperation(value = "删除延续保护")
|
||||||
@DeleteMapping(path = "/overlap/{id}")
|
// @DeleteMapping(path = "/overlap/{id}")
|
||||||
public void deleteOverlap(@PathVariable Long id) {
|
// public void deleteOverlap(@PathVariable Long id) {
|
||||||
this.iDraftMapService.deleteOverlap(id);
|
// this.iDraftMapService.deleteOverlap(id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*-------------- 自动折返 ------------------*/
|
/*-------------- 自动折返 ------------------*/
|
||||||
|
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package club.joylink.rtss.controller.draft;
|
||||||
|
|
||||||
|
import club.joylink.rtss.services.draftData.DraftMapOverlapService;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapOverlapQueryVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapOverlapVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/draftMap/{id}/overlap")
|
||||||
|
@Slf4j
|
||||||
|
public class DraftMapOverlapController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DraftMapOverlapService draftMapOverlapService;
|
||||||
|
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public PageVO<MapOverlapVO> pagingQuery(@PathVariable Long id, MapOverlapQueryVO queryVO) {
|
||||||
|
return this.draftMapOverlapService.pagingQuery(id, queryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/all")
|
||||||
|
public List<MapOverlapVO> queryAll(@PathVariable Long id) {
|
||||||
|
return this.draftMapOverlapService.queryAll(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/{code}")
|
||||||
|
public void update(@PathVariable Long id, @PathVariable String code, @RequestBody MapOverlapVO vo) {
|
||||||
|
this.draftMapOverlapService.update(id, code, vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/{code}")
|
||||||
|
public void delete(@PathVariable Long id, @PathVariable String code) {
|
||||||
|
this.draftMapOverlapService.delete(id, code);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package club.joylink.rtss.controller.draft;
|
package club.joylink.rtss.controller.draft;
|
||||||
|
|
||||||
import club.joylink.rtss.services.draftData.DraftMapRouteService;
|
import club.joylink.rtss.services.draftData.DraftMapRouteService;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.MapRouteQueryVO;
|
||||||
import club.joylink.rtss.vo.client.map.newmap.MapRouteNewVO;
|
import club.joylink.rtss.vo.client.map.newmap.MapRouteNewVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -21,11 +23,21 @@ public class DraftMapRouteController {
|
|||||||
return this.draftMapRouteService.createRailwayRoute(id, routeNewVO);
|
return this.draftMapRouteService.createRailwayRoute(id, routeNewVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public PageVO<MapRouteNewVO> pagingQuery(@PathVariable Long id, MapRouteQueryVO queryVO) {
|
||||||
|
return this.draftMapRouteService.pagingQuery(id, queryVO);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/all")
|
@GetMapping("/all")
|
||||||
public List<MapRouteNewVO> queryAllRoutes(@PathVariable Long id) {
|
public List<MapRouteNewVO> queryAllRoutes(@PathVariable Long id) {
|
||||||
return this.draftMapRouteService.queryAllRoutes(id);
|
return this.draftMapRouteService.queryAllRoutes(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/{code}")
|
||||||
|
public void update(@PathVariable Long id, @PathVariable String code, @RequestBody MapRouteNewVO routeNewVO) {
|
||||||
|
this.draftMapRouteService.update(id, code, routeNewVO);
|
||||||
|
}
|
||||||
|
|
||||||
@DeleteMapping("/{code}")
|
@DeleteMapping("/{code}")
|
||||||
public void delete(@PathVariable Long id, @PathVariable String code) {
|
public void delete(@PathVariable Long id, @PathVariable String code) {
|
||||||
this.draftMapRouteService.deleteRoute(id, code);
|
this.draftMapRouteService.deleteRoute(id, code);
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package club.joylink.rtss.controller.draft;
|
||||||
|
|
||||||
|
import club.joylink.rtss.services.draftData.DraftMapSignalApproachSectionService;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapSASQueryVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapSignalApproachSectionVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/draftMap/{id}/signalApproachSection")
|
||||||
|
@Slf4j
|
||||||
|
public class DraftMapSignalApproachSectionController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DraftMapSignalApproachSectionService draftMapSignalApproachSectionService;
|
||||||
|
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public PageVO<MapSignalApproachSectionVO> pagingQuery(@PathVariable Long id, MapSASQueryVO queryVO) {
|
||||||
|
return this.draftMapSignalApproachSectionService.pagingQuery(id, queryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/all")
|
||||||
|
public List<MapSignalApproachSectionVO> queryAll(@PathVariable Long id) {
|
||||||
|
return this.draftMapSignalApproachSectionService.queryAll(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/{signalCode}")
|
||||||
|
public void update(@PathVariable Long id, @PathVariable String signalCode, @RequestBody MapSignalApproachSectionVO vo) {
|
||||||
|
this.draftMapSignalApproachSectionService.update(id, signalCode, vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -865,9 +865,6 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
if (StringUtils.hasText(queryVO.getEndSignalCode())) {
|
if (StringUtils.hasText(queryVO.getEndSignalCode())) {
|
||||||
criteria.andEndSignalCodeEqualTo(queryVO.getEndSignalCode());
|
criteria.andEndSignalCodeEqualTo(queryVO.getEndSignalCode());
|
||||||
}
|
}
|
||||||
if (StringUtils.hasText(queryVO.getNearSectionCode())) {
|
|
||||||
criteria.andNearSectionCodeEqualTo(queryVO.getNearSectionCode());
|
|
||||||
}
|
|
||||||
Page<DraftMapRoute> pageTotal = (Page<DraftMapRoute>) draftMapRouteDAO.selectByExampleWithBLOBs(example);
|
Page<DraftMapRoute> pageTotal = (Page<DraftMapRoute>) draftMapRouteDAO.selectByExampleWithBLOBs(example);
|
||||||
List<MapRouteVO> routeVOList = pageTotal.getResult().stream().map(MapRouteVO::convert2VO).collect(Collectors.toList());
|
List<MapRouteVO> routeVOList = pageTotal.getResult().stream().map(MapRouteVO::convert2VO).collect(Collectors.toList());
|
||||||
return PageVO.convert(pageTotal, routeVOList);
|
return PageVO.convert(pageTotal, routeVOList);
|
||||||
@ -936,50 +933,50 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
/*------------ Route END ---------------------*/
|
/*------------ Route END ---------------------*/
|
||||||
|
|
||||||
/*------------overlap start ---------------------*/
|
/*------------overlap start ---------------------*/
|
||||||
@Override
|
// @Override
|
||||||
public void createOverlap(MapOverlapVO mapOverlapVO) {
|
// public void createOverlap(MapOverlapVO mapOverlapVO) {
|
||||||
if (StringUtils.hasText(mapOverlapVO.getName())) {
|
// if (StringUtils.hasText(mapOverlapVO.getName())) {
|
||||||
confirmOverlapNameNotRepeat(mapOverlapVO);
|
// confirmOverlapNameNotRepeat(mapOverlapVO);
|
||||||
}
|
// }
|
||||||
DraftMapOverlap draftMapOverlap = mapOverlapVO.convert2Draft();
|
// DraftMapOverlap draftMapOverlap = mapOverlapVO.convert2Draft();
|
||||||
this.draftMapOverlapDAO.insert(draftMapOverlap);
|
// this.draftMapOverlapDAO.insert(draftMapOverlap);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public PageVO<MapOverlapVO> queryPagedOverlap(Long mapId, MapOverlapQueryVO queryVO) {
|
// public PageVO<MapOverlapVO> queryPagedOverlap(Long mapId, MapOverlapQueryVO queryVO) {
|
||||||
Objects.requireNonNull(mapId);
|
// Objects.requireNonNull(mapId);
|
||||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
// PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||||
DraftMapOverlapExample example = new DraftMapOverlapExample();
|
// DraftMapOverlapExample example = new DraftMapOverlapExample();
|
||||||
DraftMapOverlapExample.Criteria criteria = example.createCriteria();
|
// DraftMapOverlapExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andMapIdEqualTo(mapId);
|
// criteria.andMapIdEqualTo(mapId);
|
||||||
if (StringUtils.hasText(queryVO.getCode())) {
|
// if (StringUtils.hasText(queryVO.getCode())) {
|
||||||
criteria.andCodeEqualTo(queryVO.getCode());
|
// criteria.andCodeEqualTo(queryVO.getCode());
|
||||||
}
|
// }
|
||||||
Page<DraftMapOverlap> page = (Page<DraftMapOverlap>)
|
// Page<DraftMapOverlap> page = (Page<DraftMapOverlap>)
|
||||||
this.draftMapOverlapDAO.selectByExampleWithBLOBs(example);
|
// this.draftMapOverlapDAO.selectByExampleWithBLOBs(example);
|
||||||
List<MapOverlapVO> voList = page.getResult().stream().map(MapOverlapVO::convert2VO).collect(Collectors.toList());
|
// List<MapOverlapVO> voList = page.getResult().stream().map(MapOverlapVO::convert2VO).collect(Collectors.toList());
|
||||||
return PageVO.convert(page, voList);
|
// return PageVO.convert(page, voList);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public MapOverlapVO getOverlapById(Long id) {
|
// public MapOverlapVO getOverlapById(Long id) {
|
||||||
Objects.requireNonNull(id);
|
// Objects.requireNonNull(id);
|
||||||
DraftMapOverlap draftMapOverlap = getDraftMapOverlapEntity(id);
|
// DraftMapOverlap draftMapOverlap = getDraftMapOverlapEntity(id);
|
||||||
return MapOverlapVO.convert2VO(draftMapOverlap);
|
// return MapOverlapVO.convert2VO(draftMapOverlap);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void updateOverlap(Long id, MapOverlapVO mapOverlapVO) {
|
// public void updateOverlap(Long id, MapOverlapVO mapOverlapVO) {
|
||||||
getDraftMapOverlapEntity(id);
|
// getDraftMapOverlapEntity(id);
|
||||||
DraftMapOverlap draftMapOverlap = mapOverlapVO.convert2Draft();
|
// DraftMapOverlap draftMapOverlap = mapOverlapVO.convert2Draft();
|
||||||
draftMapOverlap.setId(id);
|
// draftMapOverlap.setId(id);
|
||||||
this.draftMapOverlapDAO.updateByPrimaryKeySelective(draftMapOverlap);
|
// this.draftMapOverlapDAO.updateByPrimaryKeySelective(draftMapOverlap);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void deleteOverlap(Long id) {
|
// public void deleteOverlap(Long id) {
|
||||||
this.draftMapOverlapDAO.deleteByPrimaryKey(id);
|
// this.draftMapOverlapDAO.deleteByPrimaryKey(id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*------------ Overlap END ---------------------*/
|
/*------------ Overlap END ---------------------*/
|
||||||
|
|
||||||
|
@ -241,15 +241,15 @@ public interface IDraftMapService {
|
|||||||
void deleteRoute(Long routeId);
|
void deleteRoute(Long routeId);
|
||||||
|
|
||||||
/*------------overlap start ---------------------*/
|
/*------------overlap start ---------------------*/
|
||||||
|
//
|
||||||
void createOverlap(MapOverlapVO mapOverlapVO);
|
// void createOverlap(MapOverlapVO mapOverlapVO);
|
||||||
|
//
|
||||||
PageVO<MapOverlapVO> queryPagedOverlap(Long mapId, MapOverlapQueryVO queryVO);
|
// PageVO<MapOverlapVO> queryPagedOverlap(Long mapId, MapOverlapQueryVO queryVO);
|
||||||
|
//
|
||||||
MapOverlapVO getOverlapById(Long id);
|
// MapOverlapVO getOverlapById(Long id);
|
||||||
|
//
|
||||||
void updateOverlap(Long id, MapOverlapVO mapOverlapVO);
|
// void updateOverlap(Long id, MapOverlapVO mapOverlapVO);
|
||||||
void deleteOverlap(Long id);
|
// void deleteOverlap(Long id);
|
||||||
|
|
||||||
/*------------autoReentry start ---------------------*/
|
/*------------autoReentry start ---------------------*/
|
||||||
|
|
||||||
|
@ -79,23 +79,23 @@ public class DraftMapDataHandleServiceImpl implements DraftMapDataHandleService
|
|||||||
if (!CollectionUtils.isEmpty(draftMapOverlapList)) {
|
if (!CollectionUtils.isEmpty(draftMapOverlapList)) {
|
||||||
for (DraftMapOverlap overlap : draftMapOverlapList) {
|
for (DraftMapOverlap overlap : draftMapOverlapList) {
|
||||||
// 丢失道岔处理
|
// 丢失道岔处理
|
||||||
MapOverlapVO mapOverlapVO = MapOverlapVO.convertRel2VO(overlap);
|
// MapOverlapVO mapOverlapVO = MapOverlapVO.convertRel2VO(overlap);
|
||||||
List<MapOverlapRelSectionSwitchVO> list = mapOverlapVO.getRelSectionSwitchList();
|
// List<MapOverlapRelSectionSwitchVO> list = mapOverlapVO.getRelSectionSwitchList();
|
||||||
for (MapOverlapRelSectionSwitchVO vo : list) {
|
// for (MapOverlapRelSectionSwitchVO vo : list) {
|
||||||
if (!CollectionUtils.isEmpty(vo.getRouteOverlapSwitchList())) {
|
// if (!CollectionUtils.isEmpty(vo.getRouteOverlapSwitchList())) {
|
||||||
List<MapCISwitchVO> removeList = new ArrayList<>();
|
// List<MapCISwitchVO> removeList = new ArrayList<>();
|
||||||
for (MapCISwitchVO mapCISwitchVO : vo.getRouteOverlapSwitchList()) {
|
// for (MapCISwitchVO mapCISwitchVO : vo.getRouteOverlapSwitchList()) {
|
||||||
if (Objects.isNull(switchMap.get(mapCISwitchVO.getSwitchCode()))) {
|
// if (Objects.isNull(switchMap.get(mapCISwitchVO.getSwitchCode()))) {
|
||||||
removeList.add(mapCISwitchVO);
|
// removeList.add(mapCISwitchVO);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (!CollectionUtils.isEmpty(removeList)) {
|
// if (!CollectionUtils.isEmpty(removeList)) {
|
||||||
vo.getRouteOverlapSwitchList().removeAll(removeList);
|
// vo.getRouteOverlapSwitchList().removeAll(removeList);
|
||||||
overlap.setRelData(mapOverlapVO.convert2Draft().getRelData());
|
// overlap.setRelData(mapOverlapVO.convert2Draft().getRelData());
|
||||||
this.draftMapOverlapDAO.updateByPrimaryKeyWithBLOBs(overlap);
|
// this.draftMapOverlapDAO.updateByPrimaryKeyWithBLOBs(overlap);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
package club.joylink.rtss.services.draftData;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapOverlapQueryVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapOverlapVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DraftMapOverlapService {
|
||||||
|
PageVO<MapOverlapVO> pagingQuery(Long id, MapOverlapQueryVO queryVO);
|
||||||
|
|
||||||
|
List<MapOverlapVO> queryAll(Long id);
|
||||||
|
|
||||||
|
void update(Long id, String code, MapOverlapVO vo);
|
||||||
|
|
||||||
|
void delete(Long id, String code);
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package club.joylink.rtss.services.draftData;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.DraftMapOverlapDAO;
|
||||||
|
import club.joylink.rtss.entity.DraftMapOverlap;
|
||||||
|
import club.joylink.rtss.entity.DraftMapOverlapExample;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapOverlapQueryVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapOverlapVO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DraftMapOverlapServiceImpl implements DraftMapOverlapService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DraftMapOverlapDAO draftMapOverlapDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageVO<MapOverlapVO> pagingQuery(Long id, MapOverlapQueryVO queryVO) {
|
||||||
|
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||||
|
DraftMapOverlapExample example = new DraftMapOverlapExample();
|
||||||
|
DraftMapOverlapExample.Criteria criteria = example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id);
|
||||||
|
if (StringUtils.hasText(queryVO.getName())) {
|
||||||
|
criteria.andNameLike(String.format("%%%s%%", queryVO.getName()));
|
||||||
|
}
|
||||||
|
Page<DraftMapOverlap> mapOverlaps = (Page<DraftMapOverlap>) this.draftMapOverlapDAO.selectByExampleWithBLOBs(example);
|
||||||
|
List<MapOverlapVO> voList = mapOverlaps.getResult().stream()
|
||||||
|
.map(MapOverlapVO::convert2VO).collect(Collectors.toList());
|
||||||
|
return PageVO.convert(mapOverlaps, voList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MapOverlapVO> queryAll(Long id) {
|
||||||
|
DraftMapOverlapExample example = new DraftMapOverlapExample();
|
||||||
|
example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id);
|
||||||
|
List<DraftMapOverlap> overlapList = this.draftMapOverlapDAO.selectByExampleWithBLOBs(example);
|
||||||
|
return overlapList.stream()
|
||||||
|
.map(MapOverlapVO::convert2VO)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(Long id, String code, MapOverlapVO vo) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertHasText(vo.getName());
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(vo.getPathList());
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(vo.getUnlockTime());
|
||||||
|
DraftMapOverlapExample example = new DraftMapOverlapExample();
|
||||||
|
example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id)
|
||||||
|
.andCodeEqualTo(code);
|
||||||
|
List<DraftMapOverlap> draftMapOverlaps = this.draftMapOverlapDAO.selectByExampleWithBLOBs(example);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(draftMapOverlaps);
|
||||||
|
MapOverlapVO update = MapOverlapVO.convert2VO(draftMapOverlaps.get(0));
|
||||||
|
update.setName(vo.getName());
|
||||||
|
update.setUnlockTime(vo.getUnlockTime());
|
||||||
|
update.setPathList(vo.getPathList());
|
||||||
|
DraftMapOverlap db = update.convert2Draft();
|
||||||
|
this.draftMapOverlapDAO.updateByPrimaryKeyWithBLOBs(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(Long id, String code) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertHasText(code);
|
||||||
|
DraftMapOverlapExample example = new DraftMapOverlapExample();
|
||||||
|
example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id)
|
||||||
|
.andCodeEqualTo(code);
|
||||||
|
this.draftMapOverlapDAO.deleteByExample(example);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
package club.joylink.rtss.services.draftData;
|
package club.joylink.rtss.services.draftData;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.MapRouteQueryVO;
|
||||||
import club.joylink.rtss.vo.client.map.newmap.MapRouteNewVO;
|
import club.joylink.rtss.vo.client.map.newmap.MapRouteNewVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -7,7 +9,11 @@ import java.util.List;
|
|||||||
public interface DraftMapRouteService {
|
public interface DraftMapRouteService {
|
||||||
MapRouteNewVO createRailwayRoute(Long id, MapRouteNewVO routeNewVO);
|
MapRouteNewVO createRailwayRoute(Long id, MapRouteNewVO routeNewVO);
|
||||||
|
|
||||||
|
PageVO<MapRouteNewVO> pagingQuery(Long id, MapRouteQueryVO queryVO);
|
||||||
|
|
||||||
List<MapRouteNewVO> queryAllRoutes(Long id);
|
List<MapRouteNewVO> queryAllRoutes(Long id);
|
||||||
|
|
||||||
|
void update(Long id, String routeCode, MapRouteNewVO routeNewVO);
|
||||||
|
|
||||||
void deleteRoute(Long id, String code);
|
void deleteRoute(Long id, String code);
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,17 @@ import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
|||||||
import club.joylink.rtss.services.IDraftMapService;
|
import club.joylink.rtss.services.IDraftMapService;
|
||||||
import club.joylink.rtss.simulation.rt.repo.CommonRepository;
|
import club.joylink.rtss.simulation.rt.repo.CommonRepository;
|
||||||
import club.joylink.rtss.simulation.rt.repo.CommonRepositoryBuilder;
|
import club.joylink.rtss.simulation.rt.repo.CommonRepositoryBuilder;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.MapRouteQueryVO;
|
||||||
import club.joylink.rtss.vo.client.map.newmap.MapGraphDataNewVO;
|
import club.joylink.rtss.vo.client.map.newmap.MapGraphDataNewVO;
|
||||||
import club.joylink.rtss.vo.client.map.newmap.MapRouteNewVO;
|
import club.joylink.rtss.vo.client.map.newmap.MapRouteNewVO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -62,6 +67,34 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
|
|||||||
return routeNewVO;
|
return routeNewVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageVO<MapRouteNewVO> pagingQuery(Long id, MapRouteQueryVO queryVO) {
|
||||||
|
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||||
|
DraftMapRouteExample example = new DraftMapRouteExample();
|
||||||
|
DraftMapRouteExample.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andMapIdEqualTo(id);
|
||||||
|
if (StringUtils.hasText(queryVO.getCode())) {
|
||||||
|
criteria.andCodeEqualTo(queryVO.getCode());
|
||||||
|
}
|
||||||
|
if (StringUtils.hasText(queryVO.getName())) {
|
||||||
|
queryVO.setName(String.format("%%%s%%", queryVO.getName()));
|
||||||
|
criteria.andNameLike(queryVO.getName());
|
||||||
|
}
|
||||||
|
if (StringUtils.hasText(queryVO.getStationCode())) {
|
||||||
|
criteria.andStationCodeEqualTo(queryVO.getStationCode());
|
||||||
|
}
|
||||||
|
if (StringUtils.hasText(queryVO.getStartSignalCode())) {
|
||||||
|
criteria.andStartSignalCodeEqualTo(queryVO.getStartSignalCode());
|
||||||
|
}
|
||||||
|
if (StringUtils.hasText(queryVO.getEndSignalCode())) {
|
||||||
|
criteria.andEndSignalCodeEqualTo(queryVO.getEndSignalCode());
|
||||||
|
}
|
||||||
|
Page<DraftMapRoute> pageTotal = (Page<DraftMapRoute>) draftMapRouteDAO.selectByExampleWithBLOBs(example);
|
||||||
|
List<MapRouteNewVO> routeVOList = pageTotal.getResult().stream()
|
||||||
|
.map(MapRouteNewVO::convert2VO).collect(Collectors.toList());
|
||||||
|
return PageVO.convert(pageTotal, routeVOList);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MapRouteNewVO> queryAllRoutes(Long id) {
|
public List<MapRouteNewVO> queryAllRoutes(Long id) {
|
||||||
DraftMapRouteExample example = new DraftMapRouteExample();
|
DraftMapRouteExample example = new DraftMapRouteExample();
|
||||||
@ -71,6 +104,25 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
|
|||||||
return MapRouteNewVO.convertDraft2VOList(routeList);
|
return MapRouteNewVO.convertDraft2VOList(routeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(Long id, String routeCode, MapRouteNewVO routeNewVO) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertHasText(routeNewVO.getName());
|
||||||
|
DraftMapRouteExample example = new DraftMapRouteExample();
|
||||||
|
example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id)
|
||||||
|
.andCodeEqualTo(routeCode);
|
||||||
|
List<DraftMapRoute> draftMapRoutes = this.draftMapRouteDAO.selectByExampleWithBLOBs(example);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(draftMapRoutes);
|
||||||
|
DraftMapRoute draftMapRoute = draftMapRoutes.get(0);
|
||||||
|
MapRouteNewVO update = MapRouteNewVO.convert2VO(draftMapRoute);
|
||||||
|
update.setFlt(routeNewVO.isFlt());
|
||||||
|
update.setArc(routeNewVO.isArc());
|
||||||
|
update.setArs(routeNewVO.isArs());
|
||||||
|
update.setName(routeNewVO.getName());
|
||||||
|
DraftMapRoute db = update.convert2Draft();
|
||||||
|
this.draftMapRouteDAO.updateByPrimaryKeyWithBLOBs(db);
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void deleteRoute(Long id, String code) {
|
public void deleteRoute(Long id, String code) {
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package club.joylink.rtss.services.draftData;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapSASQueryVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapSignalApproachSectionVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DraftMapSignalApproachSectionService {
|
||||||
|
PageVO<MapSignalApproachSectionVO> pagingQuery(Long id, MapSASQueryVO queryVO);
|
||||||
|
|
||||||
|
List<MapSignalApproachSectionVO> queryAll(Long id);
|
||||||
|
|
||||||
|
void update(Long id, String signalCode, MapSignalApproachSectionVO vo);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package club.joylink.rtss.services.draftData;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.DraftMapSignalApproachSectionDAO;
|
||||||
|
import club.joylink.rtss.entity.DraftMapSignalApproachSection;
|
||||||
|
import club.joylink.rtss.entity.DraftMapSignalApproachSectionExample;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapSASQueryVO;
|
||||||
|
import club.joylink.rtss.vo.client.map.newmap.MapSignalApproachSectionVO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DraftMapSignalApproachSectionServiceImpl implements DraftMapSignalApproachSectionService {
|
||||||
|
@Autowired
|
||||||
|
private DraftMapSignalApproachSectionDAO draftMapSignalApproachSectionDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageVO<MapSignalApproachSectionVO> pagingQuery(Long id, MapSASQueryVO queryVO) {
|
||||||
|
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||||
|
DraftMapSignalApproachSectionExample example = new DraftMapSignalApproachSectionExample();
|
||||||
|
DraftMapSignalApproachSectionExample.Criteria criteria = example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id);
|
||||||
|
if (StringUtils.hasText(queryVO.getSignalCode())) {
|
||||||
|
criteria.andSignalCodeEqualTo(queryVO.getSignalCode());
|
||||||
|
}
|
||||||
|
Page<DraftMapSignalApproachSection> mapOverlaps = (Page<DraftMapSignalApproachSection>) this.draftMapSignalApproachSectionDAO.selectByExampleWithBLOBs(example);
|
||||||
|
List<MapSignalApproachSectionVO> voList = mapOverlaps.getResult().stream()
|
||||||
|
.map(MapSignalApproachSectionVO::convert2VO)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return PageVO.convert(mapOverlaps, voList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MapSignalApproachSectionVO> queryAll(Long id) {
|
||||||
|
DraftMapSignalApproachSectionExample example = new DraftMapSignalApproachSectionExample();
|
||||||
|
DraftMapSignalApproachSectionExample.Criteria criteria = example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id);
|
||||||
|
Page<DraftMapSignalApproachSection> mapOverlaps = (Page<DraftMapSignalApproachSection>) this.draftMapSignalApproachSectionDAO.selectByExampleWithBLOBs(example);
|
||||||
|
return mapOverlaps.getResult().stream()
|
||||||
|
.map(MapSignalApproachSectionVO::convert2VO)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(Long id, String signalCode, MapSignalApproachSectionVO vo) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(vo.getReleaseTime());
|
||||||
|
DraftMapSignalApproachSectionExample example = new DraftMapSignalApproachSectionExample();
|
||||||
|
example.createCriteria()
|
||||||
|
.andMapIdEqualTo(id)
|
||||||
|
.andSignalCodeEqualTo(signalCode);
|
||||||
|
List<DraftMapSignalApproachSection> approachSections = this.draftMapSignalApproachSectionDAO.selectByExampleWithBLOBs(example);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(approachSections);
|
||||||
|
MapSignalApproachSectionVO update = MapSignalApproachSectionVO.convert2VO(approachSections.get(0));
|
||||||
|
update.setReleaseTime(vo.getReleaseTime());
|
||||||
|
update.setSectionPathList(vo.getSectionPathList());
|
||||||
|
DraftMapSignalApproachSection db = update.convert2Draft();
|
||||||
|
this.draftMapSignalApproachSectionDAO.updateByPrimaryKeyWithBLOBs(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -18,7 +18,8 @@ import java.util.Set;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class SrdLogicService {
|
public class SrdLogicService {
|
||||||
public static final int TRAIN_RUN_RATE = 20; // 列车运行逻辑频率
|
// public static final int TRAIN_RUN_RATE = 20; // 列车运行逻辑频率
|
||||||
|
public static final int TRAIN_RUN_RATE = 1000; // 列车运行逻辑频率
|
||||||
public static final int DEVICE_RUN_RATE = 500; // 其他设备逻辑频率
|
public static final int DEVICE_RUN_RATE = 500; // 其他设备逻辑频率
|
||||||
|
|
||||||
public void buildRepository(RtSimulation rtSimulation, MapVO mapVO) {
|
public void buildRepository(RtSimulation rtSimulation, MapVO mapVO) {
|
||||||
@ -81,19 +82,24 @@ public class SrdLogicService {
|
|||||||
public void srTrainRun(SrdRepository repository) {
|
public void srTrainRun(SrdRepository repository) {
|
||||||
List<SrTrain> trainList = repository.getTrainList();
|
List<SrTrain> trainList = repository.getTrainList();
|
||||||
for (SrTrain srTrain : trainList) {
|
for (SrTrain srTrain : trainList) {
|
||||||
if (!srTrain.isUsing()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// 计算列车加速度,更新列车速度,计算列车运行距离,更新列车位置
|
// 计算列车加速度,更新列车速度,计算列车运行距离,更新列车位置
|
||||||
boolean right = srTrain.isRight();
|
boolean right = srTrain.isRight();
|
||||||
TrackPosition position = srTrain.getHeadPosition();
|
TrackPosition position = srTrain.getHeadPosition();
|
||||||
int cv = this.calculateSpeed(srTrain);
|
float cv = this.calculateSpeed(srTrain);
|
||||||
int s = this.calculateLen(srTrain, cv, TRAIN_RUN_RATE);
|
int s = this.calculateLen(srTrain, cv, TRAIN_RUN_RATE);
|
||||||
|
if (s == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TrackPosition np = calculatePosition(position, s, right, new HashSet<>());
|
TrackPosition np = calculatePosition(position, s, right, new HashSet<>());
|
||||||
if (np.equals(position) && cv != 0) {
|
if (np.equals(position) && cv != 0) {
|
||||||
cv = 0;
|
cv = 0;
|
||||||
}
|
}
|
||||||
Set<SrTrack> occupiedTrackSet = new HashSet<>();
|
Set<SrTrack> occupiedTrackSet = new HashSet<>();
|
||||||
|
if (srTrain.getId().equals("001")) {
|
||||||
|
System.out.println(cv);
|
||||||
|
System.out.println(s);
|
||||||
|
System.out.println(np.debugStr());
|
||||||
|
}
|
||||||
TrackPosition tailPosition = this.calculatePosition(np, srTrain.getLen(), !right, occupiedTrackSet);
|
TrackPosition tailPosition = this.calculatePosition(np, srTrain.getLen(), !right, occupiedTrackSet);
|
||||||
srTrain.updatePositionAndSpeed(np, tailPosition, cv);
|
srTrain.updatePositionAndSpeed(np, tailPosition, cv);
|
||||||
// 更新计轴占用
|
// 更新计轴占用
|
||||||
@ -110,28 +116,36 @@ public class SrdLogicService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculateLen(SrTrain srTrain, int cv, int time) {
|
/**
|
||||||
int s = cv * time;
|
*
|
||||||
|
* @param srTrain
|
||||||
|
* @param cv 速度,单位mm/ms
|
||||||
|
* @param time 时间,单位ms
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private int calculateLen(SrTrain srTrain, float cv, int time) {
|
||||||
|
int s = (int) (cv * time); // 距离,单位mm
|
||||||
|
if (!srTrain.isNeutralGear()) {
|
||||||
return s * srTrain.getGear();
|
return s * srTrain.getGear();
|
||||||
}
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
private int calculateSpeed(SrTrain srTrain) {
|
private float calculateSpeed(SrTrain srTrain) {
|
||||||
long speed = srTrain.getSpeed();
|
float speed = srTrain.getSpeed();
|
||||||
int wa = (int) (10 + speed * 0.001 + speed * speed * 0.0000003); // 阻力所产生的反向加速度
|
float wa = (0.01f + speed / 1000 + speed * speed * 0.0003f); // 阻力所产生的反向加速度
|
||||||
int pa = 0;
|
float pa = 0;
|
||||||
if (srTrain.isEb()) {
|
if (srTrain.isEb()) {
|
||||||
pa = SrTrain.ES_DEC;
|
pa = srTrain.ES_DEC;
|
||||||
} else {
|
} else {
|
||||||
pa = srTrain.getP() >= 0 ? srTrain.getP() * SrTrain.MAX_ACC : srTrain.getP() * SrTrain.MAX_DEC;
|
pa = srTrain.getP() >= 0 ? srTrain.getP() * srTrain.MAX_ACC / 100 : srTrain.getP() * srTrain.MAX_DEC / 100;
|
||||||
|
pa *= srTrain.getGear();
|
||||||
}
|
}
|
||||||
int a = pa - wa;
|
float a = pa - wa;
|
||||||
int cv = (int) (speed + a * TRAIN_RUN_RATE); // 当前速度
|
float cv = (speed + a * TRAIN_RUN_RATE / 1000); // 当前速度
|
||||||
if (cv < 0) {
|
if (cv < 0) {
|
||||||
cv = 0;
|
cv = 0;
|
||||||
}
|
}
|
||||||
if (srTrain.isNeutralGear() && cv > 0) { // 空档位
|
|
||||||
cv = 0;
|
|
||||||
}
|
|
||||||
return cv;
|
return cv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package club.joylink.rtss.simulation.rt.SRD;
|
||||||
|
|
||||||
|
import club.joylink.rtss.simulation.rt.RtSimulation;
|
||||||
|
import club.joylink.rtss.simulation.rt.SRD.bo.SrTrack;
|
||||||
|
import club.joylink.rtss.simulation.rt.SRD.bo.SrTrain;
|
||||||
|
import club.joylink.rtss.simulation.rt.SRD.bo.SrdRepository;
|
||||||
|
import club.joylink.rtss.simulation.rt.SRD.bo.TrackPosition;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SrdTrainService {
|
||||||
|
public void loadTrain(RtSimulation simulation, String trainId, boolean right, String trackId) {
|
||||||
|
SrdRepository srdRepository = simulation.getRepository(SrdRepository.NAME, SrdRepository.class);
|
||||||
|
SrTrain train = srdRepository.getTrainById(trainId);
|
||||||
|
SrTrack track = srdRepository.getTrackById(trackId);
|
||||||
|
TrackPosition trackPosition = new TrackPosition(track, 5000);
|
||||||
|
train.initPosition(trackPosition, right);
|
||||||
|
train.updatePositionAndSpeed(trackPosition, null, 5);
|
||||||
|
}
|
||||||
|
}
|
@ -63,10 +63,6 @@ public class SrTrack extends SrDevice implements Debug {
|
|||||||
this.rightFlankTrack = rightFlank;
|
this.rightFlankTrack = rightFlank;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setSrSwitch(SrSwitch srSwitch) {
|
|
||||||
this.srSwitch = srSwitch;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SrTrack queryNextTrack(boolean right) {
|
public SrTrack queryNextTrack(boolean right) {
|
||||||
if (this.srSwitch != null) {
|
if (this.srSwitch != null) {
|
||||||
if (this.srSwitch.isNormalPosition()) {
|
if (this.srSwitch.isNormalPosition()) {
|
||||||
|
@ -7,10 +7,6 @@ import lombok.Getter;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public class SrTrain extends SrDevice {
|
public class SrTrain extends SrDevice {
|
||||||
/**
|
|
||||||
* 是否使用中
|
|
||||||
*/
|
|
||||||
boolean using;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列车长度,单位mm
|
* 列车长度,单位mm
|
||||||
@ -21,19 +17,19 @@ public class SrTrain extends SrDevice {
|
|||||||
*/
|
*/
|
||||||
int mass = 224;
|
int mass = 224;
|
||||||
/**
|
/**
|
||||||
* 最大加速度, 单位mm/s2
|
* 最大加速度, 单位m/s2
|
||||||
*/
|
*/
|
||||||
public static final int MAX_ACC = 1600;
|
public float MAX_ACC = 1.6f;
|
||||||
/**
|
/**
|
||||||
* 最大常用制动加速度, 单位mm/s2
|
* 最大常用制动加速度, 单位m/s2
|
||||||
*/
|
*/
|
||||||
public static final int MAX_DEC = -1200;
|
public float MAX_DEC = -1.2f;
|
||||||
/**
|
/**
|
||||||
* 紧急制动加速度, 单位mm/s2
|
* 紧急制动加速度, 单位m/s2
|
||||||
*/
|
*/
|
||||||
public static final int ES_DEC = -1500;
|
public float ES_DEC = -1.5f;
|
||||||
/**
|
/**
|
||||||
* 功率-100 <= p <= 100
|
* 功率-100 <= p <= 100 (%)
|
||||||
*/
|
*/
|
||||||
int p;
|
int p;
|
||||||
/**
|
/**
|
||||||
@ -41,9 +37,9 @@ public class SrTrain extends SrDevice {
|
|||||||
*/
|
*/
|
||||||
boolean eb;
|
boolean eb;
|
||||||
/**
|
/**
|
||||||
* 列车速度,单位mm/s
|
* 列车速度,单位m/s
|
||||||
*/
|
*/
|
||||||
int speed;
|
float speed;
|
||||||
/**
|
/**
|
||||||
* 列车方向
|
* 列车方向
|
||||||
*/
|
*/
|
||||||
@ -73,19 +69,27 @@ public class SrTrain extends SrDevice {
|
|||||||
return NEUTRAL == this.gear;
|
return NEUTRAL == this.gear;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePositionAndSpeed(TrackPosition headPosition, TrackPosition tailPosition, int v) {
|
public void updatePositionAndSpeed(TrackPosition headPosition, TrackPosition tailPosition, float v) {
|
||||||
this.headPosition = headPosition;
|
this.headPosition = headPosition;
|
||||||
this.tailPosition = tailPosition;
|
|
||||||
this.speed = v;
|
this.speed = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initState() {
|
public void initState() {
|
||||||
|
this.p = 0;
|
||||||
|
this.eb = false;
|
||||||
|
this.speed = 0;
|
||||||
|
this.gear = NEUTRAL;
|
||||||
|
this.headPosition = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyState(int state) {
|
public void applyState(int state) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initPosition(TrackPosition trackPosition, boolean right) {
|
||||||
|
this.headPosition = trackPosition;
|
||||||
|
this.right = right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,9 @@ public class SrdRepository extends SimulationRepository {
|
|||||||
for (SrSwitch srSwitch : this.switchMap.values()) {
|
for (SrSwitch srSwitch : this.switchMap.values()) {
|
||||||
srSwitch.initState();
|
srSwitch.initState();
|
||||||
}
|
}
|
||||||
|
for (SrTrain train : this.trainMap.values()) {
|
||||||
|
train.initState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SrAXC> getAxcList() {
|
public List<SrAXC> getAxcList() {
|
||||||
@ -93,4 +96,16 @@ public class SrdRepository extends SimulationRepository {
|
|||||||
CommonSection commonSection = commonRepository.getSectionById(sectionId);
|
CommonSection commonSection = commonRepository.getSectionById(sectionId);
|
||||||
return this.getAxcById(commonSection.getAxc().getId());
|
return this.getAxcById(commonSection.getAxc().getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SrTrain getTrainById(String id) {
|
||||||
|
SrTrain srTrain = this.trainMap.get(id);
|
||||||
|
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertNotNull(srTrain);
|
||||||
|
return srTrain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SrTrack getTrackById(String id) {
|
||||||
|
SrTrack srTrack = this.trackMap.get(id);
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(srTrack);
|
||||||
|
return srTrack;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,20 @@ public class SrdRepositoryBuilder {
|
|||||||
BusinessExceptionAssertEnum.DATA_ERROR.assertNotNull(c,
|
BusinessExceptionAssertEnum.DATA_ERROR.assertNotNull(c,
|
||||||
String.format("道岔[%s]关联区段C[%s]不存在", switchVO.getCode(), switchVO.getSectionCCode()));
|
String.format("道岔[%s]关联区段C[%s]不存在", switchVO.getCode(), switchVO.getSectionCCode()));
|
||||||
SrSwitch turnout = turnoutMap.get(switchVO.getCode());
|
SrSwitch turnout = turnoutMap.get(switchVO.getCode());
|
||||||
|
a.srSwitch = turnout;
|
||||||
|
b.srSwitch = turnout;
|
||||||
|
c.srSwitch = turnout;
|
||||||
|
if (a.leftTrack != null) {
|
||||||
|
a.rightTrack = b;
|
||||||
|
b.leftTrack = a;
|
||||||
|
a.rightFlankTrack = c;
|
||||||
|
c.leftTrack = a;
|
||||||
|
} else if (a.rightTrack != null) {
|
||||||
|
a.leftTrack = b;
|
||||||
|
b.rightTrack = a;
|
||||||
|
a.leftFlankTrack = c;
|
||||||
|
c.rightTrack = a;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,18 +119,19 @@ public class SrdRepositoryBuilder {
|
|||||||
if (Objects.equals(sectionVO.getType(), "02")) { // 逻辑区段
|
if (Objects.equals(sectionVO.getType(), "02")) { // 逻辑区段
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (Objects.equals(sectionVO.getType(), "01") || Objects.equals(sectionVO.getType(), "03")) {
|
||||||
// 创建轨道
|
// 创建轨道
|
||||||
SrTrack srTrack = new SrTrack(sectionVO.getCode());
|
SrTrack srTrack = new SrTrack(sectionVO.getCode());
|
||||||
trackMap.put(srTrack.getId(), srTrack);
|
trackMap.put(srTrack.getId(), srTrack);
|
||||||
// BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(sectionVO.getLengthFact() > 0,
|
srTrack.name = sectionVO.getName();
|
||||||
// String.format("区段[%s(%s)]未设置实际长度或长度小于等于0", sectionVO.getName(), sectionVO.getCode()));
|
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(sectionVO.getLengthFact() > 0,
|
||||||
|
String.format("区段[%s(%s)]未设置实际长度或长度小于等于0", sectionVO.getName(), sectionVO.getCode()));
|
||||||
srTrack.len = ((int) (sectionVO.getLengthFact() * 1000));
|
srTrack.len = ((int) (sectionVO.getLengthFact() * 1000));
|
||||||
|
}
|
||||||
if (Objects.equals(sectionVO.getType(), "04") || Objects.equals(sectionVO.getType(), "01")) { // 道岔计轴
|
if (Objects.equals(sectionVO.getType(), "04") || Objects.equals(sectionVO.getType(), "01")) { // 道岔计轴
|
||||||
// 创建计轴器
|
// 创建计轴器
|
||||||
SrAXC srAXC = new SrAXC(sectionVO.getCode());
|
SrAXC srAXC = new SrAXC(sectionVO.getCode());
|
||||||
axcMap.put(srAXC.getId(), srAXC);
|
axcMap.put(srAXC.getId(), srAXC);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package club.joylink.rtss.simulation.rt.SRD.bo;
|
package club.joylink.rtss.simulation.rt.SRD.bo;
|
||||||
|
|
||||||
public class TrackPosition {
|
import club.joylink.rtss.simulation.Debug;
|
||||||
|
|
||||||
|
public class TrackPosition implements Debug {
|
||||||
SrTrack track;
|
SrTrack track;
|
||||||
/**
|
/**
|
||||||
* 轨道偏移量,单位mm
|
* 轨道偏移量,单位mm
|
||||||
@ -19,4 +21,9 @@ public class TrackPosition {
|
|||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String debugStr() {
|
||||||
|
return String.format("[%s:%s]", this.track.getName(), this.offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package club.joylink.rtss.simulation.rt.operation;
|
package club.joylink.rtss.simulation.rt.operation;
|
||||||
|
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandlerMapping;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
|
||||||
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
||||||
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
||||||
import club.joylink.rtss.simulation.rt.CIL.CilApiService;
|
import club.joylink.rtss.simulation.rt.CIL.CilApiService;
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
package club.joylink.rtss.simulation.rt.operation;
|
package club.joylink.rtss.simulation.rt.operation;
|
||||||
|
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandlerMapping;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
|
||||||
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
||||||
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
||||||
import club.joylink.rtss.simulation.rt.CIL.CilApiService;
|
import club.joylink.rtss.simulation.rt.CIL.CilApiService;
|
||||||
import club.joylink.rtss.simulation.rt.RtSimulation;
|
import club.joylink.rtss.simulation.rt.RtSimulation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@SimulationOperationController()
|
@SimulationOperationController()
|
||||||
public class SignalOperationHandler {
|
public class SignalOperationHandler {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package club.joylink.rtss.simulation.rt.operation;
|
||||||
|
|
||||||
|
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
||||||
|
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
||||||
|
import club.joylink.rtss.simulation.rt.RtSimulation;
|
||||||
|
import club.joylink.rtss.simulation.rt.SRD.SrdTrainService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
@SimulationOperationController()
|
||||||
|
public class SrTrainOperationHandler {
|
||||||
|
@Autowired
|
||||||
|
private SrdTrainService srdTrainService;
|
||||||
|
|
||||||
|
@SimulationOperationMapping("Train_Load_Spare_Train")
|
||||||
|
public void loadTrain(RtSimulation simulation, String groupNumber,
|
||||||
|
boolean right, String sectionCode) {
|
||||||
|
this.srdTrainService.loadTrain(simulation, groupNumber, right, sectionCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SimulationOperationMapping("Train_Drive_Speed_Control")
|
||||||
|
public void powerControl(RtSimulation simulation, String groupNumber, int p) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +1,11 @@
|
|||||||
package club.joylink.rtss.simulation.rt.operation;
|
package club.joylink.rtss.simulation.rt.operation;
|
||||||
|
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandlerMapping;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
|
||||||
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
import club.joylink.rtss.simulation.operation.SimulationOperationController;
|
||||||
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
import club.joylink.rtss.simulation.operation.SimulationOperationMapping;
|
||||||
import club.joylink.rtss.simulation.rt.CIL.CilApiService;
|
import club.joylink.rtss.simulation.rt.CIL.CilApiService;
|
||||||
import club.joylink.rtss.simulation.rt.RtSimulation;
|
import club.joylink.rtss.simulation.rt.RtSimulation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@SimulationOperationController()
|
@SimulationOperationController()
|
||||||
public class SwitchOperationHandler {
|
public class SwitchOperationHandler {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -26,7 +26,4 @@ public class MapRouteQueryVO extends PageQueryVO {
|
|||||||
@ApiModelProperty(value="终端信号机")
|
@ApiModelProperty(value="终端信号机")
|
||||||
private String endSignalCode;
|
private String endSignalCode;
|
||||||
|
|
||||||
@ApiModelProperty(value="接近区段")
|
|
||||||
private String nearSectionCode;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
public class MapOverlapQueryVO extends PageQueryVO {
|
public class MapOverlapQueryVO extends PageQueryVO {
|
||||||
|
|
||||||
@ApiModelProperty(value="延续保护唯一编号")
|
@ApiModelProperty(value="延续保护名称")
|
||||||
private String code;
|
private String name;
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,7 @@ import lombok.Setter;
|
|||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,17 +68,11 @@ public class MapOverlapVO {
|
|||||||
|
|
||||||
private List<MapSectionPathVO> triggerPathList;
|
private List<MapSectionPathVO> triggerPathList;
|
||||||
|
|
||||||
/**
|
|
||||||
* 延续保护线路列表
|
|
||||||
*/
|
|
||||||
@NotEmpty(message="延续保护线路列表至少有一条")
|
|
||||||
private List<MapOverlapRelSectionSwitchVO> relSectionSwitchList;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "延续保护路径列表")
|
@ApiModelProperty(value = "延续保护路径列表")
|
||||||
private List<MapSectionPathVO> pathList;
|
private List<MapSectionPathVO> pathList;
|
||||||
|
|
||||||
public MapOverlapVO() {
|
public MapOverlapVO() {
|
||||||
relSectionSwitchList = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MapOverlapVO convert2VO(DraftMapOverlap draftMapOverlap) {
|
public static MapOverlapVO convert2VO(DraftMapOverlap draftMapOverlap) {
|
||||||
@ -114,7 +106,7 @@ public class MapOverlapVO {
|
|||||||
draftMapOverlap.setId(getId());
|
draftMapOverlap.setId(getId());
|
||||||
draftMapOverlap.setCode(getCode());
|
draftMapOverlap.setCode(getCode());
|
||||||
draftMapOverlap.setMapId(getMapId());
|
draftMapOverlap.setMapId(getMapId());
|
||||||
// draftMapOverlap.setName(getName());
|
draftMapOverlap.setName(getName());
|
||||||
// relData中不包含id和mapId
|
// relData中不包含id和mapId
|
||||||
draftMapOverlap.setRelData(getJsonData());
|
draftMapOverlap.setRelData(getJsonData());
|
||||||
return draftMapOverlap;
|
return draftMapOverlap;
|
||||||
|
@ -15,7 +15,9 @@ import org.springframework.util.CollectionUtils;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ApiModel
|
@ApiModel
|
||||||
@ -135,10 +137,6 @@ public class MapRouteNewVO {
|
|||||||
*/
|
*/
|
||||||
private boolean flt;
|
private boolean flt;
|
||||||
|
|
||||||
/** 是否先锁闭——办理过程直接先锁闭区段 */
|
|
||||||
@ApiModelProperty(value = "是否先锁闭——办理过程直接先锁闭区段")
|
|
||||||
private boolean lockFirst;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 延时解锁时间:单位秒(s)
|
* 延时解锁时间:单位秒(s)
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package club.joylink.rtss.vo.client.map.newmap;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class MapSASQueryVO extends PageQueryVO {
|
||||||
|
private String signalCode;
|
||||||
|
}
|
@ -1,11 +1,11 @@
|
|||||||
package club.joylink.rtss.vo.client.map.newmap;
|
package club.joylink.rtss.vo.client.map.newmap;
|
||||||
|
|
||||||
|
import club.joylink.rtss.entity.DraftMapSignalApproachSection;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
|
||||||
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
|
|
||||||
import club.joylink.rtss.entity.DraftMapSignalApproachSection;
|
|
||||||
import club.joylink.rtss.util.JsonUtils;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -33,9 +33,6 @@ public class MapSignalApproachSectionVO {
|
|||||||
@NotNull(message = "地图id不能为空")
|
@NotNull(message = "地图id不能为空")
|
||||||
private Long mapId;
|
private Long mapId;
|
||||||
|
|
||||||
// @NotBlank(message = "接近区段编号不能为空")
|
|
||||||
// private String code;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 始端信号机 编号
|
* 始端信号机 编号
|
||||||
*/
|
*/
|
||||||
@ -43,21 +40,14 @@ public class MapSignalApproachSectionVO {
|
|||||||
@ApiModelProperty(value="始端信号机", required=true)
|
@ApiModelProperty(value="始端信号机", required=true)
|
||||||
private String signalCode;
|
private String signalCode;
|
||||||
|
|
||||||
@ApiModelProperty(value="接近区段(CBTC模式)数据列表")
|
/**
|
||||||
private List<String> routeSectionList;
|
* 接近锁闭解锁时间
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "接近区段(后备模式)列表")
|
|
||||||
private List<String> blockSectionList;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否引导信号机")
|
|
||||||
private Boolean callOn;
|
|
||||||
|
|
||||||
private Integer releaseTime;
|
private Integer releaseTime;
|
||||||
|
|
||||||
private List<MapSectionPathVO> sectionPathList;
|
private List<MapSectionPathVO> sectionPathList;
|
||||||
|
|
||||||
public MapSignalApproachSectionVO() {
|
public MapSignalApproachSectionVO() {
|
||||||
this.routeSectionList = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MapSignalApproachSectionVO convert2VO(DraftMapSignalApproachSection approachSection) {
|
public static MapSignalApproachSectionVO convert2VO(DraftMapSignalApproachSection approachSection) {
|
||||||
@ -88,7 +78,6 @@ public class MapSignalApproachSectionVO {
|
|||||||
DraftMapSignalApproachSection approachSection = new DraftMapSignalApproachSection();
|
DraftMapSignalApproachSection approachSection = new DraftMapSignalApproachSection();
|
||||||
approachSection.setId(this.getId());
|
approachSection.setId(this.getId());
|
||||||
approachSection.setMapId(this.getMapId());
|
approachSection.setMapId(this.getMapId());
|
||||||
// approachSection.setCode(this.getCode());
|
|
||||||
approachSection.setSignalCode(this.getSignalCode());
|
approachSection.setSignalCode(this.getSignalCode());
|
||||||
approachSection.setRelData(this.getJsonData());
|
approachSection.setRelData(this.getJsonData());
|
||||||
return approachSection;
|
return approachSection;
|
||||||
|
Loading…
Reference in New Issue
Block a user