package com.prolog.rdc.tms.app.dao.mapper;

import com.prolog.framework.dao.mapper.BaseMapper;
import com.prolog.rdc.tms.app.model.dto.*;
import com.prolog.rdc.tms.app.model.dto.business.*;
import com.prolog.rdc.tms.app.model.entity.TmsShipbillHeaderModel;
import com.prolog.rdc.tms.app.model.vo.*;
import com.prolog.rdc.tms.app.model.vo.business.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 运单汇总表mapper
 *
 * Company: 湖北普罗格科技股份有限公司
 *
 * @author zhangsj
 * @since 2022/3/30 14:37
 */
@Repository
public interface TmsShipbillHeaderMapper extends BaseMapper<TmsShipbillHeaderModel> {

    /**
     * 司机待预约汇总查询
     *
     * @param queryVO
     * @return
     */
    List<PendingAppointmentQueryDTO> pendingAppointmentQuery(@Param("vo") PendingAppointmentQueryVO queryVO);

    /**
     * 司机待预约派车单模式查询
     *
     * @param queryVO
     * @return
     */
    List<PendingAppointmentQueryDTO> pendingAppointmentQueryLoadBillType(@Param("vo") PendingAppointmentQueryVO queryVO);

    /**
     * 司机待预约明细查询
     *
     * @param queryVO
     * @return
     */
    List<PendingAppointmentDetailQueryDTO> pendingAppointmentDetailQuery(@Param("vo") PendingAppointmentDetailQueryVO queryVO);

    /**
     * 司机待提货汇总查询
     *
     * @param queryVO
     * @return
     */
    List<PendingPickUpQueryDTO> pendingPickUpQuery(@Param("vo") PendingPickUpQueryVO queryVO);


    /**
     * 司机待提货明细查询
     *
     * @param queryVO
     * @return
     */
    List<PendingPickUpDetailQueryDTO> pendingPickUpDetailQuery(@Param("vo") PendingPickUpDetailQueryVO queryVO);


    /**
     * 运单明细查询
     *
     * @param queryVO
     * @return
     */
    List<ShipbillItemDetailQueryDTO> shipbillItemDetailQuery(@Param("vo") ShipbillDetailQueryVO queryVO);

    /**
     * 仓库任务数汇总查询
     *
     * @param queryVO
     * @return
     */
    List<PendingDeliveryTaskQueryDTO> pendingDeliveryTaskQuery(@Param("vo") PendingDeliveryTaskQueryVO queryVO);

    /**
     * 待送达收货方模式
     *
     * @param queryVO
     * @return
     */
    List<PendingDeliveryTaskQueryDTO> pendingDeliveryTaskQueryGroupByConsignee(@Param("vo") PendingDeliveryTaskQueryVO queryVO);

    /**
     * 待自提主界面分页查询
     *
     * @param
     * @return
     */
    List<WaitForSelfWithdrawalDTO> queryWaitForSelfWithdrawal(@Param("vo") WaitForSelfWithdrawalQueryVO vo);


    /**
     * 调整运单模式查询
     *
     * @param
     * @return
     */
    List<AdjustmentQueryDTO> queryAdjustmentShipbill(@Param("vo") AdjustShipbillQueryVO adjustShipbillQueryVO);

    /**
     * 业务版小程序运单管理分页查询
     *
     * @param
     * @return
     */
    List<ShipbillManageDTO> shipbillManageQuery(@Param("vo") ShipbillManageQueryVO vo);

    /**
     * 全链路任务查询
     *
     * @param queryVO
     * @return
     */
    List<PendingFullLinkQueryDTO> pendingFullLinkQuery(@Param("vo") PendingFullLinkQueryVO queryVO);

    /**
     * 运单管理调整分页查询
     *
     * @param
     * @return
     */
    List<ShipbillManageDTO> shipbillManageAdjustQuery(@Param("vo") ShipbillManageQueryVO vo);

    /**
     * 收发货小程序合计
     * @param vo
     * @return
     */
    Integer countShipBillForReceiptAndDelivery(@Param("vo") ReceiptAndDeliveryQueryVO vo);

    /**
     * 收发货小程序查询
     * @param vo
     * @return
     */
    List<ReceiptAndDeliveryDTO> shipBillForReceiptAndDeliveryQuery(@Param("vo") ReceiptAndDeliveryQueryVO vo);

    /**
     * 销售单模式查询
     * @param vo
     * @return
     */
    List<AllShipbillPageDTO> querySellAllShipbill(@Param("vo") AllShipbillQueryVO vo);


    /**
     * 自动签到信息查询
     *
     * @param shipbillId
     * @return
     */
    List<AutoSignInfoQueryDTO> autoSignInfoQuery(@Param("shipbillId") String shipbillId);

    /**
     * 回单查询
     * @param vo
     * @return
     */
    List<PendingReceiptDTO> pendingReceiptQuery(@Param("vo") PendingReceiptQueryVO vo);

    /**
     * 待调度分页查询
     *
     * @param
     * @return
     */
    List<PendingDispatchQueryDTO> dispatchShipbillQuery(@Param("vo") PendingDispatchQueryVO vo);


    List<ScanDispatchShipbillDTO> scanDispatchShipbill(@Param("vo") BillScanVO vo);

    List<ScanDispatchDetailDTO> scanDispatchShipbillDetail(@Param("vo") BillScanVO vo);
}
