From 2f2ed06a35959e885eb8ef8c20627f149f401043 Mon Sep 17 00:00:00 2001 From: cdf <857448963@qq.com> Date: Mon, 22 Dec 2025 19:59:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=AE=A1=E7=90=86=E5=8A=A0?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../njcn/prepare/harmonic/mapper/mysql/EventMapper.xml | 6 +++--- .../com/njcn/user/service/impl/ComponentServiceImpl.java | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/mysql/EventMapper.xml b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/mysql/EventMapper.xml index 7fad810ae..452014f43 100644 --- a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/mysql/EventMapper.xml +++ b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/mysql/EventMapper.xml @@ -19,7 +19,7 @@ line_index id, LEAST(ROUND(SUM(real_time) / SUM(due_time), 2) * 100,100) integrityData FROM - `r_stat_integrity_d` + r_stat_integrity_d WHERE time_id between #{startTime} and #{endTime} GROUP BY line_index @@ -35,9 +35,9 @@ 100 ) integrityData FROM - `r_stat_onlinerate_d` + r_stat_onlinerate_d WHERE time_id between #{startTime} and #{endTime} GROUP BY dev_index - \ No newline at end of file + diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/ComponentServiceImpl.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/ComponentServiceImpl.java index 16ebe2176..f3ec2e5d7 100644 --- a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/ComponentServiceImpl.java +++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/ComponentServiceImpl.java @@ -26,10 +26,7 @@ import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; /** @@ -110,6 +107,7 @@ public class ComponentServiceImpl extends ServiceImpl Objects.equals(ComponentState.FATHER_PID, fun.getPid())) @@ -117,6 +115,7 @@ public class ComponentServiceImpl extends ServiceImpl getChildCategoryList(ComponentVO currMenu, List categories) { return categories.stream().filter(o -> Objects.equals(o.getPid(), currMenu.getId())) - .peek(o -> o.setChildren(getChildCategoryList(o, categories))) + .peek(o -> o.setChildren(getChildCategoryList(o, categories))).sorted(Comparator.comparing(ComponentVO::getSort)) .collect(Collectors.toList()); }