|
|
|
@ -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 })
|
|
|
|
|
.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)
|
|
|
|
|
{
|
|
|
|
@ -106,6 +107,8 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, int> referToCtnDict = new Dictionary<string, int>();
|
|
|
|
|
|
|
|
|
|
bool isTransfer = false;
|
|
|
|
|
|
|
|
|
|
if (result.resultData.containerInfoList != null && result.resultData.containerInfoList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
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>();
|
|
|
|
|
|
|
|
|
|
var ctnNo = referToCtnDict.OrderByDescending(a => a.Value).FirstOrDefault().Key;
|
|
|
|
@ -180,6 +189,9 @@ namespace Myshipping.Application
|
|
|
|
|
foreach (KeyValuePair<string, Tuple<string, int>> kvp in statusEnumDict)
|
|
|
|
|
{
|
|
|
|
|
if(!skipStatus.Contains(kvp.Key))
|
|
|
|
|
{
|
|
|
|
|
//不是中转的需要把状态节点去掉
|
|
|
|
|
if (isTransfer || (!isTransfer && !transferStatus.Contains(kvp.Key)))
|
|
|
|
|
{
|
|
|
|
|
var currStatus = takeList.FirstOrDefault(p => p.statusCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
@ -199,6 +211,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|