|
@@ -30,6 +30,21 @@ func GetPptReportClassifyTreeRecursive(list []*models.Classify, parentId int, cl
|
|
|
return res
|
|
|
}
|
|
|
|
|
|
+func RecursiveFilterPptNoChildTreeClassify(list []*models.PptReportClassifyItem) []*models.PptReportClassifyItem {
|
|
|
+ res := make([]*models.PptReportClassifyItem, 0)
|
|
|
+ for _, v := range list {
|
|
|
+ v.Child = RecursiveFilterPptNoChildTreeClassify(v.Child)
|
|
|
+ if len(v.Child) == 0 && v.HasChild == 1 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ if len(v.Child) == 0 {
|
|
|
+ v.Child = nil
|
|
|
+ }
|
|
|
+ res = append(res, v)
|
|
|
+ }
|
|
|
+ return res
|
|
|
+}
|
|
|
+
|
|
|
// 更新分类报告计数加个锁
|
|
|
var classifyReportNumLock sync.Mutex
|
|
|
|