| | |
| | | package com.sandu.ximon.admin.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.google.gson.Gson; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | |
| | | poleLightemitEntity.setIsOpen(lightemitUtils.getIsScreenOpen(poleLightemitEntity.getLightemitControlCode()).contains("true")); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | public PoleLightemitEntity getLedByLightControlCode(String lightControlCode) { |
| | | PoleLightemitEntity xiXun = getOne(Wrappers.lambdaQuery(PoleLightemitEntity.class).eq(PoleLightemitEntity::getLightemitControlCode, lightControlCode)); |
| | | if(xiXun==null){ |
| | | return null; |
| | | } |
| | | String isScreenOpen = lightemitUtils.getIsScreenOpen(xiXun.getLightemitControlCode()); |
| | | if(isScreenOpen.contains("true")){ |
| | | xiXun.setIsOpen(true); |
| | | } |
| | | xiXun.setIsOpen(false); |
| | | return xiXun; |
| | | } |
| | | |
| | | |
| | |
| | | public void setVolume(String lightemitControlCode, Integer volume) { |
| | | lightemitUtils.setVoiume(lightemitControlCode, volume); |
| | | } |
| | | /* |
| | | 根据led屏编码设置音量 |
| | | */ |
| | | |
| | | @Async("taskExecutor") |
| | | public void setBrightness(String lightemitControlCode, Integer brightness) { |
| | | lightemitUtils.setBrightness(lightemitControlCode, brightness); |
| | | } |
| | | |
| | | |
| | | |
| | | // public List<PoleLightemitEntity> listOfStreetlight(String streetlightId) { |