wanghaomei 1 year ago
commit 8a09b16c1a

@ -846,9 +846,34 @@ namespace Myshipping.Application
throw Oops.Oh($"请求派车调度失败,原因={taskRlt.msg}", typeof(InvalidOperationException)); throw Oops.Oh($"请求派车调度失败,原因={taskRlt.msg}", typeof(InvalidOperationException));
} }
//派车后填写货物状态 //这里直接调用订舱服务的功能,担心有异常所以这里单独做了异常捕获
await _bookingOrderService.SetGoodsStatus("YPC", model.Id); try
await _bookingOrderService.SendBookingOrder(new long[] { model.Id }); {
//派车后填写货物状态
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.Status = BookingTruckStatus.SUBMITED.ToString();
model.UpdatedTime = DateTime.Now; model.UpdatedTime = DateTime.Now;
@ -1863,9 +1888,18 @@ namespace Myshipping.Application
it.TRUCKER it.TRUCKER
}).ExecuteCommand(); }).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("判断回写需要更新订舱的车队,更新完成"); _logger.LogInformation("判断回写需要更新订舱的车队,更新完成");
} }

@ -257,7 +257,7 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="pkIds">服务项目主键数组</param> /// <param name="pkIds">服务项目主键数组</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/ServiceProject/SetUnEnable")] [HttpPost("/ServiceProject/SetUnEnable")]
public async Task<TaskManageOrderResultDto> SetUnEnable([FromBody] string[] pkIds) public async Task<TaskManageOrderResultDto> SetUnEnable([FromBody] string[] pkIds)
{ {
TaskManageOrderResultDto result = new TaskManageOrderResultDto(); TaskManageOrderResultDto result = new TaskManageOrderResultDto();

Loading…
Cancel
Save