diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs index df9cf904..03090cf4 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs @@ -226,6 +226,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction TaskInfo = dataContext.GetOrDefault(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]; diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs index 31f897d0..a76d557d 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs @@ -169,30 +169,31 @@ namespace DS.WMS.Core.TaskPlat } // 对节点列表里面的节点进行依次判断,取出要执行的节点 - var matchedConfigList = new List(); + 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(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) @@ -297,7 +298,14 @@ namespace DS.WMS.Core.TaskPlat dynamic dynamicTask = task; if (dynamicTask.Result != null) { - flowLogDetail.ExecuteReturn = JsonConvert.SerializeObject(dynamicTask.Result); + 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) diff --git a/ds-wms-service/DS.WMS.TaskApi/appsettings.json b/ds-wms-service/DS.WMS.TaskApi/appsettings.json index 48c463f4..e42cf810 100644 --- a/ds-wms-service/DS.WMS.TaskApi/appsettings.json +++ b/ds-wms-service/DS.WMS.TaskApi/appsettings.json @@ -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",