修改运踪查询

master
jianghaiqing 7 months ago
parent f27520d890
commit bf332c593f

@ -6,6 +6,7 @@ using Furion.FriendlyException;
using Furion.JsonSerialization; using Furion.JsonSerialization;
using Furion.RemoteRequest.Extensions; using Furion.RemoteRequest.Extensions;
using Mapster; using Mapster;
using MathNet.Numerics.Distributions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -216,6 +217,19 @@ namespace Myshipping.Application
return currStatus; return currStatus;
}).ToList(); }).ToList();
var APODtotal = takeList.Where(p => p.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)).ToList();
if (APODtotal.Count > 1 && APODtotal.Any(p => p.isComplete))
{
takeList = takeList.Select(a =>
{
if (a.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) && !a.isComplete)
return null;
return a;
}).Where(a => a != null).ToList();
}
foreach (KeyValuePair<string, Tuple<string, 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))
@ -244,6 +258,7 @@ namespace Myshipping.Application
if (currStatus.statusCd.Equals("DPOL", StringComparison.OrdinalIgnoreCase)) if (currStatus.statusCd.Equals("DPOL", StringComparison.OrdinalIgnoreCase))
currStatus.isSplitStart = true; currStatus.isSplitStart = true;
if (currStatus.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)) if (currStatus.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase))
currStatus.isSplitEnd = true; currStatus.isSplitEnd = true;
@ -265,12 +280,29 @@ namespace Myshipping.Application
b.currentNodeCnName = !string.IsNullOrWhiteSpace(statusEnumDict[b.currentNodeCd].Item2) ? statusEnumDict[b.currentNodeCd].Item2 : statusEnumDict[b.currentNodeCd].Item1; b.currentNodeCnName = !string.IsNullOrWhiteSpace(statusEnumDict[b.currentNodeCd].Item2) ? statusEnumDict[b.currentNodeCd].Item2 : statusEnumDict[b.currentNodeCd].Item1;
} }
b.containerStatusInfoList.ForEach(c => { b.containerStatusInfoList = b.containerStatusInfoList.Select(c =>
{
if (!string.IsNullOrWhiteSpace(b.currentNodeCd) && b.currentNodeCd.Equals(c.statusCd, StringComparison.OrdinalIgnoreCase)) if (!string.IsNullOrWhiteSpace(b.currentNodeCd) && b.currentNodeCd.Equals(c.statusCd, StringComparison.OrdinalIgnoreCase))
{ {
c.isCurrentStatus = true; c.isCurrentStatus = true;
} }
});
if (!string.IsNullOrWhiteSpace(c.statusPlace))
c.statusPlace = c.statusPlace.ToUpper();
if (!string.IsNullOrWhiteSpace(c.statusCd) && c.statusCd.Equals("ETA", StringComparison.OrdinalIgnoreCase))
{
return null;
}
if (!string.IsNullOrWhiteSpace(c.statusCd) && c.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) && !c.isEst.Equals("N", StringComparison.OrdinalIgnoreCase))
{
return null;
}
return c;
}).Where(a => a != null).ToList();
}); });

Loading…
Cancel
Save