<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ningdatech.carapi.qrcode.mapper.VehicleGetOnMapper">

<select id="selectVehicleGetOnList" resultType="com.ningdatech.carapi.qrcode.entity.NdVehicleGetOn">
    select driver_id,driver_name,region_id,region_name,company_id,company_name,car_plate
    from nd_vehicle_get_on where id in
    (select max(id) from nd_vehicle_get_on
    where car_plate in
    <foreach collection="carPlateList" open="(" close=")" separator="," item="carPlate">
        #{carPlate}
    </foreach>
    group by car_plate)
</select>
</mapper>