任务执行调整

usertest
zhangxiaofeng 3 months ago
parent dbb07a2278
commit 917aded780

@ -226,6 +226,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
TaskInfo = dataContext.GetOrDefault<BusinessTask>(TaskFlowDataNameConst.BusinessTask),
ServiceProvider = ServiceProvider
};
//dataContext.Set("TypeName", "DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease.SpaceReleaseActionExecutor,DS.WMS.Core");
foreach (var key in dataContext.Keys)
context.AdditionalData[key] = dataContext[key];

@ -169,30 +169,31 @@ namespace DS.WMS.Core.TaskPlat
}
// 对节点列表里面的节点进行依次判断,取出要执行的节点
var matchedConfigList = new List<TaskFlowConfig>();
var matchedConfigList = new List<(TaskFlowConfig config, bool isHasCondition)>();
foreach (var waitMatchConfigItem in waitMatchConfigList)
{
var condition = conditionList.FirstOrDefault(x => x.ConfigId == waitMatchConfigItem.Id);
if (condition == null || string.IsNullOrEmpty(condition.Content))
{
matchedConfigList.Add(waitMatchConfigItem);
matchedConfigList.Add((waitMatchConfigItem, false));
continue;
}
var contitionContent = JsonConvert.DeserializeObject<ConditionContent>(condition.Content)!;
if (ConditionHelper.IsPass(contitionContent, dataContext))
{
matchedConfigList.Add(waitMatchConfigItem);
matchedConfigList.Add((waitMatchConfigItem, true));
continue;
}
}
if (matchedConfigList.Count == 1)
{
executeConfig = matchedConfigList[0];
executeConfig = matchedConfigList[0].config;
}
else if (matchedConfigList.Count > 1)
{
executeConfig = matchedConfigList.FirstOrDefault(x => x.IsMoreMatchDefault);
var temp = matchedConfigList.OrderBy(x => x.config.Id).Where(x => x.isHasCondition).ToList();
executeConfig = temp.FirstOrDefault().config;
}
if (executeConfig == null)
@ -295,9 +296,16 @@ namespace DS.WMS.Core.TaskPlat
}
dynamic dynamicTask = task;
if (dynamicTask.Result != null)
{
if (dynamicTask.Result != null)
{
flowLogDetail.ExecuteReturn = JsonConvert.SerializeObject(dynamicTask.Result);
}
else
{
flowLogDetail.ExecuteReturn = "执行返回结果为null";
}
var isSuccess = dynamicTask.Result.Succeeded;
if (isSuccess != null && isSuccess is bool)

@ -66,10 +66,11 @@
"FileType": [ ".xls", ".xlsx", ".pdf", ".txt", ".pms" ]
},
"BCCompare": {
"Url": "http://localhost:5110/api/TaskBookingAmendmentParser/ExcuteBookingAmendmentCompare",
//"Url": "http://localhost:5110/api/TaskBookingAmendmentParser/ExcuteBookingAmendmentCompare",
"MSKBCReadUrl": "http://47.104.73.97:7115/api/TaskBCParser/ExcuteBCFileRead",
"MSKBCModifyFileUrl": "http://47.104.73.97:7115/api/TaskBCParser/ModifyBCFile",
"CMABCReadUrl": "http://47.104.73.97:7115/api/TaskBCCMAParser/ExcuteBCFileRead"
"CMABCReadUrl": "http://47.104.73.97:7115/api/TaskBCCMAParser/ExcuteBCFileRead",
"Url": "http://60.209.125.238:35210/api/TaskBookingAmendmentParser/ExcuteBookingAmendmentCompare"
},
"ShippingOrderCompare": {
"Url": "http://47.104.73.97:7115/api/TaskShippingOrderCompare/ExcuteShippingOrderCompare",

Loading…
Cancel
Save