From 64d6f054b025ef1b278755ba992167b4bef91239 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 22 May 2024 19:19:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20IT=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?-=E6=AD=A5=E9=AA=A4=E6=95=B0=E9=87=8F=E5=A4=9A=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B5=81=E8=BD=AC=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1162398289854464]IT服务-步骤数量多时,流转慢 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1162398289854464 --- .../ProcessTaskFormAttributeCondition.java | 24 ++++++++++--------- .../component/ConditionProcessComponent.java | 11 ++++++++- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/main/java/neatlogic/module/process/condition/handler/ProcessTaskFormAttributeCondition.java b/src/main/java/neatlogic/module/process/condition/handler/ProcessTaskFormAttributeCondition.java index 70bdd4082..91f18382b 100644 --- a/src/main/java/neatlogic/module/process/condition/handler/ProcessTaskFormAttributeCondition.java +++ b/src/main/java/neatlogic/module/process/condition/handler/ProcessTaskFormAttributeCondition.java @@ -274,19 +274,21 @@ public class ProcessTaskFormAttributeCondition extends ProcessTaskConditionBase resultObj.put(processTaskFormAttributeDataVo.getAttributeLabel(), value); } else { String data = processTaskFormAttributeDataVo.getData(); - JSONObject componentObj = new JSONObject(); - componentObj.put("handler", formAttributeVo.getHandler()); - componentObj.put("uuid", formAttributeVo.getUuid()); - componentObj.put("label", formAttributeVo.getLabel()); - componentObj.put("config", formAttributeVo.getConfig()); - componentObj.put("type", formAttributeVo.getType()); - List downwardFormAttributeList = FormUtil.getFormAttributeList(componentObj, null); - for (FormAttributeVo downwardFormAttribute : downwardFormAttributeList) { - if (data.contains(downwardFormAttribute.getUuid())) { - data = data.replace(downwardFormAttribute.getUuid(), downwardFormAttribute.getLabel()); + if (StringUtils.isNotBlank(data)) { + JSONObject componentObj = new JSONObject(); + componentObj.put("handler", formAttributeVo.getHandler()); + componentObj.put("uuid", formAttributeVo.getUuid()); + componentObj.put("label", formAttributeVo.getLabel()); + componentObj.put("config", formAttributeVo.getConfig()); + componentObj.put("type", formAttributeVo.getType()); + List downwardFormAttributeList = FormUtil.getFormAttributeList(componentObj, null); + for (FormAttributeVo downwardFormAttribute : downwardFormAttributeList) { + if (data.contains(downwardFormAttribute.getUuid())) { + data = data.replace(downwardFormAttribute.getUuid(), downwardFormAttribute.getLabel()); + } } + processTaskFormAttributeDataVo.setData(data); } - processTaskFormAttributeDataVo.setData(data); //另存一份label为key的数据,给条件路由的自定义脚本消费 resultObj.put(processTaskFormAttributeDataVo.getAttributeLabel(), processTaskFormAttributeDataVo.getDataObj()); } diff --git a/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java b/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java index 1d2a036a8..09687fdf6 100644 --- a/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java +++ b/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java @@ -127,10 +127,15 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { protected Set myGetNext(ProcessTaskStepVo currentProcessTaskStepVo, List nextStepIdList, Long nextStepId) throws ProcessTaskException { try { + logger.warn("nextStepId = " + nextStepId); + logger.warn("nextStepIdList = " + JSONArray.toJSONString(nextStepIdList)); UserContext.init(SystemUser.SYSTEM); Set nextStepIdSet = new HashSet<>(); if (CollectionUtils.isNotEmpty(nextStepIdList)) { List nextStepList = processTaskMapper.getProcessTaskStepListByIdList(nextStepIdList); + nextStepList.forEach(e -> { + logger.warn("step = " + e.getName() + "(" + e.getId() + ")"); + }); Map processTaskStepMap = nextStepList.stream().collect(Collectors.toMap(ProcessTaskStepVo::getProcessStepUuid, e -> e)); Map processStepNameMap = nextStepList.stream().collect(Collectors.toMap(ProcessTaskStepVo::getProcessStepUuid, ProcessTaskStepVo::getName)); ProcessTaskStepVo processTaskStepVo = processTaskMapper.getProcessTaskStepBaseInfoById(currentProcessTaskStepVo.getId()); @@ -143,6 +148,7 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { JSONObject moveonConfig = moveonConfigList.getJSONObject(i); JSONArray targetStepList = moveonConfig.getJSONArray("targetStepList"); if (CollectionUtils.isNotEmpty(targetStepList)) { + logger.warn("开始流转规则: " + currentProcessTaskStepVo.getName() + "流转至: " + targetStepList + ", time: " + System.currentTimeMillis()); JSONObject ruleObj = new JSONObject(); String type = moveonConfig.getString("type"); boolean canRun = false; @@ -153,6 +159,7 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { } else if ("optional".equals(type)) {// 自定义 JSONArray conditionGroupList = moveonConfig.getJSONArray("conditionGroupList"); if (CollectionUtils.isNotEmpty(conditionGroupList)) { + logger.warn("开始条件判断: " + ", time: " + System.currentTimeMillis()); JSONObject conditionParamData = ProcessTaskConditionFactory.getConditionParamData(ConditionProcessTaskOptions.values(), currentProcessTaskStepVo); ConditionConfigVo conditionConfigVo = null; try { @@ -171,6 +178,7 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { ruleObj.put("conditionGroupList", conditionConfigVo.getConditionGroupList()); ruleObj.put("conditionGroupRelList", conditionConfigVo.getConditionGroupRelList()); } + logger.warn("完成条件判断: " + ", time: " + System.currentTimeMillis()); } } else { ruleObj.putAll(moveonConfig); @@ -194,13 +202,14 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { ruleObj.put("type", type); ruleObj.put("targetStepList", targetStepNameList); ruleList.add(ruleObj); + logger.warn("结束流转规则: " + currentProcessTaskStepVo.getName() + "流转至: " + targetStepList + ", time: " + System.currentTimeMillis()); } } currentProcessTaskStepVo.getParamObj().put(ProcessTaskAuditDetailType.RULE.getParamName(), ruleList); } } } - + logger.warn("nextStepIdSet = " + JSONArray.toJSONString(nextStepIdSet)); return nextStepIdSet; } catch (Exception e) { logger.error(e.getMessage(), e); -- Gitee From 8cbf8fcec645ba1a17d5d341a24a91c65940ca48 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 23 May 2024 11:56:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20IT=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?-=E6=AD=A5=E9=AA=A4=E6=95=B0=E9=87=8F=E5=A4=9A=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B5=81=E8=BD=AC=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1162398289854464]IT服务-步骤数量多时,流转慢 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1162398289854464 --- .../component/ConditionProcessComponent.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java b/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java index 09687fdf6..22b9107a4 100644 --- a/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java +++ b/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java @@ -127,15 +127,10 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { protected Set myGetNext(ProcessTaskStepVo currentProcessTaskStepVo, List nextStepIdList, Long nextStepId) throws ProcessTaskException { try { - logger.warn("nextStepId = " + nextStepId); - logger.warn("nextStepIdList = " + JSONArray.toJSONString(nextStepIdList)); UserContext.init(SystemUser.SYSTEM); Set nextStepIdSet = new HashSet<>(); if (CollectionUtils.isNotEmpty(nextStepIdList)) { List nextStepList = processTaskMapper.getProcessTaskStepListByIdList(nextStepIdList); - nextStepList.forEach(e -> { - logger.warn("step = " + e.getName() + "(" + e.getId() + ")"); - }); Map processTaskStepMap = nextStepList.stream().collect(Collectors.toMap(ProcessTaskStepVo::getProcessStepUuid, e -> e)); Map processStepNameMap = nextStepList.stream().collect(Collectors.toMap(ProcessTaskStepVo::getProcessStepUuid, ProcessTaskStepVo::getName)); ProcessTaskStepVo processTaskStepVo = processTaskMapper.getProcessTaskStepBaseInfoById(currentProcessTaskStepVo.getId()); @@ -148,7 +143,6 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { JSONObject moveonConfig = moveonConfigList.getJSONObject(i); JSONArray targetStepList = moveonConfig.getJSONArray("targetStepList"); if (CollectionUtils.isNotEmpty(targetStepList)) { - logger.warn("开始流转规则: " + currentProcessTaskStepVo.getName() + "流转至: " + targetStepList + ", time: " + System.currentTimeMillis()); JSONObject ruleObj = new JSONObject(); String type = moveonConfig.getString("type"); boolean canRun = false; @@ -159,7 +153,6 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { } else if ("optional".equals(type)) {// 自定义 JSONArray conditionGroupList = moveonConfig.getJSONArray("conditionGroupList"); if (CollectionUtils.isNotEmpty(conditionGroupList)) { - logger.warn("开始条件判断: " + ", time: " + System.currentTimeMillis()); JSONObject conditionParamData = ProcessTaskConditionFactory.getConditionParamData(ConditionProcessTaskOptions.values(), currentProcessTaskStepVo); ConditionConfigVo conditionConfigVo = null; try { @@ -178,7 +171,6 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { ruleObj.put("conditionGroupList", conditionConfigVo.getConditionGroupList()); ruleObj.put("conditionGroupRelList", conditionConfigVo.getConditionGroupRelList()); } - logger.warn("完成条件判断: " + ", time: " + System.currentTimeMillis()); } } else { ruleObj.putAll(moveonConfig); @@ -202,14 +194,12 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { ruleObj.put("type", type); ruleObj.put("targetStepList", targetStepNameList); ruleList.add(ruleObj); - logger.warn("结束流转规则: " + currentProcessTaskStepVo.getName() + "流转至: " + targetStepList + ", time: " + System.currentTimeMillis()); } } currentProcessTaskStepVo.getParamObj().put(ProcessTaskAuditDetailType.RULE.getParamName(), ruleList); } } } - logger.warn("nextStepIdSet = " + JSONArray.toJSONString(nextStepIdSet)); return nextStepIdSet; } catch (Exception e) { logger.error(e.getMessage(), e); -- Gitee From abcdb3e0a4958e4a9fd72c88731e247c2b22adc8 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 23 May 2024 11:56:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20IT=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?-=E6=AD=A5=E9=AA=A4=E6=95=B0=E9=87=8F=E5=A4=9A=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B5=81=E8=BD=AC=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1162398289854464]IT服务-步骤数量多时,流转慢 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1162398289854464 --- .../process/stephandler/component/ConditionProcessComponent.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java b/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java index 22b9107a4..1d2a036a8 100644 --- a/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java +++ b/src/main/java/neatlogic/module/process/stephandler/component/ConditionProcessComponent.java @@ -200,6 +200,7 @@ public class ConditionProcessComponent extends ProcessStepHandlerBase { } } } + return nextStepIdSet; } catch (Exception e) { logger.error(e.getMessage(), e); -- Gitee