|
|
|
@ -80,7 +80,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
private readonly IMappingPortService _mappingPortService;
|
|
|
|
|
private readonly ICodeCountryService _codeCountryService;
|
|
|
|
|
private readonly ICodeLanesService _codeLanesService;
|
|
|
|
|
|
|
|
|
|
private readonly ISeaExportCommonService _seaExportCommonService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly string bcCompareUrl;
|
|
|
|
@ -136,6 +136,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
_codeCountryService = _serviceProvider.GetRequiredService<ICodeCountryService>();
|
|
|
|
|
_codeLanesService = _serviceProvider.GetRequiredService<ICodeLanesService>();
|
|
|
|
|
_clientInfoService = _serviceProvider.GetRequiredService<IClientInfoService>();
|
|
|
|
|
_seaExportCommonService = _serviceProvider.GetRequiredService<ISeaExportCommonService>();
|
|
|
|
|
|
|
|
|
|
bcCompareUrl = AppSetting.app(new string[] { "BCCompare", "Url" });
|
|
|
|
|
}
|
|
|
|
@ -2748,7 +2749,6 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
file.LinkId = model.bookingOrderId;
|
|
|
|
|
tenantDb.Insertable<OpFile>(file).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_bookingSlotStockService.BookingSlotStock(new BookingSlotStockUpdateModel
|
|
|
|
|
{
|
|
|
|
|
BookingSlotType = latestSlot.BookingSlotType,
|
|
|
|
@ -2761,6 +2761,68 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var bookingSlotBase = model.slots.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
//这里更新订舱的详情
|
|
|
|
|
SeaExportOpenEditReq bkModel = new SeaExportOpenEditReq
|
|
|
|
|
{
|
|
|
|
|
//MBLNO = bookingSlotBase.SLOT_BOOKING_NO.Trim(),
|
|
|
|
|
ContractNo = !string.IsNullOrWhiteSpace(bookingSlotBase.ContractNo) ? bookingSlotBase.ContractNo : "",
|
|
|
|
|
Vessel = bookingSlotBase.Vessel?.ToUpper()?.Trim(),
|
|
|
|
|
Voyno = bookingSlotBase.Voyno?.ToUpper()?.Trim(),
|
|
|
|
|
InnerVoyno = bookingSlotBase.Voyno?.ToUpper()?.Trim(),
|
|
|
|
|
ETD = bookingSlotBase.ETD,
|
|
|
|
|
ETA = bookingSlotBase.ETA,
|
|
|
|
|
VGMCloseDate = bookingSlotBase.VGMSubmissionCutDate,
|
|
|
|
|
ClosingDate = bookingSlotBase.CYCutDate,
|
|
|
|
|
CloseDocDate = bookingSlotBase.SICutDate,
|
|
|
|
|
|
|
|
|
|
LoadPort = bookingSlotBase.PortLoad,
|
|
|
|
|
LoadPortId = bookingSlotBase.PortLoadId.HasValue ? bookingSlotBase.PortLoadId.Value : 0,
|
|
|
|
|
DischargePortId = bookingSlotBase.PortDischargeId.HasValue ? bookingSlotBase.PortLoadId.Value : 0,
|
|
|
|
|
DischargePort = bookingSlotBase.PortDischarge,
|
|
|
|
|
|
|
|
|
|
ReceiptPlace = bookingSlotBase.PlaceReceipt,
|
|
|
|
|
ReceiptPlaceId = bookingSlotBase.PlaceReceiptId.HasValue ? bookingSlotBase.PlaceReceiptId.Value : 0,
|
|
|
|
|
DeliveryPlace = bookingSlotBase.PlaceDelivery,
|
|
|
|
|
DeliveryPlaceId = bookingSlotBase.PlaceDeliveryId.HasValue ? bookingSlotBase.PlaceDeliveryId.Value : 0,
|
|
|
|
|
|
|
|
|
|
//CtnInfo = new List<OpCtn>()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (bookingSlotBase.ETD.HasValue)
|
|
|
|
|
{
|
|
|
|
|
bkModel.AccountDate = bookingSlotBase.ETD.Value.ToString("yyyy-MM");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bkModel.AccountDate = DateTime.Now.ToString("yyyy-MM");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var saveSeaExportRlt = _seaExportCommonService.SeaExportOpenEdit(bkModel).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
if (!saveSeaExportRlt.Succeeded)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (generateModel.CtnList == null)
|
|
|
|
|
//{
|
|
|
|
|
// var ctnList = (await GetAvailableCtnsBySlot(bookingSlotBase.Id)).Data;
|
|
|
|
|
// if (ctnList == null || ctnList.Count == 0)
|
|
|
|
|
// {
|
|
|
|
|
// throw new Exception("可用舱位为空");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// generateModel.CtnList = ctnList;
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"引入失败,原因:{ex.Message}");
|
|
|
|
|
|
|
|
|
|
return DataResult<string>.Failed("引入失败,原因:{ex.me}");
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|