|
|
@ -64,6 +64,29 @@ namespace Myshipping.Application
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var id = InnerSave(info);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
|
|
|
result.msg = "保存成功";
|
|
|
|
|
|
|
|
result.ext = id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
|
|
|
result.msg = $"保存派车异常,原因:{ex.Message}";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 保存内部方法
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="info">派车信息</param>
|
|
|
|
|
|
|
|
/// <returns>返回派车Id</returns>
|
|
|
|
|
|
|
|
private async Task<long> InnerSave(BookingTruckDto info)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BookingTruck entity = info.Adapt<BookingTruck>();
|
|
|
|
BookingTruck entity = info.Adapt<BookingTruck>();
|
|
|
|
|
|
|
|
|
|
|
@ -119,17 +142,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
return entity.Id;
|
|
|
|
result.msg = "保存成功";
|
|
|
|
|
|
|
|
result.ext = entity.Id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
|
|
|
result.msg = $"保存派车异常,原因:{ex.Message}";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -472,11 +485,19 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var model = InnerCreateTruckFromBookingOrder(bookingId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model != null && model.ContaList != null && model.ContaList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.ext = model.ContaList;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
|
|
|
result.msg = $"引入订舱详情生成派车信息异常,原因:{ex.Message}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
@ -492,9 +513,21 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
提交派车流程
|
|
|
|
|
|
|
|
1、先保存一遍派车信息。(需校验当前派车信息未提交,只有暂存的才能保存)
|
|
|
|
|
|
|
|
2、调取派车任务接口推送派车任务。
|
|
|
|
|
|
|
|
3、派车任务推送成功后更新状态、任务ID。
|
|
|
|
|
|
|
|
4、返回结果。
|
|
|
|
|
|
|
|
*/
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//先保存
|
|
|
|
|
|
|
|
var id = InnerSave(info);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新派车订单为已提交
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//推送新增派车任务接口
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -514,6 +547,13 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
批量提交派车流程
|
|
|
|
|
|
|
|
1、需校验当前派车信息未提交
|
|
|
|
|
|
|
|
2、调取派车任务接口推送派车任务。
|
|
|
|
|
|
|
|
3、派车任务推送成功后更新状态、任务ID。
|
|
|
|
|
|
|
|
4、返回结果。
|
|
|
|
|
|
|
|
*/
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -534,6 +574,14 @@ namespace Myshipping.Application
|
|
|
|
[HttpGet("/BookingTruck/Cancel")]
|
|
|
|
[HttpGet("/BookingTruck/Cancel")]
|
|
|
|
public async Task<TaskManageOrderResultDto> Cancel(long id)
|
|
|
|
public async Task<TaskManageOrderResultDto> Cancel(long id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
撤销派车流程
|
|
|
|
|
|
|
|
1、确定当前派车已提交。
|
|
|
|
|
|
|
|
2、调取取消派车任务接口,申请撤销派车。
|
|
|
|
|
|
|
|
3、取消派车推送成功后更新状态。
|
|
|
|
|
|
|
|
4、返回结果。
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
@ -557,6 +605,13 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
批量撤销派车流程
|
|
|
|
|
|
|
|
1、确定当前派车已提交。
|
|
|
|
|
|
|
|
2、调取取消派车任务接口,申请撤销派车。
|
|
|
|
|
|
|
|
3、取消派车推送成功后更新状态。
|
|
|
|
|
|
|
|
4、返回结果。
|
|
|
|
|
|
|
|
*/
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|