fix:时间轴显示时间逻辑调整
This commit is contained in:
parent
b0e8b8ec56
commit
d4c5c84779
@ -242,15 +242,17 @@ 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;
|
||||||
|
|
||||||
|
var isShowTime = eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime < eddUnixTimestamp);
|
||||||
res.Data.Add(new GetDetailTimelineOutput()
|
res.Data.Add(new GetDetailTimelineOutput()
|
||||||
{
|
{
|
||||||
Content = "签收",
|
Content = "签收",
|
||||||
IsHighlight = false,
|
IsHighlight = false,
|
||||||
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
TrackTimeZone = isShowTime ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
||||||
TrackTime = eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime > eddUnixTimestamp) ? eddUnixTimestamp : 0,
|
TrackTime = isShowTime ? eddUnixTimestamp : 0,
|
||||||
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
TrackTimePrefix = isShowTime ? "预计签收时间:" : "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user