|
|
|
@ -846,9 +846,34 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Oh($"请求派车调度失败,原因={taskRlt.msg}", typeof(InvalidOperationException));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//派车后填写货物状态
|
|
|
|
|
await _bookingOrderService.SetGoodsStatus("YPC", model.Id);
|
|
|
|
|
await _bookingOrderService.SendBookingOrder(new long[] { model.Id });
|
|
|
|
|
//这里直接调用订舱服务的功能,担心有异常所以这里单独做了异常捕获
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//派车后填写货物状态
|
|
|
|
|
await _bookingOrderService.SetGoodsStatus("YPC", bookingOrder.Id);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} id={id} 更新订舱的货物状态完成", batchNo, bookingOrder.Id);
|
|
|
|
|
}
|
|
|
|
|
catch(Exception bkException)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation("批次={no} id={id} 更新订舱的货物状态 YPC异常,原因:{erro}", batchNo, bookingOrder.Id, bkException.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//这里直接调用订舱服务的功能,担心有异常所以这里单独做了异常捕获
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//触发发送东胜
|
|
|
|
|
var currRlt = await _bookingOrderService.SendBookingOrder(new long[] { bookingOrder.Id });
|
|
|
|
|
|
|
|
|
|
string curMsg = JSON.Serialize(currRlt);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} id={id} 触发发送东胜完成 结果={rlt}", batchNo, bookingOrder.Id, curMsg);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception bkException)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation("批次={no} id={id} 触发发送东胜完成,原因:{erro}", batchNo, bookingOrder.Id, bkException.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//更新派车订单为已提交
|
|
|
|
|
model.Status = BookingTruckStatus.SUBMITED.ToString();
|
|
|
|
|
model.UpdatedTime = DateTime.Now;
|
|
|
|
@ -1863,9 +1888,18 @@ namespace Myshipping.Application
|
|
|
|
|
it.TRUCKER
|
|
|
|
|
}).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
var syncDongshengRlt = await _bookingOrderService.SendBookingOrder(new long[] { bookingTruckInfo.BookingId.Value });
|
|
|
|
|
//这里直接调用订舱服务的功能,担心有异常所以这里单独做了异常捕获
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//触发发送东胜
|
|
|
|
|
var syncDongshengRlt = await _bookingOrderService.SendBookingOrder(new long[] { bookingTruckInfo.BookingId.Value });
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"推送订舱同步东胜完毕,id={bookingTruckInfo.BookingId.Value} rlt={JSON.Serialize(syncDongshengRlt)}");
|
|
|
|
|
_logger.LogInformation($"推送订舱同步东胜完毕,id={bookingTruckInfo.BookingId.Value} rlt={JSON.Serialize(syncDongshengRlt)}");
|
|
|
|
|
}
|
|
|
|
|
catch (Exception bkException)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation("批次={no} id={id} 触发发送东胜完成,原因:{erro}", batchNo, bookingTruckInfo.BookingId.Value, bkException.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("判断回写需要更新订舱的车队,更新完成");
|
|
|
|
|
}
|
|
|
|
|