Commit d48d2fe0 by levphon

导出车辆时,关联电量唯一性

1 parent 9ec90bc0
...@@ -574,7 +574,7 @@ ...@@ -574,7 +574,7 @@
left join t_workorder tw on tw.id = tv.workorder_id left join t_workorder tw on tw.id = tv.workorder_id
left join t_device td on td.sn = tvd.sn left join t_device td on td.sn = tvd.sn
left join t_device_location tdl on tdl.sn = tvd.sn left join t_device_location tdl on tdl.sn = tvd.sn
left join t_device_power tdp on tdp.sn = tvd.sn left join t_device_power tdp on tdp.sn = tvd.sn and tvd.id = tdp.vd_id
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn
left join t_user tu on tu.id = ddf.created_by left join t_user tu on tu.id = ddf.created_by
left join t_user tu2 on tu2.id = tv.created_by left join t_user tu2 on tu2.id = tv.created_by
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!