--①应到时间>中班清场时间-1h,应赶频次时间=应到时间所在日期+1日的早班最优离场时间-1h;
case when t.mid_time is not null
and t.early_optimal_time is not null
and from_unixtime(unix_timestamp(t.parrive_time),'yyyy-MM-dd HH:mm:ss')>
from_unixtime(unix_timestamp(concat(substr(t.parrive_time,1,11),t.mid_time,':00'))-3600,'yyyy-MM-dd HH:mm:ss')
then from_unixtime(unix_timestamp(concat(date_add(substr(t.parrive_time,1,10),1),' ',t.early_optimal_time,':00'))-3600,'yyyy-MM-dd HH:mm:ss')
06-12
8430
09-13
3732