|
@@ -12,6 +12,7 @@ import com.cnd3b.common.websocket.WebClientSocket;
|
|
|
import com.cnd3b.utility.polyv.Polyv;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
/**
|
|
@@ -43,8 +44,18 @@ public class GetPolyvAnalysisData extends BaseClass implements Runnable {
|
|
|
String[] channelids = channelRows.toArray("channelid");
|
|
|
RowsMap map = channelRows.toRowsMap("channelid");
|
|
|
Polyv polyv = new Polyv();
|
|
|
- HashMap<String, String> livestatusMap = polyv.getLiveStatuses(channelids);
|
|
|
- System.err.println("*******"+livestatusMap+"*******");
|
|
|
+ HashMap<String, String> livestatusMap = new HashMap<>();
|
|
|
+ //×î¶àͬʱ²éѯ20¸öƵµÀ
|
|
|
+ if (channelids.length > 20) {
|
|
|
+ int size = channelids.length % 20;
|
|
|
+ for (int i = 0; i < size; i++) {
|
|
|
+ livestatusMap.putAll(polyv.getLiveStatuses(Arrays.copyOfRange(channelids, i * 20, (i + 1) * 20 - 1)));
|
|
|
+ }
|
|
|
+ livestatusMap.putAll(polyv.getLiveStatuses(Arrays.copyOfRange(channelids, size * 20, channelids.length - 1)));
|
|
|
+ } else {
|
|
|
+ livestatusMap = polyv.getLiveStatuses(channelids);
|
|
|
+ }
|
|
|
+
|
|
|
ArrayList<String> sqllist = new ArrayList<>();
|
|
|
for (String channelid : livestatusMap.keySet()) {
|
|
|
String livestatus = livestatusMap.get(channelid);
|