|
|
@ -238,13 +238,21 @@ namespace Myshipping.Application
|
|
|
|
List<string> cancelMblnoList = oldMblnoList.Except(newMblnoList).ToList();
|
|
|
|
List<string> cancelMblnoList = oldMblnoList.Except(newMblnoList).ToList();
|
|
|
|
await InsertNewBookingStatusWithMblnoList(cancelMblnoList, STATUS_DISASSOCIATION);
|
|
|
|
await InsertNewBookingStatusWithMblnoList(cancelMblnoList, STATUS_DISASSOCIATION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (addMblnoList.Count != 0 || cancelMblnoList.Count != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
// 先删除,再新增业务信息
|
|
|
|
// 先删除,再新增业务信息
|
|
|
|
await _businessRep.DeleteAsync(x => x.PId == entity.Id);
|
|
|
|
await _businessRep.DeleteAsync(x => x.PId == entity.Id);
|
|
|
|
input.Business.ForEach(b => b.PId = entity.Id);
|
|
|
|
input.Business.ForEach(b => b.PId = entity.Id);
|
|
|
|
await _businessRep.InsertAsync(input.Business);
|
|
|
|
await _businessRep.InsertAsync(input.Business);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (input.IsSending)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await SendBooking(entity);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return await Get(entity.Id);
|
|
|
|
return await Get(entity.Id);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -304,12 +312,10 @@ namespace Myshipping.Application
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 发送快递
|
|
|
|
/// 发送快递
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
/// [HttpPost("SendBooking")]
|
|
|
|
/// <returns></returns>
|
|
|
|
[NonAction]
|
|
|
|
[HttpPost("SendBooking")]
|
|
|
|
public async Task<dynamic> SendBooking(ExpressDeliveryOrder order)
|
|
|
|
public async Task<dynamic> SendBooking(long Id)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var order = _orderRep.FirstOrDefault(x => x.Id == Id);
|
|
|
|
|
|
|
|
if (order == null)
|
|
|
|
if (order == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("请选择正确数据!");
|
|
|
|
throw Oops.Bah("请选择正确数据!");
|
|
|
@ -322,6 +328,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("下单失败,原因:重复下单");
|
|
|
|
throw Oops.Bah("下单失败,原因:重复下单");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var Id = order.Id;
|
|
|
|
|
|
|
|
|
|
|
|
IDeliverySend deliverySend = GetDeliverySend(order.KDCompany);
|
|
|
|
IDeliverySend deliverySend = GetDeliverySend(order.KDCompany);
|
|
|
|
string waybillNo = await deliverySend.CreateOrder(order);
|
|
|
|
string waybillNo = await deliverySend.CreateOrder(order);
|
|
|
|