|
|
@ -96,7 +96,7 @@ namespace Myshipping.Core.Service
|
|
|
|
//获取船名
|
|
|
|
//获取船名
|
|
|
|
List<CodeVessel> list = await _sysCacheService.GetAllCodeVessel();
|
|
|
|
List<CodeVessel> list = await _sysCacheService.GetAllCodeVessel();
|
|
|
|
|
|
|
|
|
|
|
|
var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.Contains(KeyWord)).
|
|
|
|
var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.StartsWith(KeyWord)).
|
|
|
|
Where(x => x.CARRIERID == CarrierID && x.ETD > DateTime.Now.AddDays(-7) && x.TenantId == UserManager.TENANT_ID).
|
|
|
|
Where(x => x.CARRIERID == CarrierID && x.ETD > DateTime.Now.AddDays(-7) && x.TenantId == UserManager.TENANT_ID).
|
|
|
|
Select(x => new
|
|
|
|
Select(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -108,9 +108,9 @@ namespace Myshipping.Core.Service
|
|
|
|
}).Take(20).
|
|
|
|
}).Take(20).
|
|
|
|
ToListAsync();
|
|
|
|
ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
if (tlist.Count() == 0)
|
|
|
|
var ves = tlist.Select(x => x.Vessel).ToList();
|
|
|
|
{
|
|
|
|
var all = list.WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Name.StartsWith(KeyWord)).
|
|
|
|
return list.WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Name.Contains(KeyWord)).Select(x => new
|
|
|
|
Select(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
Voyno = "",
|
|
|
|
Voyno = "",
|
|
|
@ -119,11 +119,11 @@ namespace Myshipping.Core.Service
|
|
|
|
ETD = "",
|
|
|
|
ETD = "",
|
|
|
|
ATD = "",
|
|
|
|
ATD = "",
|
|
|
|
}).Take(20).ToList();
|
|
|
|
}).Take(20).ToList();
|
|
|
|
}
|
|
|
|
foreach (var item in ves)
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return tlist;
|
|
|
|
all.RemoveAll(x => x.Vessel.StartsWith(item));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tlist.Union<dynamic>(all);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|