| | |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 灯杆相关 |
| | | * |
| | |
| | | * @return 设备状态列表 |
| | | */ |
| | | public List<DeviceStatus> listStatusByDeviceCode(ArrayList<String> deviceCodeList) { |
| | | // 最大只能查50个 |
| | | // 最大只能查50个 |
| | | List<List<String>> split = CollectionUtil.split(deviceCodeList, 50); |
| | | List<DeviceStatus> statusList = new ArrayList<>(); |
| | | for (List<String> list : split) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return statusList; |
| | | } |
| | | |
| | |
| | | //设置触发条件 存入Redis 15分钟超时 15分钟内再次调用直接返回 |
| | | redisUtils.set("redisStatusKeyTimeout", System.currentTimeMillis(), 60 * 15); |
| | | |
| | | CountDownLatch countDownLatch = new CountDownLatch(7);//todo |
| | | CountDownLatch countDownLatch = new CountDownLatch(7);//todo 几个设备设置为几 |
| | | //获取一个7位随机数 |
| | | String str = RandomStringUtils.randomAlphanumeric(7); |
| | | countDownLatchUtil.push(str, countDownLatch); |
| | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |