Commit bc7cfaae by wang_jiaxing

撤回集群配置

parent f64a456f
......@@ -38,34 +38,16 @@ public class XjFlwsServiceImpl implements XjFlwsService {
@Override
public String getJzzjkFlwsnrToXjxz(Date date, String xxzjbh) throws IOException {
if (clusterId > clusterSize){
return "集群数量有误,集群id不能大于集群数量!";
}
Integer count = xjxzFlwsMapper.getFlwsCountWzByDate(date, xxzjbh);
int page = (count / poorSize) + 1;
ArrayList<FutureTask<Map<String, Integer>>> list = new ArrayList<>();
int lmt = count / clusterSize;
int remainder = count % clusterSize;
if (clusterId <= remainder) {
lmt++;
}
int cou = lmt / poorSize;
int remainderCou = lmt % poorSize;
int begin = (clusterId - 1) * lmt;
if (remainder > 0 && clusterId > remainder) {
begin = begin + remainder;
}
int end;
for (int i = 0; i < poorSize; i++) {
int finalBegin = begin;
end = begin + cou;
if (i < remainderCou) {
end++;
}
begin = end;
int finalEnd = end;
for (int i = 0; i < page; i++) {
int limit = poorSize;
int begin = i * limit;
int end = (i + 1) * limit;
FutureTask<Map<String, Integer>> xsAjTask = new FutureTask<>(() -> {
HashMap<String, Integer> map = new HashMap<>();
List<Map<String, String>> flwsList = xjxzFlwsMapper.getFlwsWzByDate(date, xxzjbh, finalBegin, finalEnd);
List<Map<String, String>> flwsList = xjxzFlwsMapper.getFlwsWzByDate(date, xxzjbh, begin, end);
ArrayList<Exception> exceptions = new ArrayList<>();
System.out.println("+++++++++++++" + flwsList.size());
int j = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment