package com.prolog.rdc.tms.service;

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

import com.prolog.framework.core.pojo.Page;
import com.prolog.product.core.framework.entity.UserEntity;
import com.prolog.rdc.tms.model.dto.DispatchCkApprovalSCDTO;
import com.prolog.rdc.tms.model.dto.ExportSendCarDTO;
import com.prolog.rdc.tms.model.dto.LoadingBillMapDTO;
import com.prolog.rdc.tms.model.dto.LoadingSiteInfoDTO;
import com.prolog.rdc.tms.model.dto.SendCarItemPageDTO;
import com.prolog.rdc.tms.model.dto.SendCarMapDTO;
import com.prolog.rdc.tms.model.dto.SendCarPackagePageDTO;
import com.prolog.rdc.tms.model.dto.SendCarPageDTO;
import com.prolog.rdc.tms.model.dto.SendCarPageDetailDTO;
import com.prolog.rdc.tms.model.dto.SendCarShipbillPopDTODTO;
import com.prolog.rdc.tms.model.dto.SendCarViewByIdDTO;
import com.prolog.rdc.tms.model.dto.SendCarViewDTO;
import com.prolog.rdc.tms.model.dto.ShipbillHeaderPageDTO;
import com.prolog.rdc.tms.model.vo.DispatchApprovalInfoVO;
import com.prolog.rdc.tms.model.vo.DispatchApprovalRetractVO;
import com.prolog.rdc.tms.model.vo.DispatchApprovalSubmitVO;
import com.prolog.rdc.tms.model.vo.DispatchApprovalVO;
import com.prolog.rdc.tms.model.vo.DispatchCkApprovalInvalidVO;
import com.prolog.rdc.tms.model.vo.LoadingBillMapVO;
import com.prolog.rdc.tms.model.vo.LoadingSiteInfoQueryVO;
import com.prolog.rdc.tms.model.vo.SendCarAddDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarAdsQueryVO;
import com.prolog.rdc.tms.model.vo.SendCarCalculateMileageVO;
import com.prolog.rdc.tms.model.vo.SendCarDeleteDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarExportAllVO;
import com.prolog.rdc.tms.model.vo.SendCarExportPageVO;
import com.prolog.rdc.tms.model.vo.SendCarItemDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarMobileDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarPackageDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarPageDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarPageVO;
import com.prolog.rdc.tms.model.vo.SendCarShipbillPopVO;
import com.prolog.rdc.tms.model.vo.SendCarUpdateAddDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarUpdateDeleteDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarUpdateMobileDetailVO;
import com.prolog.rdc.tms.model.vo.SendCarUpdateVO;

/**
 * 已派车服务层
 *
 * @author zhangsj
 * @since 2022-04-13 14:32:31
 */
public interface SendCarService {

	/**
	 * 已派车分页查询
	 * 
	 * @param sendCarPageVO
	 * @return
	 */
	Page<SendCarPageDTO> sendcarPageData(SendCarPageVO sendCarPageVO);

	/**
	 * 已派车高级查询
	 *
	 * @param advancedQueryVO
	 * @return
	 */
	Page<SendCarPageDTO> pageAdvanced(SendCarAdsQueryVO advancedQueryVO);

	/**
	 * 已派车运单撤销
	 * 
	 * @param ids
	 */
	void sendcarUndoData(List<String> ids);

	/**
	 * 已派车审核
	 * 
	 * @param ids
	 */
	void sendcarAuditData(List<String> ids);

	/**
	 * 自动已派车审核
	 *
	 * @param ids
	 */
	void autoSendcarAuditData(List<String> ids, UserEntity user, Date date);

	/**
	 * 已派车地图查询
	 * 
	 * @param ids
	 * @return
	 */
	List<SendCarMapDTO> sendcarMapQueryData(List<String> ids);

	/**
	 * 已派车-运单地图查询
	 * @param ids
	 * @return
	 */
	List<LoadingBillMapDTO> loadingBillMap(List<String> ids);

	/**
	 * 已派车-运单地图保存
	 * @param loadingBillMapVOList
	 * @return
	 */
	void saveLoadingBillMapOrder(List<LoadingBillMapVO> loadingBillMapVOList);

	/**
	 * 已派车计算里程
	 * 
	 * @param sendCarCalculateMileageVOS
	 */
	void calculateMileageData(List<SendCarCalculateMileageVO> sendCarCalculateMileageVOS);

	/**
	 * 导出所有数据
	 * 
	 * @param sendCarExportAllVO
	 * @return
	 */
	List<ExportSendCarDTO> exportAllSendCarData(SendCarExportAllVO sendCarExportAllVO);

	/**
	 * 导出当前页数据
	 * 
	 * @param sendCarExportPageVO
	 * @return
	 */
	List<ExportSendCarDTO> exportPageSendCarData(SendCarExportPageVO sendCarExportPageVO);

