|
|
|
@ -307,7 +307,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
item.BusinessId = newKey;
|
|
|
|
|
}
|
|
|
|
|
await tenantDb.Updateable(bookingGoods).ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(bookingGoods).UpdateColumns(x => new { x.BusinessId }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
//任务交互表
|
|
|
|
|
var taskList = await tenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == req.Id).ToListAsync();
|
|
|
|
@ -319,7 +319,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
item.TaskStatus = TaskStatusEnum.Cancel;
|
|
|
|
|
}
|
|
|
|
|
if (taskList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskList).ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(taskList).UpdateColumns(x=>new { x.BusinessId,x.TaskStatus }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
//任务台主表
|
|
|
|
|
var taskbaseList = await tenantDb.Queryable<TaskBaseInfo>().Where(x => x.OUT_BS_NO == req.Id).ToListAsync();
|
|
|
|
@ -331,10 +331,11 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
item.STATUS = TaskStatusEnum.Cancel.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskbaseList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskbaseList).ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(taskbaseList).UpdateColumns(x => new { x.OUT_BS_NO, x.STATUS }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
var ids = taskbaseList.Select(x => x.Id);
|
|
|
|
|
//任务台任务分配表
|
|
|
|
|
var taskAllocationList = await tenantDb.Queryable<TaskBaseAllocation>().Where(x => x.BusinessId == req.Id).ToListAsync();
|
|
|
|
|
var taskAllocationList = await tenantDb.Queryable<TaskBaseAllocation>().Where(x => x.BusinessId == req.Id && ids.Contains(x.TaskId)).ToListAsync();
|
|
|
|
|
if (taskAllocationList.IsNotNull() && taskAllocationList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskAllocationList)
|
|
|
|
@ -343,7 +344,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
item.Status = TaskStatusEnum.Cancel.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskAllocationList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskAllocationList).ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(taskAllocationList).UpdateColumns(x => new { x.BusinessId, x.Status }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
//更新原单信息
|
|
|
|
@ -491,6 +492,29 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
await tenantDb.Updateable(taskList).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
//任务台主表
|
|
|
|
|
var taskbaseList = await tenantDb.Queryable<TaskBaseInfo>().Where(x => x.OUT_BS_NO == req.Id && x.STATUS == TaskStatusEnum.Create.ToString()).ToListAsync();
|
|
|
|
|
if (taskbaseList.IsNotNull() && taskbaseList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskbaseList)
|
|
|
|
|
{
|
|
|
|
|
item.STATUS = TaskStatusEnum.Pending.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskbaseList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskbaseList).UpdateColumns(x => new { x.STATUS }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
var ids = taskbaseList.Select(x => x.Id);
|
|
|
|
|
//任务台任务分配表
|
|
|
|
|
var taskAllocationList = await tenantDb.Queryable<TaskBaseAllocation>().Where(x => x.BusinessId == req.Id && ids.Contains(x.TaskId)).ToListAsync();
|
|
|
|
|
if (taskAllocationList.IsNotNull() && taskAllocationList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskAllocationList)
|
|
|
|
|
{
|
|
|
|
|
item.Status = TaskStatusEnum.Pending.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskAllocationList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskAllocationList).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await seaComService.SetGoodsStatus("YFTC", req.Id, tenantDb);
|
|
|
|
|
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
|
|
|
|
@ -569,8 +593,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
x.IsRefund,
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
//任务交互表 提交退舱任务待处理流程变更为取消
|
|
|
|
|
var taskList = await tenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == callback.BusinessId
|
|
|
|
|
&& (x.TaskStatus == TaskStatusEnum.Create || x.TaskStatus == TaskStatusEnum.Pending)).ToListAsync();
|
|
|
|
|
var taskList = await tenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == callback.BusinessId).ToListAsync();
|
|
|
|
|
if (taskList.IsNotNull() && taskList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskList)
|
|
|
|
@ -579,6 +602,29 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
await tenantDb.Updateable(taskList).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
//任务台主表
|
|
|
|
|
var taskbaseList = await tenantDb.Queryable<TaskBaseInfo>().Where(x => x.OUT_BS_NO == callback.BusinessId).ToListAsync();
|
|
|
|
|
if (taskbaseList.IsNotNull() && taskbaseList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskbaseList)
|
|
|
|
|
{
|
|
|
|
|
item.STATUS = TaskStatusEnum.Cancel.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskbaseList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskbaseList).UpdateColumns(x => new { x.STATUS }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
var ids = taskbaseList.Select(x => x.Id);
|
|
|
|
|
//任务台任务分配表
|
|
|
|
|
var taskAllocationList = await tenantDb.Queryable<TaskBaseAllocation>().Where(x => x.BusinessId == callback.BusinessId && ids.Contains(x.TaskId)).ToListAsync();
|
|
|
|
|
if (taskAllocationList.IsNotNull() && taskAllocationList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskAllocationList)
|
|
|
|
|
{
|
|
|
|
|
item.Status = TaskStatusEnum.Cancel.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskAllocationList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskAllocationList).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
|
|
|
|
|
{
|
|
|
|
|
OperateType = "Update",
|
|
|
|
@ -603,6 +649,29 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
await tenantDb.Updateable(taskList).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
//任务台主表
|
|
|
|
|
var taskbaseList = await tenantDb.Queryable<TaskBaseInfo>().Where(x => x.OUT_BS_NO == callback.BusinessId && x.STATUS == TaskStatusEnum.Pending.ToString() ).ToListAsync();
|
|
|
|
|
if (taskbaseList.IsNotNull() && taskbaseList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskbaseList)
|
|
|
|
|
{
|
|
|
|
|
item.STATUS = TaskStatusEnum.Create.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskbaseList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskbaseList).UpdateColumns(x => new { x.STATUS }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
var ids = taskbaseList.Select(x=>x.Id);
|
|
|
|
|
//任务台任务分配表
|
|
|
|
|
var taskAllocationList = await tenantDb.Queryable<TaskBaseAllocation>().Where(x => x.BusinessId == callback.BusinessId && x.Status == TaskStatusEnum.Pending.ToString() && ids.Contains(x.TaskId)).ToListAsync();
|
|
|
|
|
if (taskAllocationList.IsNotNull() && taskAllocationList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in taskAllocationList)
|
|
|
|
|
{
|
|
|
|
|
item.Status = TaskStatusEnum.Create.ToString();
|
|
|
|
|
}
|
|
|
|
|
if (taskAllocationList.Count > 0)
|
|
|
|
|
await tenantDb.Updateable(taskAllocationList).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
await seaComService.SetGoodsStatus("TCBH", callback.BusinessId, tenantDb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|