前端连调
This commit is contained in:
parent
bd817acea3
commit
e969bed42e
@ -13,7 +13,7 @@ public class GetDetailTimelineInput
|
|||||||
public int SystemId{ get; set; }
|
public int SystemId{ get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否客户端,false时展示所有轨迹,true时只展示对外的轨迹
|
/// 是否
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsCustomeClient { get; set; }
|
public bool IsClient { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,11 +17,6 @@ public class GetDetailTimelineOutput
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string EnContent { get; set; }
|
public string EnContent { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹发生地
|
|
||||||
/// </summary>
|
|
||||||
public string TrackPlace { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹发生时间
|
/// 轨迹发生时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -51,4 +46,29 @@ public class GetDetailTimelineOutput
|
|||||||
/// 是否高亮
|
/// 是否高亮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsHighlight { get; set; }
|
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);
|
var trackDetails = await _trackDetailsEsRepository.GetListAsync(order.Id);
|
||||||
res.Data = new List<GetDetailTimelineOutput>();
|
res.Data = new List<GetDetailTimelineOutput>();
|
||||||
var isCompleted = false;
|
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()
|
res.Data.Add(new GetDetailTimelineOutput()
|
||||||
{
|
{
|
||||||
IsHighlight = true,
|
IsHighlight = true,
|
||||||
Files = new List<string>(),
|
IsShowHover = true,
|
||||||
//Remark = item.Remark,
|
Remark = item.Remarks == null || item.Remarks == "--" ? "" : item.Remarks,
|
||||||
//TrackTimeZone = item.TrackTimeZone,
|
TrackTimeZone = $"GMT{(item.TrackTimeZone >= 0 ? "+" : "-")}{item.TrackTimeZone}",
|
||||||
TrackTime = ToUnixTimestamp(item.TrackTime),
|
TrackTime = ToUnixTimestamp(item.TrackTime),
|
||||||
TrackPlace = item.TrackPlace,
|
TrackPlace = item.TrackPlace,
|
||||||
EnContent = item.TrackEnContent,
|
EnContent = item.TrackEnContent,
|
||||||
|
Files = string.IsNullOrEmpty(item.Files) || item.Files == "--" ? new List<string>() : item.Files.Split(",").ToList(),
|
||||||
Content = item.TrackContent,
|
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 = "签收",
|
Content = "签收",
|
||||||
IsHighlight = false,
|
IsHighlight = false,
|
||||||
TrackTimeZone = $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}",
|
TrackTimeZone = order.EstimatedDeliveryDate.HasValue ? $"GMT{(order.DestinationTimeZone >= 0 ? "+" : "-")}{order.DestinationTimeZone}" : "",
|
||||||
TrackTime = ToUnixTimestamp(order.EstimatedDeliveryDate),
|
TrackTime = order.EstimatedDeliveryDate.HasValue ? ToUnixTimestamp(DateTime.Parse(order.EstimatedDeliveryDate.ToString()!)) : 0,
|
||||||
TrackTimePrefix = "预计签收时间:",
|
TrackTimePrefix = order.EstimatedDeliveryDate.HasValue ? "预计签收时间:" : "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -182,7 +182,7 @@ public class OrderEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
/// 预计到达时间
|
/// 预计到达时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "EstimatedDeliveryDate")]
|
[SugarColumn(ColumnName = "EstimatedDeliveryDate")]
|
||||||
public DateTime EstimatedDeliveryDate { get; set; }
|
public DateTime? EstimatedDeliveryDate { get; set; }
|
||||||
|
|
||||||
public void ResetTrackInfo()
|
public void ResetTrackInfo()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public class TrackDetailsIndex : IdBaseIndex
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 客户是否可见
|
/// 客户是否可见
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int IsVisibility { get; set; }
|
public bool IsVisibility { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据来源:1外部服务商创建,2内部系统创建,3人工创建
|
/// 数据来源:1外部服务商创建,2内部系统创建,3人工创建
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user