2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-04-19 eb4eb5ec588462e45f7dea235c578ac4fe346aa7
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -115,10 +115,11 @@
    /**
     * 统计在线灯杆数量
     *
     * @return
     */
    public Map<String,Integer> poleCount() {
        Map<String,Integer> result = new HashMap<>();
    public Map<String, Integer> poleCount() {
        Map<String, Integer> result = new HashMap<>();
        List<Pole> list = new ArrayList<>();
        LambdaQueryWrapper<Pole> wrapper = new LambdaQueryWrapper<>();
        if (SecurityUtils.getClientId() == null) {
@@ -131,8 +132,8 @@
        }
        list = list(wrapper);
        List<Pole> poles = isOnLine(list);
        result.put("poleOnlineCount",poles.size());
        result.put("poleTotalCount",list.size());
        result.put("poleOnlineCount", poles.size());
        result.put("poleTotalCount", list.size());
        return result;
    }
@@ -147,7 +148,7 @@
                        w.eq(Pole::getUserId, SecurityUtils.getUserId());
                    });
        }
        if (!param.getKeyword().isEmpty()) {
        if (param.getKeyword() != null && !param.getKeyword().isEmpty()) {
            wrapper.like(Pole::getPoleCode, param.getKeyword()).or(
                    wrappers -> {
                        wrappers.like(Pole::getPoleName, param.getKeyword());