package com.sckw.transport.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.transport.model.KwtWaybillOrderSubtask;
import com.sckw.transport.model.dto.WaybillListAppDTO;
import com.sckw.transport.model.dto.WaybillOrderQueryDto;
import com.sckw.transport.model.dto.WaybillSubtaskOrderQueryDto;
import com.sckw.transport.model.param.DriverParam;
import com.sckw.transport.model.vo.DriverListVo;
import com.sckw.transport.model.vo.WaybillSubtaskSelectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * @author zk
 * @desc 车辆运单-子运单
 * @date 2024/3/1 0001
 */
@Mapper
public interface KwtWaybillOrderSubtaskMapper extends BaseMapper<KwtWaybillOrderSubtask> {

    List<KwtWaybillOrderSubtask> findByWOrderId(@Param("wOrderId") Long wOrderId);

    KwtWaybillOrderSubtask findByOrderId(@Param("wOrderId") Long wOrderId, @Param("lOrderId") Long lOrderId);

    List<WaybillSubtaskSelectVo> findListPage(WaybillSubtaskOrderQueryDto params);

    Integer selectCountByOrderId(@Param("orderId") String orderId, @Param("orderStatusList") List<Integer> orderStatusList);

    List<DriverListVo> selectLoopOrderAndDriverListByOrderId(@Param("driverParam") DriverParam driverParam, @Param("type") Integer type, @Param("orderStatus") List<Integer> orderStatus);

    Map<String, Object> findWaybillOrderCount(WaybillOrderQueryDto params);
}
