Commit 6ab66057 by 杨林龙

优化里程统计

1 parent 19decf26
...@@ -650,10 +650,12 @@ ...@@ -650,10 +650,12 @@
tv.vin as vin tv.vin as vin
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0 left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
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
and td.source = 1
<if test="checkedUserIdsStr != null and checkedUserIdsStr !=''"> <if test="checkedUserIdsStr != null and checkedUserIdsStr !=''">
and find_in_set(tv.created_by,#{checkedUserIdsStr}) and find_in_set(tv.created_by,#{checkedUserIdsStr})
</if> </if>
...@@ -756,10 +758,12 @@ ...@@ -756,10 +758,12 @@
tv.vin as vin tv.vin as vin
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0 left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
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
and td.source = 1
<if test="checkedUserIdsStr != null and checkedUserIdsStr !=''"> <if test="checkedUserIdsStr != null and checkedUserIdsStr !=''">
and find_in_set(tv.created_by,#{checkedUserIdsStr}) and find_in_set(tv.created_by,#{checkedUserIdsStr})
</if> </if>
...@@ -842,10 +846,12 @@ ...@@ -842,10 +846,12 @@
tv.vin as vin tv.vin as vin
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0 left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
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
and td.source = 1
<if test="checkedUserIdsStr != null and checkedUserIdsStr !=''"> <if test="checkedUserIdsStr != null and checkedUserIdsStr !=''">
and find_in_set(tv.created_by,#{checkedUserIdsStr}) and find_in_set(tv.created_by,#{checkedUserIdsStr})
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!