2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-19 4999af7326b571e936fbbbab017f6a64f87ba5ad
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -34,7 +34,6 @@
import com.sandu.ximon.admin.redis.LightKey;
import com.sandu.ximon.admin.security.SecurityUtils;
import com.sandu.ximon.admin.vo.PoleBindVO;
import com.sandu.ximon.dao.domain.LedPlayerEntity;
import com.sandu.ximon.dao.domain.Pole;
import com.sandu.ximon.dao.domain.PoleBinding;
import com.sandu.ximon.dao.domain.PoleGroupRelation;
@@ -131,26 +130,10 @@
                        w.eq(Pole::getUserId, SecurityUtils.getUserId());
                    });
        }
        //灯杆
        list = list(wrapper);
        List<Pole> poles = isOnLine(list);
        result.put("poleOnlineCount", poles.size());
        result.put("poleTotalCount", list.size());
        //诺瓦
        // SpringContextHolder.getBean(LightService.class).listLight(SecurityUtils.getUserId(), SecurityUtils.getClientId());
        List<LedPlayerEntity> ledPlayerEntities = SpringContextHolder.getBean(LedPlayerEntityService.class).ledPlayerEntityList(null, null);
        int munber = 0;
        for (LedPlayerEntity bean : ledPlayerEntities) {
            if (bean.getOnlineStatus() == 1) {
                munber++;
            }
        }
        result.put("novaOnlineCount", munber);
        result.put("novaTotalCount", ledPlayerEntities.size());
        SpringContextHolder.getBean(C3ChargingService.class).list();
        return result;
    }
@@ -165,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());
@@ -173,7 +156,6 @@
            );
        }
        PageHelper.startPage(pageNo, pageSize);
        list = list(wrapper);
        if (param.getGroupid() != null) {
            //  List<Long> poleIds = new ArrayList<>();