|
|
|
@ -182,35 +182,52 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
//校验
|
|
|
|
|
ValidateTruck(OperateTypeEnum.Save, new BookingTruck[] { model });
|
|
|
|
|
|
|
|
|
|
entity.UpdatedTime = DateTime.Now;
|
|
|
|
|
entity.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
entity.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
await _bookingTruckRepository.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.TenantId,
|
|
|
|
|
it.CreatedTime,
|
|
|
|
|
it.CreatedUserId,
|
|
|
|
|
it.CreatedUserName,
|
|
|
|
|
it.IsDeleted,
|
|
|
|
|
it.BookingId,
|
|
|
|
|
it.TruckId,
|
|
|
|
|
it.TruckName,
|
|
|
|
|
it.TruckCode,
|
|
|
|
|
it.Status,
|
|
|
|
|
it.TruckFlowNo,
|
|
|
|
|
it.TaskNo
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ValidateTruck(OperateTypeEnum.DispatchBackSave, new BookingTruck[] { model });
|
|
|
|
|
|
|
|
|
|
entity.Status = BookingTruckStatus.SEND_DISPATCH.ToString();
|
|
|
|
|
entity.UpdatedTime = DateTime.Now;
|
|
|
|
|
entity.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
entity.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
entity.Status = info.CallBackStatus;
|
|
|
|
|
|
|
|
|
|
await _bookingTruckRepository.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.TenantId,
|
|
|
|
|
it.CreatedTime,
|
|
|
|
|
it.CreatedUserId,
|
|
|
|
|
it.CreatedUserName,
|
|
|
|
|
it.IsDeleted,
|
|
|
|
|
it.BookingId,
|
|
|
|
|
it.TruckFlowNo,
|
|
|
|
|
it.TaskNo
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
entity.UpdatedTime = DateTime.Now;
|
|
|
|
|
entity.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
entity.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _bookingTruckRepository.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.TenantId,
|
|
|
|
|
it.CreatedTime,
|
|
|
|
|
it.CreatedUserId,
|
|
|
|
|
it.CreatedUserName,
|
|
|
|
|
it.IsDeleted,
|
|
|
|
|
it.BookingId,
|
|
|
|
|
it.TruckId,
|
|
|
|
|
it.TruckName,
|
|
|
|
|
it.TruckCode,
|
|
|
|
|
it.Status,
|
|
|
|
|
it.TruckFlowNo,
|
|
|
|
|
it.TaskNo
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
await _bookingTruckContaRepository.DeleteAsync(x => x.TruckId == model.Id);
|
|
|
|
|
|
|
|
|
|
if (entityCtnList != null && entityCtnList.Count > 0)
|
|
|
|
@ -745,8 +762,8 @@ namespace Myshipping.Application
|
|
|
|
|
messageInfo.Main.RecvUserId = model.DispatcherId.ToString();
|
|
|
|
|
messageInfo.Main.RecvUserName = model.DispatcherName;
|
|
|
|
|
|
|
|
|
|
messageInfo.Main.TaskTitle = $"{model.MBLNo}_派车任务";
|
|
|
|
|
messageInfo.Main.TaskDesp = $"{model.MBLNo}_派车任务";
|
|
|
|
|
messageInfo.Main.TaskTitle = $"{model.TruckFlowNo}_派车任务";
|
|
|
|
|
messageInfo.Main.TaskDesp = $"{model.TruckFlowNo}_派车任务";
|
|
|
|
|
messageInfo.Main.TaskSource = TaskSourceEnum.CUSTOMER_SUBMIT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1651,7 +1668,9 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
else if(operateType == OperateTypeEnum.DispatchBackSave)
|
|
|
|
|
{
|
|
|
|
|
if (entityArg.Any(a => a.Status != BookingTruckStatus.SUBMITED.ToString()))
|
|
|
|
|
if (entityArg.Any(a => a.Status != BookingTruckStatus.SUBMITED.ToString()
|
|
|
|
|
&& a.Status != BookingTruckStatus.SEND_DISPATCH.ToString()
|
|
|
|
|
&& a.Status != BookingTruckStatus.CANCEL_DISPATCH.ToString()))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Oh($"派车状态只有已提交才能回写详情", typeof(InvalidOperationException));
|
|
|
|
|
}
|
|
|
|
@ -1682,7 +1701,9 @@ namespace Myshipping.Application
|
|
|
|
|
if (bookingTruckInfo == null)
|
|
|
|
|
throw Oops.Oh($"派车信息不存在", typeof(InvalidOperationException));
|
|
|
|
|
|
|
|
|
|
if(bookingTruckInfo.Status != BookingTruckStatus.SUBMITED.ToString())
|
|
|
|
|
if(bookingTruckInfo.Status != BookingTruckStatus.SUBMITED.ToString()
|
|
|
|
|
&& bookingTruckInfo.Status != BookingTruckStatus.SEND_DISPATCH.ToString()
|
|
|
|
|
&& bookingTruckInfo.Status != BookingTruckStatus.CANCEL_DISPATCH.ToString())
|
|
|
|
|
throw Oops.Oh($"当前派车信息不是已提交状态不能接收回写", typeof(InvalidOperationException));
|
|
|
|
|
|
|
|
|
|
var id = await InnerSave(info,true);
|
|
|
|
|