|
|
|
@ -846,6 +846,28 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Oh($"请求派车调度失败,原因={taskRlt.msg}", typeof(InvalidOperationException));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//更新派车订单为已提交
|
|
|
|
|
model.Status = BookingTruckStatus.SUBMITED.ToString();
|
|
|
|
|
model.UpdatedTime = DateTime.Now;
|
|
|
|
|
model.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
model.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
//提取任务流水号
|
|
|
|
|
if (taskRlt.ext != null)
|
|
|
|
|
model.TaskNo = taskRlt.ext.ToString();
|
|
|
|
|
|
|
|
|
|
await _bookingTruckRepository.AsUpdateable(model).UpdateColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.Status,
|
|
|
|
|
it.UpdatedTime,
|
|
|
|
|
it.UpdatedUserId,
|
|
|
|
|
it.UpdatedUserName,
|
|
|
|
|
it.TaskNo
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.msg = "提交成功";
|
|
|
|
|
|
|
|
|
|
//这里直接调用订舱服务的功能,担心有异常所以这里单独做了异常捕获
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -874,28 +896,6 @@ namespace Myshipping.Application
|
|
|
|
|
_logger.LogInformation("批次={no} id={id} 触发发送东胜完成,原因:{erro}", batchNo, bookingOrder.Id, bkException.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//更新派车订单为已提交
|
|
|
|
|
model.Status = BookingTruckStatus.SUBMITED.ToString();
|
|
|
|
|
model.UpdatedTime = DateTime.Now;
|
|
|
|
|
model.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
model.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
//提取任务流水号
|
|
|
|
|
if (taskRlt.ext != null)
|
|
|
|
|
model.TaskNo = taskRlt.ext.ToString();
|
|
|
|
|
|
|
|
|
|
await _bookingTruckRepository.AsUpdateable(model).UpdateColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.Status,
|
|
|
|
|
it.UpdatedTime,
|
|
|
|
|
it.UpdatedUserId,
|
|
|
|
|
it.UpdatedUserName,
|
|
|
|
|
it.TaskNo
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.msg = "提交成功";
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
@ -1146,7 +1146,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 请求报文msg={msg}", batchNo, JSON.Serialize(messageInfo));
|
|
|
|
|
|
|
|
|
|
//推送新增派车任务接口
|
|
|
|
|
//推送取消派车任务接口
|
|
|
|
|
var taskRlt = await _taskManageExternalService.CancelTruckDispatchAsync(messageInfo);
|
|
|
|
|
|
|
|
|
|
DateTime eDate = DateTime.Now;
|
|
|
|
@ -1758,9 +1758,10 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
else if (operateType == OperateTypeEnum.Cancel)
|
|
|
|
|
{
|
|
|
|
|
if (entityArg.Any(a => a.Status != BookingTruckStatus.SUBMITED.ToString()))
|
|
|
|
|
if (entityArg.Any(a => a.Status != BookingTruckStatus.SUBMITED.ToString()
|
|
|
|
|
&& a.Status != BookingTruckStatus.SEND_DISPATCH.ToString()))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Oh($"派车状态只有已提交才能撤销派车", typeof(InvalidOperationException));
|
|
|
|
|
throw Oops.Oh($"派车状态只有已提交、已派车才能撤销派车", typeof(InvalidOperationException));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (operateType == OperateTypeEnum.Delete)
|
|
|
|
|