|
|
|
@ -109,12 +109,13 @@ namespace Myshipping.Core.Service
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/DjyVesselInfoService/GetList")]
|
|
|
|
|
public async Task<dynamic> GetList([FromQuery] string CarrierID, DateTime? ETD = null, string KeyWord = "")
|
|
|
|
|
public async Task<dynamic> GetList([FromQuery] string CarrierID, DateTime? ETD = null, string PortDischargeId = null,string KeyWord = "")
|
|
|
|
|
{
|
|
|
|
|
//获取船名
|
|
|
|
|
List<CodeVessel> list = await _sysCacheService.GetAllCodeVessel();
|
|
|
|
|
|
|
|
|
|
var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.StartsWith(KeyWord.ToUpper())).
|
|
|
|
|
WhereIF(!string.IsNullOrEmpty(PortDischargeId),x=>x.PortDischargeId==PortDischargeId).
|
|
|
|
|
WhereIF(ETD != null, x => Convert.ToDateTime(x.ETD).ToString("yyyy-MM-dd") == Convert.ToDateTime(ETD).ToString("yyyy-MM-dd")).//船期关联船名
|
|
|
|
|
WhereIF(ETD == null, x => x.ETD > DateTime.Now.AddDays(-7)).//领导需求当前日期7天之前
|
|
|
|
|
WhereIF(!string.IsNullOrEmpty(CarrierID),x=>x.CARRIERID==CarrierID|| x.CARRIERID==null|| x.CARRIERID == "").
|
|
|
|
@ -126,6 +127,8 @@ namespace Myshipping.Core.Service
|
|
|
|
|
Vessel = x.Vessel,
|
|
|
|
|
ETD = x.ETD == null ? "" : Convert.ToDateTime(x.ETD).ToString("yyyy-MM-dd"),
|
|
|
|
|
ATD = x.ATD == null ? "" : Convert.ToDateTime(x.ATD).ToString("yyyy-MM-dd"),
|
|
|
|
|
PortDischargeId=x.PortDischargeId,
|
|
|
|
|
PortDischarge=x.PortDischarge
|
|
|
|
|
}).Take(20).
|
|
|
|
|
ToListAsync();
|
|
|
|
|
|
|
|
|
@ -147,6 +150,8 @@ namespace Myshipping.Core.Service
|
|
|
|
|
Vessel = x.Name,
|
|
|
|
|
ETD = "",
|
|
|
|
|
ATD = "",
|
|
|
|
|
PortDischargeId = "",
|
|
|
|
|
PortDischarge = ""
|
|
|
|
|
}).Take(20).ToList();
|
|
|
|
|
foreach (var item in ves)
|
|
|
|
|
{
|
|
|
|
|