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

import com.prolog.framework.dao.mapper.BaseMapper;
import com.prolog.rdc.tms.model.entity.line.TmsVehicleGPSModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 车辆GPS数据Mapper
 *
 * @author xiaoyf
 * @date 2022/03/16
 */
@Mapper
public interface TmsVehicleGPSMapper extends BaseMapper<TmsVehicleGPSModel> {

    /**
     * findOneByCondition
     * @param enterpriseId
     * @param driverId
     * @param shipped
     * @return
     */
    TmsVehicleGPSModel findOneByCondition(@Param("enterpriseId") Long enterpriseId, @Param("driverId") Long driverId,
                                          @Param("shipped") String shipped);

    /**
     * findByCondition
     * @param enterpriseId
     * @param driverId
     * @param loadingBillId
     * @return
     */
    List<TmsVehicleGPSModel> findByCondition(@Param("enterpriseId") Long enterpriseId, @Param("driverId") Long driverId,
                                             @Param("loadingBillId") String loadingBillId, @Param("longitude") BigDecimal longitude,
                                             @Param("latitude") BigDecimal latitude);

    /**
     * getByCondition
     * @param enterpriseId
     * @param driverId
     * @return
     */
    List<TmsVehicleGPSModel> getByCondition(@Param("enterpriseId") Long enterpriseId, @Param("driverId") Long driverId);

}
