前端连调
This commit is contained in:
parent
bd817acea3
commit
e969bed42e
@ -13,7 +13,7 @@ public class GetDetailTimelineInput
|
||||
public int SystemId{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否客户端,false时展示所有轨迹,true时只展示对外的轨迹
|
||||
/// 是否
|
||||
/// </summary>
|
||||
public bool IsCustomeClient { get; set; }
|
||||
public bool IsClient { get; set; }
|
||||
}
|
||||
|
||||
@ -17,11 +17,6 @@ public class GetDetailTimelineOutput
|
||||
/// </summary>
|
||||
public string EnContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生地
|
||||
/// </summary>
|
||||
public string TrackPlace { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生时间
|
||||
/// </summary>
|
||||
@ -51,4 +46,29 @@ public class GetDetailTimelineOutput
|
||||
/// 是否高亮
|
||||
/// </summary>
|
||||
public bool IsHighlight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示悬停效果
|
||||
/// </summary>
|
||||
public bool IsShowHover { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生地
|
||||
/// </summary>
|
||||
public string TrackPlace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生地(城市)
|
||||
/// </summary>
|
||||
public string? TrackPlaceCity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生地(省/州)
|
||||
/// </summary>
|
||||
public string? TrackPlaceProvince { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生地(国家/地区)
|
||||
/// </summary>
|
||||
public string? TrackPlaceNation { get; set; }
|
||||
}
|
||||
|
||||
@ -191,24 +191,32 @@ public class TrackOrderService : ApplicationService
|
||||
var trackDetails = await _trackDetailsEsRepository.GetListAsync(order.Id);
|
||||
res.Data = new List<GetDetailTimelineOutput>();
|
||||
var isCompleted = false;
|
||||
foreach (var item in trackDetails)
|
||||
foreach (var item in trackDetails.OrderBy(m => m.CreateTime).ToList())
|
||||
{
|
||||
var currentTrackStatus = trackStatus.FirstOrDefault(m => m.Code == item.TrackStatus);
|
||||
|
||||
//是否完结
|
||||
isCompleted = trackStatus.Any(m => m.IsCompleted && m.Code == item.TrackStatus);
|
||||
|
||||
isCompleted = currentTrackStatus?.IsCompleted == true;
|
||||
|
||||
//如果是客户端,且轨迹内容不对外则跳过这条轨迹内容
|
||||
if (input.IsClient && item.IsVisibility)
|
||||
continue;
|
||||
|
||||
res.Data.Add(new GetDetailTimelineOutput()
|
||||
{
|
||||
IsHighlight = true,
|
||||
Files = new List<string>(),
|
||||
//Remark = item.Remark,
|
||||
//TrackTimeZone = item.TrackTimeZone,
|
||||
IsShowHover = true,
|
||||
Remark = item.Remarks == null || item.Remarks == "--" ? "" : item.Remarks,
|
||||
TrackTimeZone = $"GMT{(item.TrackTimeZone >= 0 ? "+" : "-")}{item.TrackTimeZone}",
|
||||
TrackTime = ToUnixTimestamp(item.TrackTime),
|
||||
TrackPlace = item.TrackPlace,
|
||||
EnContent = item.TrackEnContent,
|
||||
Files = string.IsNullOrEmpty(item.Files) || item.Files == "--" ? new List<string>() : item.Files.Split(",").ToList(),
|
||||
Content = item.TrackContent,
|
||||
TrackCode = item.TrackCode
|
||||
TrackCode = item.TrackCode,
|
||||
TrackPlaceNation = item.TrackPlaceNation,
|
||||
TrackPlaceProvince = item.TrackPlaceProvince,
|
||||
TrackPlaceCity = item.TrackPlaceCity,
|
||||
});
|
||||
}
|
||||
|
||||
@ -219,9 +227,9 @@ public class TrackOrderService : ApplicationService
|
||||
{
|
||||
Content = "签收",
|
||||
IsHighlight = false,
|
||||
TrackTimeZone = $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}",
|
||||
TrackTime = ToUnixTimestamp(order.EstimatedDeliveryDate),
|
||||
TrackTimePrefix = "预计签收时间:",
|
||||
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
||||
TrackTime = order.EstimatedDeliveryDate.HasValue ? ToUnixTimestamp(DateTime.Parse(order.EstimatedDeliveryDate.ToString()!)) : 0,
|
||||
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ public class OrderEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
||||
/// 预计到达时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "EstimatedDeliveryDate")]
|
||||
public DateTime EstimatedDeliveryDate { get; set; }
|
||||
public DateTime? EstimatedDeliveryDate { get; set; }
|
||||
|
||||
public void ResetTrackInfo()
|
||||
{
|
||||
|
||||
@ -110,7 +110,7 @@ public class TrackDetailsIndex : IdBaseIndex
|
||||
/// <summary>
|
||||
/// 客户是否可见
|
||||
/// </summary>
|
||||
public int IsVisibility { get; set; }
|
||||
public bool IsVisibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据来源:1外部服务商创建,2内部系统创建,3人工创建
|
||||
|
||||
Loading…
Reference in New Issue
Block a user