update crmeb.eb_order set update_time = DATE_ADD(update_time,INTERVAL 1 SECOND) where order_no in ('SH426169319894302396390');
update crmeb.eb_order_detail set update_time = DATE_ADD(update_time,INTERVAL 1 SECOND) where order_no in ('SH426169319894302396390');
update crmeb.eb_user set update_time = DATE_ADD(update_time,INTERVAL 1 SECOND) where id in (
    select uid from crmeb.eb_order where order_no in ('SH426169319894302396390')
);


select
    CONCAT("update dispatch.rd_employee_summary cc,dispatch.tenant_employee_attendance_records ar
   set cc.duty_status=ar.`STATUS`,
	     cc.lon_lat=ar.lon_lat
			 where cc.id=ar.tenant_employee_id and ar.id='",
           (select ar.id from dispatch.tenant_employee_attendance_records ar where ar.tenant_employee_id=x.id order by created_time desc limit 1)
			 ,"';")
from dispatch.rd_employee_summary x where x.id in (
    select DISTINCT tenant_employee_id from dispatch.tenant_employee_attendance_records