package com.prolog.rdc.tms.service.basicData;

import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;
import com.prolog.rdc.tms.model.dto.basicData.*;
import com.prolog.rdc.tms.model.vo.basicConfigure.ImportPageVO;
import com.prolog.rdc.tms.model.vo.basicData.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface TranslineService {

	/**
	 * 线路分页查询
	 * 
	 * @param vo
	 * @return
	 */
	Page<TmsBaseTranslineDTO> query(TmsBaseTranslineByQueryVo vo);

	/**
	 * 移动目标线路资料查询
	 *
	 * @param lineMoveQueryVO
	 * @return
	 */
	Page<TmsBaseTranslineDTO> moveTargetLineQuery(LineMoveQueryVO lineMoveQueryVO);

	/**
	 * 线路查看
	 * 
	 * @param vo
	 * @return
	 */
	TmsBaseTranslineViewDTO view(TmsBaseTranslineVO vo);

	/**
	 * 线路查看
	 *
	 * @param vo
	 * @return
	 */
	TmsBaseTranslineViewDTO viewByName(TmsBaseTranslineVO vo);

	/**
	 * 线路修改
	 * 
	 * @param vo
	 * @return
	 */
	void update(TmsBaseTranslineVO vo);

	/**
	 * 线路新增
	 * 
	 * @param vo
	 * @return
	 */
	void save(TmsBaseTranslineBySaveVO vo);

	/**
	 * 线路删除
	 * 
	 * @param list
	 * @return
	 */
	void remove(List<TmsBaseTranslineByIdsVO> list);

	/**
	 * 线路物理删除
	 *
	 * @param list
	 * @return
	 */
	void neverDelete(List<TmsBaseTranslineByIdsVO> list);

	/**
	 * 线路-承运方保存
	 * 
	 * @param list
	 * @return
	 */
	void tmsCarrierSave(List<TmsCarrierVO> list);

	/**
	 * 线路-收货方删除
	 * 
	 * @param list
	 * @return
	 */
	void tmsArriverRemove(List<TmsArriverRemoveVO> list);

	/**
	 * 线路-发货方删除
	 *
	 * @param list
	 * @return
	 */
	void tmsShipperRemove(List<TmsShipperRemoveVO> list);

	/**
	 * 线路-发货方新增
	 *
	 * @param list
	 * @return
	 */
	void tmsShipperSave(List<TmsShipperVO> list);
	/**
	 * 线路-收货方新增
	 * 
	 * @param list
	 * @return
	 */
	void tmsArriverSave(List<TmsArriverVO> list);

	/**
	 * 线路地图
	 * 
	 * @param list
	 * @return
	 */
	List<TmsBaseTranslineMapDTO> selectMap(List<TmsBaseTranslineByIdsVO> list);


	/**
	 * 新-线路-查看地图
	 *
	 * @param list
	 * @return
	 */
	List<TmsLineMapDTO> newSelectMap(List<TmsBaseTranslineByIdsVO> list);

	/**
	 * 新线路-站点信息
	 *
	 * @param lineIds
	 * @return
	 */
	List<TmsLineMapDTO> lineSites(List<Long> lineIds);

	/**
	 * 线路-站点移动
	 *
	 * @param lineMoveVO
	 * @return
	 */
	void lineMove(TmsLineMoveVO lineMoveVO);

	/**
	 * 线路地图弹窗
	 * 
	 * @param list
	 * @return
	 */
	List<LineByMapDTO> selectLineByMap(List<String> list);

	/**
	 * 计算里程
	 * 
	 * @param list
	 * @return
	 */
	Object calculate(List<TmsBaseTranslineByCalculateVO> list);

	/**
	 * 线路-承运方查询
	 * 
	 * @param vo
	 * @return
	 */
	Page<TmsCarrierDTO> tmsCarrierPage(TmsCarrierVO vo);

	/**
	 * 线路-收货方查询
	 * 
	 * @param vo
	 * @return
	 */
	Page<TmsArriverDTO> tmsArriverPage(TmsArriverVO vo);


	/**
	 * 线路-收,发货方关联表查询
	 *
	 * @param lineIds
	 * @return
	 */
	List<LineShipperConsigneeDTO> queryLineShipperConsignee(List<Long> lineIds);


	/**
	 * 线路-发货方分页查询
	 *
	 * @param vo
	 * @return
	 */
	Page<TmsShipperDTO> tmsLineShipperPage(TmsLineShipperVO vo);

	/**
	 * 线路-发货方查询
	 *
	 * @param lineShipperQueryVO
	 * @return
	 */
	List<TmsShipperDTO> tmsLineShipperQuery(@RequestBody TmsLineShipperQueryVO lineShipperQueryVO);

	/**
	 * 线路-行政区域查询
	 *
	 * @param vo
	 * @return
	 */
	List<String> getAdministrativeAreas(TmsArriverVO vo);

	/**
	 * 线路-地图修改
	 * 
	 * @param list
	 * @return
	 */
	void saveMap(List<TmsBaseTranslineMapVO> list);

	/**
	 * 线路-地图修改
	 *
	 * @param lineMapSaveVOS
	 * @return
	 */
	void newSaveMap(List<TmsLineMapSaveVO> lineMapSaveVOS);


	/**
	 * 日期保存
	 * 
	 * @param vo
	 * @return
	 */
	void dateSave(TmsBaseTranslineByDateVO vo);

	/**
	 * 日期查询
	 * 
	 * @param vo
	 * @return
	 */
	TmsBaseTranslineByDateDTO dateQuery(TmsBaseTranslineByIdsVO vo);

	/**
	 * 查询地图明细
	 * 
	 * @param vo
	 * @return
	 */
	List<TmsBaseTranslineMapDetailsDTO> selectMapDetails(TmsBaseTranslineMapDetailsVO vo);

	/**
	 * 线路批量导入
	 * 
	 * @param file
	 * @return
	 * @throws Exception
	 */
	void batchImportData(MultipartFile file,String importBatchNumber) throws Exception;

	/**
	 * 线路导入撤销
	 * 
	 * @param batchno
	 * @throws Exception
	 */
	void rollbackData(String batchno) throws Exception;

	/**
	 * 线路-收货方批量导入
	 * 
	 * @param file
	 * @return
	 * @throws Exception
	 */
	void batchImportConsigneeData(MultipartFile file,String importBatchNumber) throws Exception;

	/**
	 * 线路-发货方批量导入
	 *
	 * @param file
	 * @return
	 * @throws Exception
	 */
	void batchImportShipperData(MultipartFile file,String importBatchNumber) throws Exception;


	/**
	 * 线路-收货方导入撤销
	 * 
	 * @param batchno
	 * @throws Exception
	 */
	void rollbackConsigneeData(String batchno) throws Exception;

	/**
	 * 线路-发货方导入撤销
	 *
	 * @param batchno
	 * @throws Exception
	 */
	void rollbackShipperData(String batchno) throws Exception;

	/**
	 * 线路-承运方批量导入
	 * 
	 * @param file
	 * @return
	 * @throws Exception
	 */
	void batchImportCarrierData(MultipartFile file,String importBatchNumber) throws Exception;

	/**
	 * 线路-承运方导入撤销
	 * 
	 * @param batchno
	 * @throws Exception
	 */
	void rollbackCarrierData(String batchno) throws Exception;

	/**
	 * 线路导入分页查询
	 * 
	 * @param importPageVO
	 * @return
	 */
	RestMessage<Object> pageLineByImportBatchNumberData(ImportPageVO importPageVO);

	/**
	 * 线路承运方导入分页查询
	 * 
	 * @param importPageVO
	 * @return
	 */
	RestMessage<Object> pageLineCarrierByImportBatchNumberData(ImportPageVO importPageVO);

	/**
	 * 线路收货方导入分页查询
	 * 
	 * @param importPageVO
	 * @return
	 */
	RestMessage<Object> pageLineConsigneeByImportBatchNumberData(ImportPageVO importPageVO);

	/**
	 * 线路-承运方查看
	 *
	 * @param vo
	 * @return
	 */
	List<TmsCarrierDTO> tmsCarrierView(TmsCarrierViewVO vo);

	/**
	 * 根据客户查询线路
	 *
	 * @param lineByCustomerQueryVO
	 * @return
	 */
	LineByCustomerQueryDTO getLineByCustomerData(LineByCustomerQueryVO lineByCustomerQueryVO);

	/**
	 * 线路弹窗
	 *
	 * @param tmsBaseTranslinePopVO
	 * @return
	 */
    Page<TmsBaseTranslinePopDTO> getLineByPopData(TmsBaseTranslinePopVO tmsBaseTranslinePopVO);

	/**
	 * 查看途径点
	 *
	 * @param lineVO
	 * @return
	 */
	List<TmsLineWaySiteDTO> queryWaySite(TmsBaseTranslineByIdsVO lineVO);

	/**
	 * 运单匹配线路查询
	 *
	 * @param vo
	 * @return
	 */
	List<ShipbillMatchLineQueryDTO> shipbillMatchLineQuery(ShipbillMatchLineQueryVO vo);

	/**
	 * 线路资料弹框
	 *
	 * @param vo
	 * @return
	 */
	List<ShipbillMatchLineQueryDTO> queryLineForPopup(TmsBaseTranslineByQueryVo vo);
}
