| | |
| | | this.mac = mac; |
| | | this.specialDevice = (SpecialDevice) redisTemplate.opsForHash().get(RedisConstants.SPECIAL_DEVICE_INFO, mac); |
| | | //获取设备地区对应的AQI用于补偿使用 |
| | | Map<String, Object> deviceInfo = (Map<String, Object>) redisTemplate.opsForHash().get(RedisConstants.DEVICE, mac); |
| | | /*Map<String, Object> deviceInfo = (Map<String, Object>) redisTemplate.opsForHash().get(RedisConstants.DEVICE, mac); |
| | | Map<String, Object> orgInfo = (Map<String, Object>) deviceInfo.get("organization"); |
| | | String areaCode = String.valueOf(orgInfo.get("areaCode")); |
| | | String cityCode = String.valueOf(orgInfo.get("cityCode")); |
| | |
| | | this.regionAqi = (Map<String, Object>) redisTemplate.opsForHash().get(RedisConstants.AQI_DATA, cityCode); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }*/ |
| | | sockets.add(this); |
| | | } |
| | | |