| | |
| | | import com.sandu.ximon.admin.param.PoleBindingParam; |
| | | import com.sandu.ximon.admin.param.PoleParam; |
| | | import com.sandu.ximon.admin.param.PoleStatesParam; |
| | | import com.sandu.ximon.admin.param.PushAirDataToNovaParam; |
| | | import com.sandu.ximon.admin.redis.LightKey; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.LightemitUtils; |
| | |
| | | throw new BusinessException("灯杆不存在"); |
| | | } |
| | | pole.setClientId(clientId); |
| | | if (!clientService.findClientId(clientId)) { |
| | | if (clientService.findClientId(clientId)) { |
| | | pole.setUserId(clientService.getClientId(clientId)); |
| | | |
| | | } |
| | |
| | | if (pole == null) { |
| | | throw new BusinessException("灯杆不存在"); |
| | | } |
| | | pole.setUserId(-1L); |
| | | pole.setClientId(-1L); |
| | | r = updateById(pole); |
| | | |
| | |
| | | /** |
| | | * 推送大气监测数据到novaLED |
| | | */ |
| | | public VnnoxResult pushAirDataToNova(Long poleId) { |
| | | public VnnoxResult pushAirDataToNova(PushAirDataToNovaParam param) { |
| | | Long poleId=param.getPoleId(); |
| | | Pole pole = getById(poleId); |
| | | PoleBinding air = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, poleId).eq(PoleBinding::getDeviceType, 3)); |
| | | PoleBinding nova = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, poleId).eq(PoleBinding::getDeviceType, 1)); |
| | |
| | | //获取大气监测数据 |
| | | A5AtmosphereHeartbeatReportInnerFrame.HeartBeatDataPackage data = SpringContextHolder.getBean(AirDataService.class).getDataByPoleid(poleId); |
| | | //推送数据 |
| | | return SpringContextHolder.getBean(VnnoxService.class).publishWaterData(LED.getPlayerId(), data); |
| | | // return SpringContextHolder.getBean(VnnoxService.class).publishWaterData(LED.getPlayerId(),param.getDuration(), data); |
| | | return SpringContextHolder.getBean(VnnoxService.class).WaterData(LED.getPlayerId(),param.getDuration(), data); |
| | | } |
| | | |
| | | |