Commit e1026ab9 by 向延琳

里程数据初始化

1 parent 87e8257c
...@@ -156,3 +156,10 @@ update t_electric_fence_sns tefs ,t_vehicle_device tvd,t_vehicle tv ...@@ -156,3 +156,10 @@ update t_electric_fence_sns tefs ,t_vehicle_device tvd,t_vehicle tv
set tefs.vd_id = tvd.id set tefs.vd_id = tvd.id
where tvd.sn = tefs.sn where tvd.sn = tefs.sn
and tv.id = tvd.vehicle_id; and tv.id = tvd.vehicle_id;
-- 里程初始化
INSERT INTO t_device_journey_overview (sn, vd_id, total_journey_count, distance, created_by, created_date, updated_date)
select sn, vd_id, count(1), sum(mileage), created_by, created_date, updated_date
from t_device_journey
where vd_id is not null
group by sn, vd_id;
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!