|
|
|
@ -157,9 +157,9 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
/// <param name="model">请求船期详情</param>
|
|
|
|
|
/// <returns>返回船期结果</returns>
|
|
|
|
|
[HttpPost("/BookingMSKSPOTAPI/SearchShipSailingSchedule")]
|
|
|
|
|
public async Task<List<MSKAPISPOTSearchScheduleRateResultDataDto>> SearchShipSailingSchedule(QueryMSKSPOTShipSailingScheduleDto model)
|
|
|
|
|
public async Task<List<MSKAPISPOTScheduleRateResultShowDto>> SearchShipSailingSchedule(QueryMSKSPOTShipSailingScheduleDto model)
|
|
|
|
|
{
|
|
|
|
|
List<MSKAPISPOTSearchScheduleRateResultDataDto> list = new List<MSKAPISPOTSearchScheduleRateResultDataDto>();
|
|
|
|
|
List<MSKAPISPOTScheduleRateResultShowDto> list = new List<MSKAPISPOTScheduleRateResultShowDto>();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
MSKApiSailingSchedulePoint2Point
|
|
|
|
@ -285,12 +285,158 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
if (resultInfo != null && resultInfo.code == 200
|
|
|
|
|
&& resultInfo.data != null && resultInfo.data.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
list = resultInfo.data;
|
|
|
|
|
|
|
|
|
|
foreach (var scheduleModel in list)
|
|
|
|
|
foreach (var scheduleModel in resultInfo.data)
|
|
|
|
|
{
|
|
|
|
|
await CacheShipSailingSchedule(scheduleModel);
|
|
|
|
|
CacheShipSailingSchedule(scheduleModel).GetAwaiter().GetResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list = resultInfo.data.Select(a =>
|
|
|
|
|
{
|
|
|
|
|
MSKAPISPOTScheduleRateResultShowDto showDto = new MSKAPISPOTScheduleRateResultShowDto
|
|
|
|
|
{
|
|
|
|
|
priceID = a.priceID,
|
|
|
|
|
PId = a.PId,
|
|
|
|
|
MD5 = a.MD5,
|
|
|
|
|
totalAmount = a.totalAmount.HasValue ? (decimal)a.totalAmount.Value : 0,
|
|
|
|
|
TotalCurrency = a.totalCurrency,
|
|
|
|
|
orignCarrierCityGeoID = a.originGeoId,
|
|
|
|
|
orignUNLocationCode = a.originUnLocCode,
|
|
|
|
|
orignCityName = a.originCityName,
|
|
|
|
|
originRegionName = a.originRegionName,
|
|
|
|
|
originCountryName = a.originCountryName,
|
|
|
|
|
|
|
|
|
|
deliveryCarrierCityGeoID = a.destinationGeoId,
|
|
|
|
|
deliveryUNLocationCode = a.destinationUnLocCode,
|
|
|
|
|
deliveryCityName = a.destinationCityName,
|
|
|
|
|
deliveryRegionName = a.destinationRegionName,
|
|
|
|
|
deliveryCountryName = a.destinationCountryName,
|
|
|
|
|
|
|
|
|
|
vesselName = a.vesselName,
|
|
|
|
|
carrierDepartureVoyageNumber = a.voyageNumber,
|
|
|
|
|
|
|
|
|
|
Legs = new List<MSKAPISPOTScheduleRateResultShowLegsDto>()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//ETD
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(a.departureDate))
|
|
|
|
|
{
|
|
|
|
|
DateTime currDate = DateTime.MinValue;
|
|
|
|
|
|
|
|
|
|
if (DateTime.TryParse(a.departureDate, out currDate))
|
|
|
|
|
{
|
|
|
|
|
showDto.ETD = currDate;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"查询船期错误,priceID={a.priceID} pid={a.PId} 预计离港日期departureDate={a.departureDate} 格式解析错误");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ETA
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(a.arrivalDate))
|
|
|
|
|
{
|
|
|
|
|
DateTime currDate = DateTime.MinValue;
|
|
|
|
|
|
|
|
|
|
if (DateTime.TryParse(a.arrivalDate, out currDate))
|
|
|
|
|
{
|
|
|
|
|
showDto.ETA = currDate;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"查询船期错误,priceID={a.priceID} pid={a.PId} 预计到达日期 arrivalDate={a.arrivalDate} 格式解析错误");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//计算预计天数
|
|
|
|
|
if (showDto.ETD.HasValue && showDto.ETA.HasValue)
|
|
|
|
|
{
|
|
|
|
|
TimeSpan ts = showDto.ETD.Value.Subtract(showDto.ETA.Value);
|
|
|
|
|
var timeDiff = ts.TotalHours;
|
|
|
|
|
|
|
|
|
|
showDto.days = (int)Math.Ceiling(timeDiff / 24.0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (a.isTransfer.Equals("true", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
showDto.isTransfer = true;
|
|
|
|
|
|
|
|
|
|
//Legs
|
|
|
|
|
if (a.scheduleDetails != null && a.scheduleDetails.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var legs = a.scheduleDetails.Select(b =>
|
|
|
|
|
{
|
|
|
|
|
MSKAPISPOTScheduleRateResultShowLegsDto leg = new MSKAPISPOTScheduleRateResultShowLegsDto
|
|
|
|
|
{
|
|
|
|
|
vesselName = b.transport.vessel.longName,
|
|
|
|
|
VoyageNo = b.transport.voyageNumber,
|
|
|
|
|
From = new MSKAPISPOTScheduleRateResultShowLegsLocationDto {
|
|
|
|
|
CityGeoId = b.fromLocation.cityGeoId,
|
|
|
|
|
CityName = b.fromLocation.cityName,
|
|
|
|
|
CountryCode = b.fromLocation.countryCode,
|
|
|
|
|
CountryName = b.fromLocation.countryName,
|
|
|
|
|
rkstCode = b.fromLocation.rkstCode,
|
|
|
|
|
SiteGeoId = b.fromLocation.siteGeoId,
|
|
|
|
|
LocationType = "From",
|
|
|
|
|
RegionName = b.fromLocation.regionName,
|
|
|
|
|
SiteName = b.fromLocation.siteName,
|
|
|
|
|
UnLocCode = b.fromLocation.unLocCode,
|
|
|
|
|
},
|
|
|
|
|
To = new MSKAPISPOTScheduleRateResultShowLegsLocationDto {
|
|
|
|
|
CityGeoId = b.toLocation.cityGeoId,
|
|
|
|
|
CityName = b.toLocation.cityName,
|
|
|
|
|
CountryCode = b.toLocation.countryCode,
|
|
|
|
|
CountryName = b.toLocation.countryName,
|
|
|
|
|
rkstCode = b.toLocation.rkstCode,
|
|
|
|
|
SiteGeoId = b.toLocation.siteGeoId,
|
|
|
|
|
LocationType = "To",
|
|
|
|
|
RegionName = b.toLocation.regionName,
|
|
|
|
|
SiteName = b.toLocation.siteName,
|
|
|
|
|
UnLocCode = b.toLocation.unLocCode,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//ETD
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(b.fromLocation.date))
|
|
|
|
|
{
|
|
|
|
|
DateTime currDate = DateTime.MinValue;
|
|
|
|
|
|
|
|
|
|
if (DateTime.TryParse($"{b.fromLocation.date} {b.fromLocation.time}", out currDate))
|
|
|
|
|
{
|
|
|
|
|
leg.ETD = currDate;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"查询船期错误,航程明细 priceID={a.priceID} pid={a.PId} 预计离港日期fromLocation.date={b.fromLocation.date} {b.fromLocation.time} 格式解析错误");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ETA
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(b.toLocation.date))
|
|
|
|
|
{
|
|
|
|
|
DateTime currDate = DateTime.MinValue;
|
|
|
|
|
|
|
|
|
|
if (DateTime.TryParse(a.arrivalDate, out currDate))
|
|
|
|
|
{
|
|
|
|
|
leg.ETD = currDate;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"查询船期错误,航程明细 priceID={a.priceID} pid={a.PId} 预计到达日期 toLocation.date={b.toLocation.date} {b.toLocation.time} 格式解析错误");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return leg;
|
|
|
|
|
}).ToList();
|
|
|
|
|
showDto.Legs = legs.OrderBy(t=>t.ETD).Select((t,idx)=> {
|
|
|
|
|
t.SortNo = idx + 1;
|
|
|
|
|
return t;
|
|
|
|
|
}).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return showDto;
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -315,7 +461,7 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
/// <param name="model">船期查询结果明细</param>
|
|
|
|
|
/// <param name="busiType">船期类型 MSKSPOT-马士基即期</param>
|
|
|
|
|
/// <returns>返回主键ID</returns>
|
|
|
|
|
private async Task<long> CacheShipSailingSchedule(MSKAPISPOTSearchScheduleRateResultDataDto model,string busiType = "MSKSPOT")
|
|
|
|
|
private async Task CacheShipSailingSchedule(MSKAPISPOTSearchScheduleRateResultDataDto model,string busiType = "MSKSPOT")
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
1、按照船期明细缓存,并把ID作为缓存的KEY
|
|
|
|
@ -344,8 +490,6 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
{
|
|
|
|
|
await _cache.SetTimeoutAsync(shareKey, Newtonsoft.Json.JsonConvert.SerializeObject(model), expireTimeSpan);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return model.PId;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -920,181 +1064,6 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 马士基API订舱台账
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 马士基API订舱台账
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="QuerySearch">查询条件</param>
|
|
|
|
|
/// <returns>返回台账列表</returns>
|
|
|
|
|
[HttpPost("/BookingMSKSPOTAPI/GetPage")]
|
|
|
|
|
public async Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync([FromBody] QueryBookingDeliveryRecordDto QuerySearch)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//制单日期
|
|
|
|
|
DateTime createBegin = DateTime.MinValue;
|
|
|
|
|
DateTime createEnd = DateTime.MinValue;
|
|
|
|
|
//更新日期
|
|
|
|
|
DateTime updateBegin = DateTime.MinValue;
|
|
|
|
|
DateTime updateEnd = DateTime.MinValue;
|
|
|
|
|
//预计离港日期
|
|
|
|
|
DateTime edepartureBegin = DateTime.MinValue;
|
|
|
|
|
DateTime edepartureEnd = DateTime.MinValue;
|
|
|
|
|
//ETD日期
|
|
|
|
|
DateTime etdBegin = DateTime.MinValue;
|
|
|
|
|
DateTime etdEnd = DateTime.MinValue;
|
|
|
|
|
//ETA时间
|
|
|
|
|
DateTime etaBegin = DateTime.MinValue;
|
|
|
|
|
DateTime etaEnd = DateTime.MinValue;
|
|
|
|
|
|
|
|
|
|
//定时
|
|
|
|
|
DateTime jobBegin = DateTime.MinValue;
|
|
|
|
|
DateTime jobEnd = DateTime.MinValue;
|
|
|
|
|
|
|
|
|
|
#region 查询条件
|
|
|
|
|
|
|
|
|
|
//制单日期
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.CreateBegin))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.CreateBegin, out createBegin))
|
|
|
|
|
throw Oops.Oh($"创建起始日期格式错误,{QuerySearch.CreateBegin}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.CreateEnd))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.CreateEnd, out createEnd))
|
|
|
|
|
throw Oops.Oh($"创建结束日期格式错误,{QuerySearch.CreateEnd}");
|
|
|
|
|
|
|
|
|
|
createEnd = createEnd.AddDays(1);
|
|
|
|
|
}
|
|
|
|
|
//更新日期
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.UpdateBegin))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.UpdateBegin, out updateBegin))
|
|
|
|
|
throw Oops.Oh($"更新起始日期开始格式错误,{QuerySearch.UpdateBegin}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.UpdateEnd))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.UpdateEnd, out updateEnd))
|
|
|
|
|
throw Oops.Oh($"更新结束日期格式错误,{QuerySearch.UpdateEnd}");
|
|
|
|
|
|
|
|
|
|
updateEnd = updateEnd.AddDays(1);
|
|
|
|
|
}
|
|
|
|
|
//预计离港日期
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.EDepartureBegin))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.EDepartureBegin, out edepartureBegin))
|
|
|
|
|
throw Oops.Oh($"预计离港日期起始格式错误,{QuerySearch.EDepartureBegin}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.EDepartureEnd))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.EDepartureEnd, out edepartureEnd))
|
|
|
|
|
throw Oops.Oh($"预计离港日期结束格式错误,{QuerySearch.EDepartureEnd}");
|
|
|
|
|
|
|
|
|
|
edepartureEnd = edepartureEnd.AddDays(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ETD
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.ETDBegin))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.ETDBegin, out etdBegin))
|
|
|
|
|
throw Oops.Oh($"ETD起始日期格式错误,{QuerySearch.ETDBegin}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.ETDEnd))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.ETDEnd, out etdEnd))
|
|
|
|
|
throw Oops.Oh($"ETD结束日期格式错误,{QuerySearch.ETDEnd}");
|
|
|
|
|
|
|
|
|
|
etdEnd = etdEnd.AddDays(1);
|
|
|
|
|
}
|
|
|
|
|
//ETA
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.ETDBegin))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.ETDBegin, out etaBegin))
|
|
|
|
|
throw Oops.Oh($"ETA起始日期格式错误,{QuerySearch.ETDBegin}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.ETAEnd))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.ETAEnd, out etaEnd))
|
|
|
|
|
throw Oops.Oh($"ETA结束日期格式错误,{QuerySearch.ETAEnd}");
|
|
|
|
|
|
|
|
|
|
etaEnd = etaEnd.AddDays(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//定时
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.JOBBegin))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.JOBBegin, out jobBegin))
|
|
|
|
|
throw Oops.Oh($"返场起始日期格式错误,{QuerySearch.JOBBegin}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.JOBEnd))
|
|
|
|
|
{
|
|
|
|
|
if (!DateTime.TryParse(QuerySearch.JOBEnd, out jobEnd))
|
|
|
|
|
throw Oops.Oh($"返场结束日期格式错误,{QuerySearch.JOBEnd}");
|
|
|
|
|
|
|
|
|
|
jobEnd = jobEnd.AddDays(1);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
string entityOrderCol = "CreatedTime";
|
|
|
|
|
|
|
|
|
|
//这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<BookingDeliveryRecordDto, BookingDeliveryRecord>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
//菜单375504048771141=我的任务台账
|
|
|
|
|
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi);
|
|
|
|
|
|
|
|
|
|
bool isAdmin = false;
|
|
|
|
|
|
|
|
|
|
if (userlist == null)
|
|
|
|
|
{
|
|
|
|
|
isAdmin = true;
|
|
|
|
|
userlist = new List<long>();
|
|
|
|
|
}
|
|
|
|
|
else if (userlist != null && userlist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
userlist.Add(UserManager.UserId);
|
|
|
|
|
userlist = userlist.Distinct().ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("任务台账权限范围 {list}", userlist);
|
|
|
|
|
|
|
|
|
|
var entities = await _bookingDeliveryRecordRep.AsQueryable()
|
|
|
|
|
.Where(t => isAdmin || userlist.Contains(t.CreatedUserId.Value))
|
|
|
|
|
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
|
|
|
|
|
.WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd)
|
|
|
|
|
.WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin)
|
|
|
|
|
.WhereIF(updateEnd != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value < updateEnd)
|
|
|
|
|
.WhereIF(edepartureBegin != DateTime.MinValue, t => t.EARLIEST_DEPARTURE_DATE.HasValue && t.EARLIEST_DEPARTURE_DATE.Value >= edepartureBegin)
|
|
|
|
|
.WhereIF(edepartureEnd != DateTime.MinValue, t => t.EARLIEST_DEPARTURE_DATE.HasValue && t.EARLIEST_DEPARTURE_DATE.Value < edepartureEnd)
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, t => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, t => t.ETD.HasValue && t.ETA.Value < etdEnd)
|
|
|
|
|
.WhereIF(etaBegin != DateTime.MinValue, t => t.ETA.HasValue && t.ETA.Value >= etaBegin)
|
|
|
|
|
.WhereIF(etaEnd != DateTime.MinValue, t => t.ETA.HasValue && t.ETA.Value < etaEnd)
|
|
|
|
|
.WhereIF(jobBegin != DateTime.MinValue, t => t.JOB_TIME.HasValue && t.JOB_TIME.Value >= jobBegin)
|
|
|
|
|
.WhereIF(jobEnd != DateTime.MinValue, t => t.JOB_TIME.HasValue && t.JOB_TIME.Value < jobEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceReference), t => t.PRICE_REFERENCE.Contains(QuerySearch.PriceReference))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookedByCompanyName), t => t.BOOKEDBY_COMPANY_NAME.Contains(QuerySearch.BookedByCompanyName))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookedByCompanyPartyCode), t => t.BOOKEDBY_COMPANY_PARTYCODE.Contains(QuerySearch.BookedByCompanyPartyCode))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceOwnerCompanyName), t => t.PRICE_OWNER_COMPANY_NAME.Contains(QuerySearch.PriceOwnerCompanyName))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceOwnerCompanyPartyCode), t => t.PRICE_OWNER_COMPANY_PARTYCODE.Contains(QuerySearch.PriceOwnerCompanyPartyCode))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PlaceReceiptCity), t => t.PLACERECEIPT_CITY.Contains(QuerySearch.PlaceReceiptCity) || t.PLACERECEIPT_UNLOC_CODE.Contains(QuerySearch.PlaceReceiptCity))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PlaceDeliveryCity), t => t.PLACEDELIVERY_CITY.Contains(QuerySearch.PlaceDeliveryCity) || t.PLACEDELIVERY_UNLOC_CODE.Contains(QuerySearch.PlaceDeliveryCity))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookingReference), t => t.BOOKING_REFERENCE.Contains(QuerySearch.BookingReference))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookingCreator), t => t.CreatedUserName.Contains(QuerySearch.BookingCreator) || t.UpdatedUserName.Contains(QuerySearch.BookingCreator))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<BookingDeliveryRecordPageDto>>();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 获取马士基API订舱详情
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取马士基API订舱详情
|
|
|
|
|