| | |
| | | System.out.println("ViplexCore Demo nvDownLoadScreenshotAsync(截屏) begin... "); |
| | | NovaFileConfig config = SpringContextHolder.getBean(NovaFileConfig.class); |
| | | String shotPath = config.getScreenShotPath(); |
| | | CountDownLatch countDownLatch = new CountDownLatch(param.getScreenShotList().size()); |
| | | param.getScreenShotList().forEach(newNova -> { |
| | | |
| | | for(NewNovaStatusParam.NovascreenShotDTO newNova:param.getScreenShotList()){ |
| | | StatusVO login = login(newNova.getSn(), 0); |
| | | if (login.getStatusCode() != 0) { |
| | | countDownLatch.countDown(); |
| | | return; |
| | | continue; |
| | | } |
| | | CountDownLatch countDownLatch = new CountDownLatch(1); |
| | | String pictureName = newNova.getSn() + ".png"; |
| | | String str = "{\n" + |
| | | " \"sn\":\"" + newNova.getSn() + "\",\n" + |
| | |
| | | newNova.setScreenShot(data); |
| | | } |
| | | countDownLatch.countDown(); |
| | | |
| | | try { |
| | | countDownLatch.await(5000, TimeUnit.MILLISECONDS); |
| | | } catch (InterruptedException ex) { |
| | | throw new RuntimeException(ex); |
| | | } |
| | | |
| | | } |
| | | |
| | | }); |
| | | |
| | | }); |
| | | |
| | | //等待設備回調信息 |
| | | try { |
| | | countDownLatch.await(5000, TimeUnit.MILLISECONDS); |
| | | } catch (InterruptedException ex) { |
| | | throw new RuntimeException(ex); |
| | | } |
| | | } |
| | | return param.getScreenShotList(); |
| | | } |
| | | |