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;
|
var eddUnixTimestamp = order.EstimatedDeliveryDate.HasValue ? ToUnixTimestamp(DateTime.Parse(order.EstimatedDeliveryDate.ToString()!)) : 0;
|
||||||
|
|
||||||
//订单没有预计签收时间,或者订单上有预计签收事件,且预计到达时间大于时间轴上所有轨迹内容的发生时间,则显示签收节点
|
res.Data.Add(new GetDetailTimelineOutput()
|
||||||
if (eddUnixTimestamp == 0 || (eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime < eddUnixTimestamp)))
|
|
||||||
{
|
{
|
||||||
res.Data.Add(new GetDetailTimelineOutput()
|
Content = "签收",
|
||||||
{
|
IsHighlight = false,
|
||||||
Content = "签收",
|
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
||||||
IsHighlight = false,
|
TrackTime = eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime > eddUnixTimestamp) ? eddUnixTimestamp : 0,
|
||||||
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
||||||
TrackTime = eddUnixTimestamp,
|
});
|
||||||
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user