|
|
@ -1120,6 +1120,23 @@ namespace Myshipping.Application
|
|
|
|
if (fromEntity.Count > 0)
|
|
|
|
if (fromEntity.Count > 0)
|
|
|
|
model.From = fromEntity.Select(p => p.Adapt<TaskRollingNominationShipDto>()).ToList();
|
|
|
|
model.From = fromEntity.Select(p => p.Adapt<TaskRollingNominationShipDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.LoadDetailList = list.Select(a => a.Adapt<TaskRollingNominationShipDetailShowDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model.From != null && model.From.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var firstLoadDetail = model.LoadDetailList.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model.From.Any(t => string.IsNullOrWhiteSpace(t.Port)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
model.From = model.From.Where(a => a.Terminal.Contains(firstLoadDetail.LoadPortName?.Trim())).ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
model.From = model.From.Where(a => a.Port.Equals(firstLoadDetail.LoadPortName?.Trim(),StringComparison.OrdinalIgnoreCase)).ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var toEntity = shipList.Where(a => Regex.IsMatch(a.SHIP_TYPE, "To(\\s+[0-9]+)?"
|
|
|
|
var toEntity = shipList.Where(a => Regex.IsMatch(a.SHIP_TYPE, "To(\\s+[0-9]+)?"
|
|
|
|
, RegexOptions.IgnoreCase)).ToList();
|
|
|
|
, RegexOptions.IgnoreCase)).ToList();
|
|
|
|
|
|
|
|
|
|
|
@ -1180,8 +1197,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
List<Tuple<string, int>> tuples = new List<Tuple<string, int>>();
|
|
|
|
List<Tuple<string, int>> tuples = new List<Tuple<string, int>>();
|
|
|
|
|
|
|
|
|
|
|
|
model.LoadDetailList = list.Select(a => a.Adapt<TaskRollingNominationShipDetailShowDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.FromToList = new List<TaskRollingNominationShipFromToDto>();
|
|
|
|
model.FromToList = new List<TaskRollingNominationShipFromToDto>();
|
|
|
|
|
|
|
|
|
|
|
|
if (model.LoadDetailList.Count > 0)
|
|
|
|
if (model.LoadDetailList.Count > 0)
|
|
|
|