	/**
	 * 导出选中数据
	 * 
	 * @param ids
	 * @return
	 */
	List<ExportSendCarDTO> exportChooseSendCarData(List<String> ids);

	/**
	 * 打印派车单
	 * 
	 * @param id
	 * @return
	 */
	Map<String, Object> printSendCarData(String id);

	/**
	 * 派车单查看
	 * 
	 * @param id
	 * @return
	 */
	SendCarViewDTO viewSendCarData(String id);

	/**
	 * 派车单根据单号查看
	 * 
	 * @param id
	 * @return
	 */
	SendCarViewByIdDTO viewSendCarByIdData(String id);

	/**
	 * 已派车配载运单查询
	 * 
	 * @param sendCarPageDetailVO
	 * @return
	 */
	Page<SendCarPageDetailDTO> pageDetailSendCarData(SendCarPageDetailVO sendCarPageDetailVO);

	/**
	 * 已派车配载运单添加
	 * 
	 * @param sendCarAddDetailVO
	 */
	List<ShipbillHeaderPageDTO> addDetailSendCarData(SendCarAddDetailVO sendCarAddDetailVO);

	/**
	 * 已派车配载运单剔除
	 * 
	 * @param sendCarDeleteDetailVO
	 */
	void deleteDetailSendCarData(SendCarDeleteDetailVO sendCarDeleteDetailVO);

	/**
	 * 已派车配载运单移动
	 * 
	 * @param sendCarMobileDetailVO
	 */
	void mobileDetailSendCarData(SendCarMobileDetailVO sendCarMobileDetailVO);

	/**
	 * 已派车配载商品查询
	 * 
	 * @param sendCarItemDetailVO
	 * @return
	 */
	Page<SendCarItemPageDTO> itemDetailSendCarData(SendCarItemDetailVO sendCarItemDetailVO);

	/**
	 * 已派车配载包裹查询
	 * 
	 * @param sendCarPackageDetailVO
	 * @return
	 */
	Page<SendCarPackagePageDTO> packageDetailSendCarData(SendCarPackageDetailVO sendCarPackageDetailVO);

	/**
	 * 已派车修改
	 * 
	 * @param sendCarUpdateVO
	 */
	void updateSendCarData(SendCarUpdateVO sendCarUpdateVO);

	/**
	 * 已派车修改—运单添加
	 * 
	 * @param sendCarUpdateAddDetailVO
	 */
	List<ShipbillHeaderPageDTO> updateAddDetailSendCarData(SendCarUpdateAddDetailVO sendCarUpdateAddDetailVO);

	/**
	 * 已派车修改—运单剔除
	 * 
	 * @param sendCarUpdateDeleteDetailVO
	 */
	void updateDeleteDetailSendCarData(SendCarUpdateDeleteDetailVO sendCarUpdateDeleteDetailVO);

	/**
	 * 已派车修改—运单移动
	 * 
	 * @param sendCarUpdateMobileDetailVO
	 */
	void updateMobileDetailSendCarData(SendCarUpdateMobileDetailVO sendCarUpdateMobileDetailVO);

	/**
	 * 已派车运单弹窗
	 *
	 * @param sendCarShipbillPopVO
	 * @return
	 */
	Page<SendCarShipbillPopDTODTO> shipbillPopData(SendCarShipbillPopVO sendCarShipbillPopVO);

	/**
	 * 调度单审核信息查询
	 *
	 * @param approvalInfoVO
	 * @return
	 */
	DispatchCkApprovalSCDTO getApprovalInfoData(DispatchApprovalInfoVO approvalInfoVO);

	/**
	 * 调度单审批作废
	 *
	 * @param approvalInvalidVO
	 */
	void dispatchApprovalInvalidData(DispatchCkApprovalInvalidVO approvalInvalidVO);

	/**
	 * 调度单审批流撤回
	 *
	 * @param approvalRetractVO
	 */
	void dispatchApprovalRetractData(DispatchApprovalRetractVO approvalRetractVO);

	/**
	 * 调度单审批流提交
	 *
	 * @param approvalSubmitVO
	 */
	void dispatchApprovalSubmitData(DispatchApprovalSubmitVO approvalSubmitVO);

	/**
	 * 调度单审批流审核
	 *
	 * @param approvalVO
	 */
	void dispatchApprovalData(DispatchApprovalVO approvalVO);

	/**
	 * 派车单站点信息查询
	 *
	 * @param vo
	 */
	List<LoadingSiteInfoDTO> loadingSiteQuery(LoadingSiteInfoQueryVO vo);

	/**
	 * 反审核
	 *
	 * @param vo
	 */
	void undoAuditSendCarData(List<String> loadingBillIds);
}
