LsStationRouteService.java 2.26 KB
package com.bsth.service;

import com.bsth.entity.LsSectionRoute;
import com.bsth.entity.LsStationRoute;

import java.util.List;
import java.util.Map;

/**
 * @author Hill
 */
public interface LsStationRouteService extends BaseService<LsStationRoute, Integer> {

	/**
	 * 按条件查询所有历史站点路由信息
	 * @param map
	 * @return
	 */
	Iterable<LsStationRoute> findAllByParams(Map<String, Object> map);

	/**
	 * 获取历史站点和路段路由
	 * @param map
	 * @return
	 */
	Map<String, Object> findRoutes(Map<String, Object> map);

	/**
	 * 获取历史站点路由
	 * @param map
	 * @return
	 */
	List<LsStationRoute> findStationRoutes(Map<String, Object> map);

	/**
	 * 获取当前站点以及下一站点路由
	 * @param id
	 * @return
	 */
	List<LsStationRoute> findCurrentAndNext(Integer id);

	/**
	 * 批量撤销站点路由
	 * @param ids
	 */
	void batchDestroy(List<Integer> ids);

	/**
	 * 批量恢复撤销的站点路由
	 * @param ids
	 */
	void batchRecover(List<Integer> ids);

	/**
	 * 保存线路某个版本下单行的站点和路段路由
	 * 常规使用在根据百度地图生成数据或者模板导入的批量保存
	 * @param lineId
	 * @param versions
	 * @param directions
	 * @param stationRoutes
	 * @param sectionRoutes
	 * @return
	 */
	Map<String, Object> addRoutes(Integer lineId, Integer versions, Integer directions, List<LsStationRoute> stationRoutes, List<LsSectionRoute> sectionRoutes);

	/**
	 * 添加站点路由
	 * @param stationRoute
	 */
	Map<String, Object> add(LsStationRoute stationRoute);

	/**
	 * 修改站点路由
	 * @param stationRoute
	 */
	Map<String, Object> modify(LsStationRoute stationRoute);

	/**
	 * 交换指定版本的站点、路段路由上下行
	 * 上行的路由换到下行 下行的路由换到上行
	 * @param lineId
	 * @param version
	 * @return
	 */
	Map<String, Object> exchangeDirection(int lineId, int version);

	/**
	 * 调整站间距
	 * @param ids
	 * @param distances
	 * @return
	 */
	Map<String, Object> modifyDistance(List<Integer> ids, List<Double> distances);

	/**
	 * 单环线将首末站路由指向同一个站点
	 * 双环线将四个首末站路由指向同一个站点
	 * @param lineId
	 * @return
	 */
	Map<String, Object> circularRouteHandle(Integer lineId, Integer version);
}