提交 9b074d96 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 39616395
......@@ -161,35 +161,22 @@ public class GeographysignServiceImpl extends BaseServiceImpl<Geographysign, Str
vo = new CountyTwoVo();
vo.setName(county);
vo.setValue(list.get(i).getValue());
chaList.add(vo);
haveList.add(vo);
}
}
}
// 重复数据合并
for (int i = 0; i < chaList.size() - 1; i++) {
for (int j = chaList.size() - 1; j > i; j--) {
if (chaList.get(j).getName().equals(chaList.get(i).getName())) {
chaList.get(i).setValue(chaList.get(i).getValue() + chaList.get(j).getValue());
chaList.remove(j);
}
}
}
//数据合并
for (int i = 0; i < haveList.size() - 1; i++) {
for (int j = chaList.size() - 1; j >= 0; j--) {
System.out.println(chaList.get(j).getName());
System.out.println(haveList.get(i).getName());
System.out.println(chaList.get(j).getName().equals(haveList.get(i).getName()));
if (chaList.get(j).getName().equals(haveList.get(i).getName())) {
System.out.println();
haveList.get(i).setValue(haveList.get(i).getValue() + chaList.get(j).getValue());
chaList.remove(j);
for (int j = haveList.size() - 1; j > i; j--) {
if (haveList.get(j).getName().equals(haveList.get(i).getName())) {
haveList.get(i).setValue(haveList.get(i).getValue() + haveList.get(j).getValue());
haveList.remove(j);
}
}
}
haveList.addAll(chaList);
CountyVo countyVo = new CountyVo();
countyVo.setTable(haveList);
countyVo.setCount(mapper.queryIcon(form, null).toString());
......@@ -290,7 +277,8 @@ public class GeographysignServiceImpl extends BaseServiceImpl<Geographysign, Str
criteria.andEqualTo("reserve1", form.getCategoryOne());
}
List<Geographysign> list = mapper.selectByExample(example);
List<Geographysign> list = mapper.queryCategoryAll(form);
return new PageInfo<Geographysign>(list);
}
......@@ -362,35 +350,23 @@ public class GeographysignServiceImpl extends BaseServiceImpl<Geographysign, Str
vo = new ProvinceVo();
vo.setName(county);
vo.setValue(list.get(i).getValue());
chaList.add(vo);
haveList.add(vo);
}
}
}
// 重复数据合并
for (int i = 0; i < chaList.size() - 1; i++) {
for (int j = chaList.size() - 1; j > i; j--) {
if (chaList.get(j).getName().equals(chaList.get(i).getName())) {
chaList.get(i).setValue(chaList.get(i).getValue() + chaList.get(j).getValue());
chaList.remove(j);
}
}
}
//数据合并
for (int i = 0; i < haveList.size() - 1; i++) {
for (int j = chaList.size() - 1; j >= 0; j--) {
System.out.println(chaList.get(j).getName());
System.out.println(haveList.get(i).getName());
System.out.println(chaList.get(j).getName().equals(haveList.get(i).getName()));
if (chaList.get(j).getName().equals(haveList.get(i).getName())) {
System.out.println();
haveList.get(i).setValue(haveList.get(i).getValue() + chaList.get(j).getValue());
chaList.remove(j);
for (int j = haveList.size() - 1; j > i; j--) {
if (haveList.get(j).getName().equals(haveList.get(i).getName())) {
haveList.get(i).setValue(haveList.get(i).getValue() + haveList.get(j).getValue());
haveList.remove(j);
}
}
}
haveList.addAll(chaList);
return haveList;
} else {
return mapper.provincecount(form);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论