改配退舱修改

dev
cjy 2 weeks ago
parent 85bcd1229f
commit 94184f2a47

@ -245,6 +245,12 @@ namespace DS.Module.Core
/// </summary>
[Description("退舱审核")]
RETURN_CABIN_AUDIT = 402,
/// <summary>
/// 退舱入池
/// </summary>
[Description("退舱入池")]
RETURN_CABIN_POOL = 403,
#endregion
#region 基础数据审核

@ -16,7 +16,10 @@ namespace DS.WMS.Core.Op.Dtos
/// </summary>
public long Id { get; set; }
/// <summary>
/// 订单进程 1.已审未出号 2.已出号未申报 3.已申报
/// </summary>
public string OrderProgress { get; set; }
/// <summary>
/// 改配原因
/// </summary>

@ -19,8 +19,16 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 是否保留费用 默认false
/// </summary>
public bool IsReserveFee { get; set; }
public bool IsReserveFee { get; set; } = false;
/// <summary>
/// 订单进程 1.已审未出号 2.已出号未申报 3.已申报
/// </summary>
public string OrderProgress { get; set; }
/// <summary>
/// 是否已放舱 默认false
/// </summary>
public bool IsRelease { get; set; } = false;
/// <summary>
/// 退舱原因
/// </summary>

@ -1975,5 +1975,11 @@ public class SeaExport : BaseOrgModel<long>
/// 退舱备注
/// </summary>
[SugarColumn(ColumnDescription = "退舱备注", IsNullable = true, Length = 200)]
public string RefundRemark { get; set; }
public string RefundRemark { get; set; }
/// <summary>
/// 订单进程 0.未审单 1.已审未出号 2.已出号未申报 3.已申报
/// </summary>
[SugarColumn(ColumnDescription = "订单进程 0.未审单 1.已审未出号 2.已出号未申报 3.已申报", IsNullable = true, Length = 20,DefaultValue ="0")]
public string OrderProgress { get; set; }
}

@ -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
{

Loading…
Cancel
Save