|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using AngleSharp.Dom;
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.Module.Core.Enums;
|
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
@ -346,20 +347,23 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
info.IsCustoms = false;
|
|
|
|
|
info.IsLand = false;
|
|
|
|
|
info.IsVGM = false;
|
|
|
|
|
info.OrderProgress = "0";
|
|
|
|
|
|
|
|
|
|
await tenantDb.Updateable(info).UpdateColumns(x => new { x.CustomerNo,x.IsBooking,x.IsCustoms,x.IsLand,x.IsVGM }).ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(info).UpdateColumns(x => new { x.CustomerNo,x.IsBooking,x.IsCustoms,x.IsLand,x.IsVGM,x.OrderProgress }).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
var oldOrder = entity.Adapt<SeaExport>();
|
|
|
|
|
entity.IsChangeETD = true;
|
|
|
|
|
entity.ChangeReason = req.ChangeReason;
|
|
|
|
|
entity.ChangeRemark = req.ChangeRemark;
|
|
|
|
|
entity.ChangeOrderId = req.Id;
|
|
|
|
|
entity.OrderProgress = req.OrderProgress;
|
|
|
|
|
int rows = await tenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.IsChangeETD,
|
|
|
|
|
x.ChangeReason,
|
|
|
|
|
x.ChangeRemark,
|
|
|
|
|
x.ChangeOrderId
|
|
|
|
|
x.ChangeOrderId,
|
|
|
|
|
x.OrderProgress,
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
await seaComService.SaveSeaExportLogAsync(new SeaExportSaveLog()
|
|
|
|
|
{
|
|
|
|
@ -373,19 +377,34 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (req.IsRefund)
|
|
|
|
|
{
|
|
|
|
|
var taskReq = new TaskCreationRequest()
|
|
|
|
|
if (req.OrderProgress =="2") //已出号未申报 发起退舱入池任务
|
|
|
|
|
{
|
|
|
|
|
BusinessId = newKey,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN.ToString(),
|
|
|
|
|
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
};
|
|
|
|
|
var result = await taskService.CreateTaskAsync(taskReq, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
return await Task.FromResult(DataResult.Failed(result.Message));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var taskReq = new TaskCreationRequest()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = newKey,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN_POOL.ToString(),
|
|
|
|
|
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{entity?.CustomerNo}",
|
|
|
|
|
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{entity?.CustomerNo}",
|
|
|
|
|
};
|
|
|
|
|
var result = await taskService.CreateTaskAsync(taskReq, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
return await Task.FromResult(DataResult.Failed(result.Message));
|
|
|
|
|
}
|
|
|
|
|
else //退舱确认任务
|
|
|
|
|
{
|
|
|
|
|
var taskReq = new TaskCreationRequest()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = newKey,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN.ToString(),
|
|
|
|
|
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{entity?.CustomerNo}",
|
|
|
|
|
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{entity?.CustomerNo}",
|
|
|
|
|
};
|
|
|
|
|
var result = await taskService.CreateTaskAsync(taskReq, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
return await Task.FromResult(DataResult.Failed(result.Message));
|
|
|
|
|
}
|
|
|
|
|
//await seaComService.SetGoodsStatus("YFTC", req.Id, tenantDb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -440,9 +459,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
info.RefundTag = RefundTagEnum.Normal;
|
|
|
|
|
info.RefundReason = req.RefundReason;
|
|
|
|
|
info.RefundRemark = req.RefundRemark;
|
|
|
|
|
info.OrderProgress = req.OrderProgress;
|
|
|
|
|
int rows = await tenantDb.Updateable(info).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.RefundTag,x.RefundReason,x.RefundRemark
|
|
|
|
|
x.RefundTag,x.RefundReason,x.RefundRemark,x.OrderProgress
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
await seaComService.SetGoodsStatus("YFTC", req.Id, tenantDb);
|
|
|
|
@ -481,20 +501,38 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
if (callback.FlowStatus == FlowStatusEnum.Approve)
|
|
|
|
|
{
|
|
|
|
|
await seaComService.SetGoodsStatus("YSTC", callback.BusinessId, tenantDb);
|
|
|
|
|
//发起退舱确认任务
|
|
|
|
|
var taskReq = new TaskCreationRequest()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = info.Id,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN.ToString(),
|
|
|
|
|
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
};
|
|
|
|
|
var result = await taskService.CreateTaskAsync(taskReq, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
|
|
|
|
|
if (info.OrderProgress =="2")//已出号未申报 发起退舱入池任务
|
|
|
|
|
{
|
|
|
|
|
return await Task.FromResult(DataResult.Failed(result.Message));
|
|
|
|
|
var taskReq = new TaskCreationRequest()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = info.Id,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN_POOL.ToString(),
|
|
|
|
|
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
};
|
|
|
|
|
var result = await taskService.CreateTaskAsync(taskReq, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
return await Task.FromResult(DataResult.Failed(result.Message));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//发起退舱确认任务
|
|
|
|
|
var taskReq = new TaskCreationRequest()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = info.Id,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN.ToString(),
|
|
|
|
|
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN.GetDescription()}】{info?.CustomerNo}",
|
|
|
|
|
};
|
|
|
|
|
var result = await taskService.CreateTaskAsync(taskReq, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
{
|
|
|
|
|
return await Task.FromResult(DataResult.Failed(result.Message));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|