From 92e9ed771b801cee4a6981b7126dd529859254b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 13 Mar 2025 17:47:03 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B9=A6=E5=86=99=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/service/impl/FlwNodeExtServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwNodeExtServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwNodeExtServiceImpl.java index 2dc30607c..231487d04 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwNodeExtServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwNodeExtServiceImpl.java @@ -81,6 +81,7 @@ public class FlwNodeExtServiceImpl implements NodeExtService { * @param sources 数据来源(枚举类或字典类型) * @return 构建的 `NodeExt` 对象 */ + @SuppressWarnings("unchecked cast") private NodeExt buildNodeExt(String code, String name, int type, List sources) { NodeExt nodeExt = new NodeExt(); nodeExt.setCode(code); @@ -89,7 +90,7 @@ public class FlwNodeExtServiceImpl implements NodeExtService { nodeExt.setChilds(sources.stream() .map(source -> { if (source instanceof Class clazz && NodeExtEnum.class.isAssignableFrom(clazz)) { - return buildChildNode((Class>) clazz); + return buildChildNode((Class) clazz); } else if (source instanceof String dictType) { return buildChildNode(dictType); } @@ -107,7 +108,7 @@ public class FlwNodeExtServiceImpl implements NodeExtService { * @param enumClass 枚举类,必须实现 `NodeExtEnum` 接口 * @return 构建的 `ChildNode` 对象 */ - private NodeExt.ChildNode buildChildNode(Class> enumClass) { + private NodeExt.ChildNode buildChildNode(Class enumClass) { if (!enumClass.isEnum()) { return null; } @@ -117,7 +118,6 @@ public class FlwNodeExtServiceImpl implements NodeExtService { childNode.setCode(simpleName); // 字典,下拉框和复选框时用到 childNode.setDict(Arrays.stream(enumClass.getEnumConstants()) - .filter(NodeExtEnum.class::isInstance) .map(NodeExtEnum.class::cast) .map(x -> new NodeExt.DictItem(x.getLabel(), x.getValue(), x.isSelected())