修改舱位接口

optimize
jianghaiqing 10 months ago
parent 6a598c621d
commit b4458d30bb

@ -220,8 +220,8 @@ namespace Myshipping.Application
{ {
bcNoticeFile = new DynameFileInfo bcNoticeFile = new DynameFileInfo
{ {
FileBytes = file.ToByteArray(), FileBytes = modifyFile.ToByteArray(),
FileName = file.FileName FileName = modifyFile.FileName
}; };
} }

@ -687,7 +687,16 @@ namespace Myshipping.Application
{ {
#region 推送舱位、推送订舱 #region 推送舱位、推送订舱
//推送舱位 //推送舱位
var bookingSlotId = await GenerateBookingSlot(bcOrder, bcCtnList, fileList); long bookingSlotId = 0;
if(bcOrder.BOOKING_SLOT_ID.HasValue && bcOrder.BOOKING_SLOT_ID.Value > 0)
{
bookingSlotId = bcOrder.BOOKING_SLOT_ID.Value;
}
else
{
bookingSlotId = await GenerateBookingSlot(bcOrder, bcCtnList, fileList);
}
if (bookingSlotId > 0) if (bookingSlotId > 0)
{ {
@ -696,6 +705,7 @@ namespace Myshipping.Application
if (bookingOrderId > 0) if (bookingOrderId > 0)
{ {
//更新库存 //更新库存
//_bookingSlotService. //_bookingSlotService.
var bcEntity = _taskBCInfoRepository.AsQueryable().First(a => a.PK_ID == bcOrder.PK_ID); var bcEntity = _taskBCInfoRepository.AsQueryable().First(a => a.PK_ID == bcOrder.PK_ID);
@ -722,6 +732,10 @@ namespace Myshipping.Application
}).ExecuteCommand(); }).ExecuteCommand();
var currBCOrder = _taskBCInfoRepository.AsQueryable().First(a => a.PK_ID == bcEntity.PK_ID);
if (currBCOrder != null)
await GenerateSendEmail(currBCOrder);
var taskEntity = _taskBaseRepository.AsQueryable().First(u => u.PK_ID == bcEntity.TASK_ID); var taskEntity = _taskBaseRepository.AsQueryable().First(u => u.PK_ID == bcEntity.TASK_ID);

Loading…
Cancel
Save