<iftest="checkedUserIdsStr != null and checkedUserIdsStr !=''">
and find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
<iftest="activateBeginTime != null and activateBeginTime != '' and activateEndTime != null and activateEndTime != ''">
and DATE_FORMAT(tv.created_date,'%Y-%m-%d') between #{activateBeginTime} and #{activateEndTime}
</if>
<iftest="gpsBeginTime != null and gpsBeginTime != '' and gpsEndTime != null and gpsEndTime != ''">
and (DATE_FORMAT(tdl.last_gps_time,'%Y-%m-%d') between #{gpsEndTime} and #{gpsEndTime} or DATE_FORMAT(tdl.last_bs_time,'%Y-%m-%d') between #{gpsEndTime} and
#{gpsEndTime})
</if>
<iftest="term != null and term !=''">
and(
tv.owner_name like '%${term}%'
or tv.vin like '%${term}%'
or tvd.sn like '%${term}%'
or tw.partner_order_no like '%${term}%'
)
</if>
order by tv.created_date desc, vehicleId, tvd.id
order by tv.created_date desc, vehicleId, tvd.id
</select>
</select>
...
@@ -219,7 +236,24 @@
...
@@ -219,7 +236,24 @@
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
<iftest="checkedUserIdsStr != null and checkedUserIdsStr !=''">
and find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
<iftest="activateBeginTime != null and activateBeginTime != '' and activateEndTime != null and activateEndTime != ''">
and DATE_FORMAT(tv.created_date,'%Y-%m-%d') between #{activateBeginTime} and #{activateEndTime}
</if>
<iftest="gpsBeginTime != null and gpsBeginTime != '' and gpsEndTime != null and gpsEndTime != ''">
and (DATE_FORMAT(tdl.last_gps_time,'%Y-%m-%d') between #{gpsEndTime} and #{gpsEndTime} or DATE_FORMAT(tdl.last_bs_time,'%Y-%m-%d') between #{gpsEndTime} and