package com.sckw.fleet.api;

import com.sckw.fleet.api.model.dto.RUpdateDriverScoreDto;
import com.sckw.fleet.api.model.vo.*;

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

/**
 * @author zk
 * @desc 车队服务
 * @date 2023/7/18 0018
 */
public interface RemoteFleetService {

    /**
     * @param driverIds 司机档案主键id，多个已逗号隔开
     * @desc 查询司机信息
     * @author zk
     * @date 2023/7/18
     **/
    Map<Long, RDriverVo> findDriver(List<Long> driverIds);

    /**
     * @param driverId 司机档案主键id
     * @desc 查询司机信息
     * @author zk
     * @date 2023/8/3
     **/
    RDriverVo findDriver(Long driverId);

    /**
     * @param phone 司机档手机号
     * @desc 查询司机信息
     * @author zk
     * @date 2023/8/10
     **/
    RDriverDetailVo findDriverDetai(String phone);

    /**
     * @param params 司机档案信息
     * @desc 更新司机信息
     * @author zk
     * @date 2023/8/3
     **/
    int updateById(RDriverVo params);

    /**
     * @param truckNos 车牌号，多个已逗号隔开
     * @desc 查询车辆信息
     * @author zk
     * @date 2023/7/18
     **/
    Map<String, RTruckVo> findTruck(List<String> truckNos);

    /**
     * @param truckId 车辆档案主键id
     * @desc 查询车辆信息
     * @author zk
     * @date 2023/8/3
     **/
    RTruckVo findTruck(Long truckId);

    /**
     * @param params 车辆档案信息
     * @desc 更新车辆档案
     * @author zk
     * @date 2023/8/3
     **/
    int updateById(RTruckVo params);

    /**
     * @param entIds 企业ID
     * @desc 企业运力统计
     * @author zk
     * @date 2023/9/4
     **/
    List<Map<String, Object>> capacityStatistics(List<Long> entIds, Integer capacityAmountMin, Integer capacityAmountMax);

    /**
     * 根据车队id查询车辆数据的第一条
     * @param entId
     * @return
     */
    RTruckVo findDataFirstTruck(Long entId);

    RTruckVo findDriveAndTruckByPhone(String mobile);

    void saveOrUpdate(RTruckRouteVo params);

    RDriverVo findDriverByPhone(String mobile);

    RFleetDriverVo findFleetByDriveId(Long driveId);

    List<RFleetDriverVo> findFleetDriveByEntId(Long entId);

    List<RFleetVo> findFleetByEntId(Long entId);

    /**
     * 通过车队id查询车队信息
      * @param fleetId
     * @return
     */
    RFleetVo findFleetById(Long fleetId);

    TmsTruckAxleNumVO getCarAxisInfo(Integer axleNumId);

    List<TmsTruckAxleNumVO> getCarAxisInfoList(List<Integer> axleNumIds);


    List<RTruckVo> findTruckByTruckIds(List<Long> truckIds);

    List<RFleetVo> findFleetByIds(Set<Long> fleetIds);

    RTruckVo findTruckByTruckNo(String truckNo);

    void updateTruckTareAmount(RTruckVo truckNo);

    RFleetVo findFleetByTruckId(Long truckId);

    TruckDispatchCoefficientVO findAutoTruckDispatchByEntId(Long entId);

    List<TruckDispatchCoefficientVO> findAutoTruckDispatchByEntIds(List<Long> entIds);

    DriverConductRulesVO findDriverConductRulesByEntId(Long entId);

    List<RTruckVo> findTruckByEntIds(Long entId);

    void updateDriverScoreByEntId(RUpdateDriverScoreDto dto);

    void driverBindTruck(Long driverId, Long truckId,Long entId);


    void unbindTruck(Long entId, Long driverId);

    /**
     * @param driverId 司机分数
     * @desc 查询司机分数
     * @author zk
     * @date 2023/8/3
     **/
    RDriverScoreVo findDriverScore(Long supEntId, Long logEntId, Long driverId);
}
