|
|
@ -91,7 +91,7 @@ namespace Myshipping.Application
|
|
|
|
.Where(t => t.TypeCode.Equals("after_port_trace_ctn_status", StringComparison.OrdinalIgnoreCase)).ToList();
|
|
|
|
.Where(t => t.TypeCode.Equals("after_port_trace_ctn_status", StringComparison.OrdinalIgnoreCase)).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
//按顺序取状态配置字典
|
|
|
|
//按顺序取状态配置字典
|
|
|
|
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, string, int>> statusEnumDict = statusDict.Select(a => new { Key = a.Code, Val = new Tuple<string, string,int>(a.Value,a.Remark, 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", "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" };
|
|
|
@ -105,6 +105,9 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (result != null && result.resultData != null)
|
|
|
|
if (result != null && result.resultData != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//这里需要翻译一下箱型
|
|
|
|
|
|
|
|
var ctnCodeMappingList = _cache.GetAllMappingCtn().GetAwaiter().GetResult().ToList();
|
|
|
|
|
|
|
|
|
|
|
|
Dictionary<string, int> referToCtnDict = new Dictionary<string, int>();
|
|
|
|
Dictionary<string, int> referToCtnDict = new Dictionary<string, int>();
|
|
|
|
|
|
|
|
|
|
|
|
bool isTransfer = false;
|
|
|
|
bool isTransfer = false;
|
|
|
@ -113,7 +116,14 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result.resultData.containerInfoList.ForEach(s =>
|
|
|
|
result.resultData.containerInfoList.ForEach(s =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(s.containerStatusInfoList != null && s.containerStatusInfoList.Count > 0)
|
|
|
|
var ctnMapping = ctnCodeMappingList.FirstOrDefault(t => t.MapCode.Equals(s.size));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ctnMapping != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
s.sizeName = ctnMapping.MapName?.Trim();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (s.containerStatusInfoList != null && s.containerStatusInfoList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
referToCtnDict.Add(s.containerNo, s.containerStatusInfoList.Count);
|
|
|
|
referToCtnDict.Add(s.containerNo, s.containerStatusInfoList.Count);
|
|
|
|
|
|
|
|
|
|
|
@ -129,7 +139,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
a.statusCnName = a.statusCd;
|
|
|
|
a.statusCnName = a.statusCd;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return a;
|
|
|
|
return a;
|
|
|
|
}).ToList();
|
|
|
|
}).ToList();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -186,7 +196,7 @@ namespace Myshipping.Application
|
|
|
|
return currStatus;
|
|
|
|
return currStatus;
|
|
|
|
}).ToList();
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
foreach (KeyValuePair<string, Tuple<string, int>> kvp in statusEnumDict)
|
|
|
|
foreach (KeyValuePair<string, Tuple<string,string, int>> kvp in statusEnumDict)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!skipStatus.Contains(kvp.Key))
|
|
|
|
if(!skipStatus.Contains(kvp.Key))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -200,11 +210,16 @@ namespace Myshipping.Application
|
|
|
|
currStatus = new EmbedTraceFlowStatusInfo
|
|
|
|
currStatus = new EmbedTraceFlowStatusInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
statusCd = kvp.Key,
|
|
|
|
statusCd = kvp.Key,
|
|
|
|
statusCnName = kvp.Value.Item1,
|
|
|
|
statusCnName = !string.IsNullOrWhiteSpace(kvp.Value.Item2)? kvp.Value.Item2 : kvp.Value.Item1,
|
|
|
|
sortNo = kvp.Value.Item2,
|
|
|
|
sortNo = kvp.Value.Item3,
|
|
|
|
statusCtnStatic = $"0/{referToCtnDict.Count}",
|
|
|
|
statusCtnStatic = $"0/{referToCtnDict.Count}",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(kvp.Value.Item2))
|
|
|
|
|
|
|
|
currStatus.statusCnName = kvp.Value.Item2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
result.embedTraceFlowStatusList.Add(currStatus);
|
|
|
|
result.embedTraceFlowStatusList.Add(currStatus);
|
|
|
|
}
|
|
|
|
}
|
|
|
|