|
|
|
@ -311,6 +311,12 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//排查怀疑这里是导致BC没有合约号胡的问题,开启这个值看看
|
|
|
|
|
//if (model.isBookingPartOwnPrice)
|
|
|
|
|
//{
|
|
|
|
|
// bookingDto.bookingBody.mandatoryParties.isPriceOwnerFromServiceContractAccepted = true;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
bookingDto.bookingBody.transport = new MSKAPIBookingTransport
|
|
|
|
|
{
|
|
|
|
|
carrierCode = model.carrierCode,
|
|
|
|
@ -321,13 +327,15 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
{
|
|
|
|
|
placeOfReceipt = new MSKAPIBookingRouteDetailsBase
|
|
|
|
|
{
|
|
|
|
|
UNLocationCode = model.placeOfReceiptUnLocCode,
|
|
|
|
|
cityName = model.placeOfReceiptCityName,
|
|
|
|
|
UNLocationCode = model.isSendNoSchedule ? model.userPlaceOfReceiptUnLocCode
|
|
|
|
|
: model.placeOfReceiptUnLocCode,
|
|
|
|
|
//cityName = model.placeOfReceiptCityName,
|
|
|
|
|
},
|
|
|
|
|
placeOfDelivery = new MSKAPIBookingRouteDetailsBase
|
|
|
|
|
{
|
|
|
|
|
UNLocationCode = model.placeOfDeliveryUnLocCode,
|
|
|
|
|
cityName = model.placeOfDeliveryCityName,
|
|
|
|
|
UNLocationCode = model.isSendNoSchedule ? model.userPlaceOfDeliveryUnLocCode
|
|
|
|
|
: model.placeOfDeliveryUnLocCode,
|
|
|
|
|
//cityName = model.placeOfDeliveryCityName,
|
|
|
|
|
},
|
|
|
|
|
selectedRoute = new MSKAPIBookingRoute
|
|
|
|
|
{
|
|
|
|
@ -347,13 +355,15 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
},
|
|
|
|
|
startLocation = new MSKAPIBookingRouteDetailsBase
|
|
|
|
|
{
|
|
|
|
|
cityName = model.placeOfReceiptCityName,
|
|
|
|
|
UNLocationCode = model.placeOfReceiptUnLocCode
|
|
|
|
|
//cityName = model.placeOfReceiptCityName,
|
|
|
|
|
UNLocationCode = model.isSendNoSchedule ? model.userPlaceOfReceiptUnLocCode
|
|
|
|
|
: model.placeOfReceiptUnLocCode
|
|
|
|
|
},
|
|
|
|
|
endLocation = new MSKAPIBookingRouteDetailsBase
|
|
|
|
|
{
|
|
|
|
|
cityName = model.placeOfDeliveryCityName,
|
|
|
|
|
UNLocationCode = model.placeOfDeliveryUnLocCode
|
|
|
|
|
//cityName = model.placeOfDeliveryCityName,
|
|
|
|
|
UNLocationCode = model.isSendNoSchedule ? model.userPlaceOfDeliveryUnLocCode
|
|
|
|
|
: model.placeOfDeliveryUnLocCode
|
|
|
|
|
},
|
|
|
|
|
transportModeCode = model.transportMode
|
|
|
|
|
}
|
|
|
|
@ -362,6 +372,11 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if(!model.isSendNoSchedule)
|
|
|
|
|
{
|
|
|
|
|
bookingDto.bookingBody.transport.routeDetails.selectedRoute.routeScheduleId = model.carrierProductId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bookingDto.bookingBody.cargo = new MSKAPIBookingCargo
|
|
|
|
|
{
|
|
|
|
|
commodityCode = model.commodityCode,
|
|
|
|
@ -613,6 +628,9 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
if(!model.earliestDepartureDate.HasValue)
|
|
|
|
|
throw Oops.Bah($"预计离港日期必填");
|
|
|
|
|
|
|
|
|
|
if (!model.isSendNoSchedule && string.IsNullOrWhiteSpace(model.carrierProductId))
|
|
|
|
|
throw Oops.Bah($"船期信息不能为空,请查询船期信息");
|
|
|
|
|
|
|
|
|
|
if (model.isReefer)
|
|
|
|
|
{
|
|
|
|
|
if (!model.temperature.HasValue)
|
|
|
|
@ -973,6 +991,8 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
.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);
|
|
|
|
|
|
|
|
|
@ -1237,5 +1257,38 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 批量发送
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量发送
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids">马士基API订舱ID组</param>
|
|
|
|
|
/// <returns>返回执行结果消息</returns>
|
|
|
|
|
public async Task<string> BatchSend(long[] ids)
|
|
|
|
|
{
|
|
|
|
|
var list = await _bookingDeliveryRecordRep.AsQueryable()
|
|
|
|
|
.Where(a => ids.Contains(a.Id)).ToListAsync();
|
|
|
|
|
|
|
|
|
|
if (list.Count != ids.Length)
|
|
|
|
|
throw Oops.Oh("订舱数据获取失败,请确认选中的记录是否存在");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 批量发送
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量发送
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">马士基API订舱ID</param>
|
|
|
|
|
/// <param name="copyNum">需要复制生成记录</param>
|
|
|
|
|
/// <returns>返回执行结果消息</returns>
|
|
|
|
|
public async Task<string> BatchCopy(long id, int copyNum)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|