update: 【获取时间轴】当存在需要显示的轨迹才需要补充签收节点
This commit is contained in:
parent
85d0b9efe1
commit
7fe025c9bd
@ -251,8 +251,11 @@ public class TrackOrderService : ApplicationService
|
|||||||
if (!order.IsCompleted) //如果没完结则显示签收节点
|
if (!order.IsCompleted) //如果没完结则显示签收节点
|
||||||
{
|
{
|
||||||
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.All(m => m.TrackTime < eddUnixTimestamp);
|
||||||
|
|
||||||
var isShowTime = eddUnixTimestamp > 0 && res.Data != null && res.Data.All(m => m.TrackTime < eddUnixTimestamp);
|
//当存在需要显示的轨迹才需要补充签收节点
|
||||||
|
if (res.Data.Count != 0)
|
||||||
|
{
|
||||||
res.Data.Add(new GetDetailTimelineOutput()
|
res.Data.Add(new GetDetailTimelineOutput()
|
||||||
{
|
{
|
||||||
Content = "签收",
|
Content = "签收",
|
||||||
@ -262,6 +265,7 @@ public class TrackOrderService : ApplicationService
|
|||||||
TrackTimePrefix = isShowTime ? "预计签收时间:" : "",
|
TrackTimePrefix = isShowTime ? "预计签收时间:" : "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user