From 7d3040d4c742af5e13f7327e7397a0524c1ffdec Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 21 二月 2024 16:06:31 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/Utils.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/Utils.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/Utils.java
index 1881c3b..fe7d834 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/Utils.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/Utils.java
@@ -39,7 +39,9 @@
             if (parentId.equals(dParentId)) {
                 R dId = idMapper.apply(d);
                 List<T> children = toTreeData(data, dId, parentIdMapper, idMapper, consumer);
-                consumer.accept(d, children);
+                if(children.size() > 0) {
+                    consumer.accept(d, children);
+                }
                 result.add(d);
             }
         }

--
Gitblit v1.9.1