修改现舱引入

usertest
jianghaiqing 4 months ago
parent 1b45a00771
commit de9b66f257

@ -408,5 +408,25 @@ namespace DS.WMS.Core.Op.Dtos
/// 集装箱列表
/// </summary>
public List<OpCtnReq> CtnList { get; set; }
}
/// <summary>
/// 收货地
/// </summary>
public string ReceiptPlace { get; set; }
/// <summary>
/// 收货地点Id
/// </summary>
public long ReceiptPlaceId { get; set; }
/// <summary>
/// 截VGM时间
/// </summary>
public DateTime? VGMCloseDate { get; set; }
/// <summary>
/// 预抵日期
/// </summary>
public DateTime? ETA { get; set; }
}
}

@ -2788,7 +2788,7 @@ namespace DS.WMS.Core.Op.Method
DeliveryPlace = bookingSlotBase.PlaceDelivery,
DeliveryPlaceId = bookingSlotBase.PlaceDeliveryId.HasValue ? bookingSlotBase.PlaceDeliveryId.Value : 0,
//CtnInfo = new List<OpCtn>()
CtnInfo = new List<OpCtnReq>()
};
if (bookingSlotBase.ETD.HasValue)
@ -2800,13 +2800,28 @@ namespace DS.WMS.Core.Op.Method
bkModel.AccountDate = DateTime.Now.ToString("yyyy-MM");
}
var ctnList = model.slots.SelectMany(b => b.CtnList).ToList();
bkModel.CtnList = ctnList.GroupBy(a => a.CtnCode).Select(a =>
{
var currList = a.ToList();
return new OpCtnReq
{
CtnCode = a.Key,
CtnAll = currList.FirstOrDefault().CtnAll,
CtnNum = currList.Sum(b => b.CtnNum)
};
}).ToList();
var saveSeaExportRlt = _seaExportCommonService.SeaExportOpenEdit(bkModel).GetAwaiter().GetResult();
if (!saveSeaExportRlt.Succeeded)
{
Logger.Log(NLog.LogLevel.Info, $"引入失败,更新海运出口失败,原因:{saveSeaExportRlt.Message}");
}
// if (generateModel.CtnList == null)
//{
// var ctnList = (await GetAvailableCtnsBySlot(bookingSlotBase.Id)).Data;
@ -2818,7 +2833,7 @@ namespace DS.WMS.Core.Op.Method
// generateModel.CtnList = ctnList;
//}
}
catch(Exception ex)
catch (Exception ex)
{
Logger.Log(NLog.LogLevel.Info, $"引入失败,原因:{ex.Message}");

Loading…
Cancel
Save