|
|
|
@ -1683,7 +1683,18 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (bookingOrderEntity == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Oh($"订舱详情获取失败,请确认订舱是否存在或已删除");
|
|
|
|
|
var checkInfo =_bookingOrderRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.First(a => a.MBLNO == taskBCInfo.MBL_NO && a.IsDeleted == false && (a.ParentId == null || a.ParentId == 0));
|
|
|
|
|
|
|
|
|
|
if(checkInfo != null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Oh($"订舱详情获取失败,用提单号能检索到,但是没有ID关系,需要人工看看问题");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Oh($"订舱详情获取失败,请确认订舱是否存在或已删除");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"获取订舱详情完成,bookid={bookingOrderEntity.Id}");
|
|
|
|
@ -2567,6 +2578,72 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bcOrder.BOOKING_ORDER_ID != null && bcOrder.BOOKING_ORDER_ID.HasValue && bcOrder.BOOKING_ORDER_ID.Value > 0)
|
|
|
|
|
{
|
|
|
|
|
SaveBookingOrderInput bkModel = new SaveBookingOrderInput
|
|
|
|
|
{
|
|
|
|
|
MBLNO = bcOrder.MBL_NO.ToUpper().Trim(),
|
|
|
|
|
CONTRACTNO = !string.IsNullOrWhiteSpace(bcOrder.CONTRACTNO) ? bcOrder.CONTRACTNO : "",
|
|
|
|
|
VESSEL = bcOrder.VESSEL.ToUpper().Trim(),
|
|
|
|
|
VOYNO = bcOrder.VOYNO.ToUpper().Trim(),
|
|
|
|
|
VOYNOINNER = bcOrder.VOYNO.ToUpper().Trim(),
|
|
|
|
|
ETD = bcOrder.ETD,
|
|
|
|
|
ETA = bcOrder.ETA,
|
|
|
|
|
CLOSEVGMDATE = bcOrder.VGM_CUTOFF_TIME,
|
|
|
|
|
CLOSINGDATE = bcOrder.CY_CUTOFF_TIME,
|
|
|
|
|
CLOSEDOCDATE = bcOrder.CUT_SINGLE_TIME,
|
|
|
|
|
|
|
|
|
|
ctnInputs = new List<BookingCtnDto>()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.CONTRACTNO));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.VESSEL));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.VOYNO));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.VOYNOINNER));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.ETD));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.ETA));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.CLOSEVGMDATE));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.CLOSINGDATE));
|
|
|
|
|
bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.CLOSEDOCDATE));
|
|
|
|
|
|
|
|
|
|
var taskBCCtnList = _taskBCCTNInfoRepository.AsQueryable().Filter(null, true).Where(a => a.P_ID == bcOrder.PK_ID && a.TenantId == tenantId).ToList();
|
|
|
|
|
|
|
|
|
|
var ctnCodeList = _cache.GetAllCodeCtn().GetAwaiter().GetResult().ToList();
|
|
|
|
|
|
|
|
|
|
if (taskBCCtnList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
taskBCCtnList.ForEach(t =>
|
|
|
|
|
{
|
|
|
|
|
var ctnCode = ctnCodeList.FirstOrDefault(a => !string.IsNullOrWhiteSpace(a.Name) &&
|
|
|
|
|
a.Name.Equals(t.CTNALL, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
BookingCtnDto ctn = new BookingCtnDto
|
|
|
|
|
{
|
|
|
|
|
CTNCODE = ctnCode?.Code,
|
|
|
|
|
CTNALL = t.CTNALL,
|
|
|
|
|
CTNNUM = t.CTNNUM.HasValue ? t.CTNNUM.Value : 1
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bkModel.ctnInputs.Add(ctn);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var bkRlt = await _bookingOrderService.Save(bkModel);
|
|
|
|
|
|
|
|
|
|
if (bkRlt.Id != null && bkRlt.Id > 0)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情完成");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DjyTenantParamValueOutput paramConfig = null;
|
|
|
|
|
DjyTenantParamValueOutput dingdingConfig = null;
|
|
|
|
|