|
|
@ -94,7 +94,8 @@ namespace Myshipping.Application
|
|
|
|
Dictionary<string, Tuple<string, int>> statusEnumDict = statusDict.Select(a => new { Key = a.Code, Val = new Tuple<string, int>(a.Value, a.Sort), Sort = a.Sort })
|
|
|
|
Dictionary<string, Tuple<string, int>> statusEnumDict = statusDict.Select(a => new { Key = a.Code, Val = new Tuple<string, int>(a.Value, a.Sort), Sort = a.Sort })
|
|
|
|
.OrderBy(a => a.Sort).ToDictionary(a => a.Key, b => b.Val);
|
|
|
|
.OrderBy(a => a.Sort).ToDictionary(a => a.Key, b => b.Val);
|
|
|
|
|
|
|
|
|
|
|
|
string[] skipStatus = new string[] { "GIOI", "LOFV", "FVD", "FVA", "DFFV", "ETA", "LOR", "DFR", "RA", "DIFR", "LOT", "DIFT", "ADI", "DIDI", "CGRL", "RFP" };
|
|
|
|
string[] skipStatus = new string[] { "GIOI", "LOFV", "FVD", "FVA", "DFFV", "LOR", "DFR", "RA", "DIFR", "LOT", "DIFT", "ADI", "DIDI", "CGRL", "RFP" };
|
|
|
|
|
|
|
|
string[] transferStatus = new string[] { "AIP", "BIP", "ETDIP", "DIIP", "GOIP", "GIIP", "LIP", "EDIP", "DEIP" };
|
|
|
|
|
|
|
|
|
|
|
|
if (queryRlt.code == 200)
|
|
|
|
if (queryRlt.code == 200)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -106,6 +107,8 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Dictionary<string, int> referToCtnDict = new Dictionary<string, int>();
|
|
|
|
Dictionary<string, int> referToCtnDict = new Dictionary<string, int>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isTransfer = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (result.resultData.containerInfoList != null && result.resultData.containerInfoList.Count > 0)
|
|
|
|
if (result.resultData.containerInfoList != null && result.resultData.containerInfoList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result.resultData.containerInfoList.ForEach(s =>
|
|
|
|
result.resultData.containerInfoList.ForEach(s =>
|
|
|
@ -134,6 +137,12 @@ namespace Myshipping.Application
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//legType = "T" 标识当票有中转
|
|
|
|
|
|
|
|
if (result.resultData.routingInfoList.Any(t => t.legType.Equals("T", StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
isTransfer = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
result.embedTraceFlowStatusList = new List<EmbedTraceFlowStatusInfo>();
|
|
|
|
result.embedTraceFlowStatusList = new List<EmbedTraceFlowStatusInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
var ctnNo = referToCtnDict.OrderByDescending(a => a.Value).FirstOrDefault().Key;
|
|
|
|
var ctnNo = referToCtnDict.OrderByDescending(a => a.Value).FirstOrDefault().Key;
|
|
|
@ -181,20 +190,24 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!skipStatus.Contains(kvp.Key))
|
|
|
|
if(!skipStatus.Contains(kvp.Key))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var currStatus = takeList.FirstOrDefault(p => p.statusCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase));
|
|
|
|
//不是中转的需要把状态节点去掉
|
|
|
|
|
|
|
|
if (isTransfer || (!isTransfer && !transferStatus.Contains(kvp.Key)))
|
|
|
|
if(currStatus == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
currStatus = new EmbedTraceFlowStatusInfo
|
|
|
|
var currStatus = takeList.FirstOrDefault(p => p.statusCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currStatus == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
statusCd = kvp.Key,
|
|
|
|
currStatus = new EmbedTraceFlowStatusInfo
|
|
|
|
statusCnName = kvp.Value.Item1,
|
|
|
|
{
|
|
|
|
sortNo = kvp.Value.Item2,
|
|
|
|
statusCd = kvp.Key,
|
|
|
|
statusCtnStatic = $"0/{referToCtnDict.Count}",
|
|
|
|
statusCnName = kvp.Value.Item1,
|
|
|
|
};
|
|
|
|
sortNo = kvp.Value.Item2,
|
|
|
|
|
|
|
|
statusCtnStatic = $"0/{referToCtnDict.Count}",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.embedTraceFlowStatusList.Add(currStatus);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
result.embedTraceFlowStatusList.Add(currStatus);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|