fix:展示节点,但是不展示时间
This commit is contained in:
parent
c5903e525a
commit
b0e8b8ec56
@ -242,20 +242,15 @@ public class TrackOrderService : ApplicationService
|
||||
{
|
||||
var eddUnixTimestamp = order.EstimatedDeliveryDate.HasValue ? ToUnixTimestamp(DateTime.Parse(order.EstimatedDeliveryDate.ToString()!)) : 0;
|
||||
|
||||
//订单没有预计签收时间,或者订单上有预计签收事件,且预计到达时间大于时间轴上所有轨迹内容的发生时间,则显示签收节点
|
||||
if (eddUnixTimestamp == 0 || (eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime < eddUnixTimestamp)))
|
||||
res.Data.Add(new GetDetailTimelineOutput()
|
||||
{
|
||||
res.Data.Add(new GetDetailTimelineOutput()
|
||||
{
|
||||
Content = "签收",
|
||||
IsHighlight = false,
|
||||
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
||||
TrackTime = eddUnixTimestamp,
|
||||
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
||||
});
|
||||
}
|
||||
Content = "签收",
|
||||
IsHighlight = false,
|
||||
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
||||
TrackTime = eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime > eddUnixTimestamp) ? eddUnixTimestamp : 0,
|
||||
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
||||
});
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user