| | |
| | | List<String> success = new ArrayList<>(); |
| | | List<String> failed = new ArrayList<>(); |
| | | |
| | | for (String macStr : listMac) { |
| | | |
| | | listMac.parallelStream().forEach(macStr ->{ |
| | | // System.out.println(System.currentTimeMillis()+" -------------"); |
| | | try { |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(macStr, a5Frame); |
| | | if (commonFrame != null) { |
| | |
| | | } catch (Exception e) { |
| | | failed.add(macStr); |
| | | } |
| | | System.out.println(System.currentTimeMillis()); |
| | | } |
| | | // System.out.println(System.currentTimeMillis()); |
| | | }); |
| | | |
| | | |
| | | // for (String macStr : listMac) { |
| | | // System.out.println(System.currentTimeMillis()+" -------------"); |
| | | // try { |
| | | // CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(macStr, a5Frame); |
| | | // if (commonFrame != null) { |
| | | // success.add(macStr); |
| | | // } else { |
| | | // failed.add(macStr); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // failed.add(macStr); |
| | | // } |
| | | // System.out.println(System.currentTimeMillis()); |
| | | // } |
| | | |
| | | Map<String, List> resultMap = new HashMap<>(); |
| | | resultMap.put("success", success); |
| | | resultMap.put("failed", failed); |
| | | |
| | | // System.out.println("commonFrame"+commonFrame); |
| | | // System.out.println(wrapResponseCommonFrame); |
| | | |
| | | // A5AtmosphereHeartbeatReportInnerFrame heartbeatReportInnerFrame = new A5AtmosphereHeartbeatReportInnerFrame().transformFrame(wrapResponseCommonFrame.getPayload()); |
| | | |
| | | // System.out.println(heartbeatReportInnerFrame); |
| | | // return ResponseUtil.success(a5LightBrightnessRespInnerFrameWrapResponseCommonFrame); |
| | | return ResponseUtil.success(resultMap); |
| | | } |
| | | |