自动订舱bug修复

usertest
嵇文龙 3 months ago
parent 2c17f3bd38
commit c52728c5a4

@ -39,6 +39,9 @@ namespace DS.WMS.Core.Fee.Method
public async Task GenerateFeesAsync(long bsId, BusinessType businessType = BusinessType.OceanShippingExport)
{
var model = await actionService.Value.GetBusinessDataAsync(bsId, businessType, nameof(SeaExport.CustomerId));
if (model == null)
return;
long custId = model.CustomerId;
try
{

@ -9,7 +9,9 @@ using DS.WMS.Core.Op.Entity.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using DS.WMS.Core.Op.Method.TaskInteraction.ActionSelector;
using DS.WMS.Core.TaskPlat;
using DS.WMS.Core.TaskPlat.Entity;
using Fasterflect;
using LanguageExt.Pipes;
using Masuit.Tools;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
@ -212,6 +214,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
("TypeName", typeof(BookingSelector).AssemblyQualifiedName)
);
var paramList = await GetTaskParamsAsync(TaskBaseTypeEnum.WAIT_BOOKING);
foreach (var item in paramList)
dataContext[item.FieldName] = item.FieldValue;
await ExecuteAsync(dataContext);
return DataResult.Success;
}
@ -222,6 +228,19 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
}
}
/// <summary>
/// 获取指定任务类型的参数
/// </summary>
/// <param name="taskType"></param>
/// <returns></returns>
internal async Task<List<TaskFlowParam>> GetTaskParamsAsync(TaskBaseTypeEnum taskType)
{
return await TenantDb.Queryable<TaskFlowParam>()
.InnerJoin<TaskFlowConfig>((p, c) => p.ConfigId == c.Id)
.InnerJoin<TaskFlowModule>((p, c, m) => c.ExecuteModuleId == m.Id)
.Where((p, c, m) => m.TaskType == taskType.ToString() && m.ModuleType == 2).ToListAsync();
}
/// <summary>
/// 执行动作
/// </summary>

Loading…
Cancel
Save