Commit 1f0edb2d1d6c16491af851e3f89138f2f04aebc1

Authored by baohanddd
1 parent e095eb0e27

add statistics(map) common index (area data)

Showing 1 changed file with 47 additions and 47 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StatisticsController.java View file @ 1f0edb2
... ... @@ -685,53 +685,53 @@
685 685 groupRiskSeriesList.add(groupRiskSeries);
686 686 groupRiskOption.setSeries(groupRiskSeriesList);
687 687  
688   - for (String areaName:subMapsData.keySet()) {
689   - try {
690   - Option subGroupRiskOption = new Option();
691   - BeanUtils.copyProperties(groupRiskOption, subGroupRiskOption);
692   - groupRiskOptionMap.put(areaName, subGroupRiskOption);
693   - subGroupRiskOption.getTitle().setText(areaName + subGroupRiskOption.getTitle().getText());
694   - subGroupRiskOption.getyAxis().getData().clear();
695   - // 按MAP的value排序
696   - List<Map.Entry<String, Integer>> subListData = new ArrayList<Map.Entry<String, Integer>>(subMapsData.get(areaName).entrySet());
697   - Collections.sort(subListData, new Comparator<Map.Entry<String, Integer>>() {
698   - public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {
699   - if (o2.getValue() != null && o1.getValue() != null && o2.getValue().compareTo(o1.getValue()) > 0) {
700   - return -1;
701   - } else {
702   - return 1;
703   - }
704   - }
705   - });
706   -
707   - List<Object> subGroupRiskDataList = new ArrayList<>();
708   - n = listData.size();
709   - for (Map.Entry<String, Integer> entry:subListData) {
710   - n--;
711   - if (n>28) {
712   - continue;
713   - }
714   - subGroupRiskOption.getyAxis().getData().add(entry.getKey());
715   - if (riskColorMap.containsKey(entry.getKey())) {
716   - Data data = new Data();
717   - data.setValue(entry.getValue());
718   - data.setItemStyle(new ItemStyle(new Normal(true,riskColorMap.get(entry.getKey())),null));
719   - subGroupRiskDataList.add(data);
720   - } else {
721   - subGroupRiskDataList.add(entry.getValue());
722   - }
723   - }
724   -
725   - Series subgroupRiskSeries = new Series();
726   - subgroupRiskSeries.setName("高危人数");
727   - subgroupRiskSeries.setType("bar");
728   - subgroupRiskSeries.setData(subGroupRiskDataList);
729   - subGroupRiskOption.getSeries().clear();
730   - subGroupRiskOption.getSeries().add(subgroupRiskSeries);
731   - } catch (Exception e) {
732   - e.printStackTrace();
733   - }
734   - }
  688 +// for (String areaName:subMapsData.keySet()) {
  689 +// try {
  690 +// Option subGroupRiskOption = new Option();
  691 +// BeanUtils.copyProperties(groupRiskOption, subGroupRiskOption);
  692 +// groupRiskOptionMap.put(areaName, subGroupRiskOption);
  693 +// subGroupRiskOption.getTitle().setText(areaName + subGroupRiskOption.getTitle().getText());
  694 +// subGroupRiskOption.getyAxis().getData().clear();
  695 +// // 按MAP的value排序
  696 +// List<Map.Entry<String, Integer>> subListData = new ArrayList<Map.Entry<String, Integer>>(subMapsData.get(areaName).entrySet());
  697 +// Collections.sort(subListData, new Comparator<Map.Entry<String, Integer>>() {
  698 +// public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {
  699 +// if (o2.getValue() != null && o1.getValue() != null && o2.getValue().compareTo(o1.getValue()) > 0) {
  700 +// return -1;
  701 +// } else {
  702 +// return 1;
  703 +// }
  704 +// }
  705 +// });
  706 +//
  707 +// List<Object> subGroupRiskDataList = new ArrayList<>();
  708 +// n = listData.size();
  709 +// for (Map.Entry<String, Integer> entry:subListData) {
  710 +// n--;
  711 +// if (n>28) {
  712 +// continue;
  713 +// }
  714 +// subGroupRiskOption.getyAxis().getData().add(entry.getKey());
  715 +// if (riskColorMap.containsKey(entry.getKey())) {
  716 +// Data data = new Data();
  717 +// data.setValue(entry.getValue());
  718 +// data.setItemStyle(new ItemStyle(new Normal(true,riskColorMap.get(entry.getKey())),null));
  719 +// subGroupRiskDataList.add(data);
  720 +// } else {
  721 +// subGroupRiskDataList.add(entry.getValue());
  722 +// }
  723 +// }
  724 +//
  725 +// Series subgroupRiskSeries = new Series();
  726 +// subgroupRiskSeries.setName("高危人数");
  727 +// subgroupRiskSeries.setType("bar");
  728 +// subgroupRiskSeries.setData(subGroupRiskDataList);
  729 +// subGroupRiskOption.getSeries().clear();
  730 +// subGroupRiskOption.getSeries().add(subgroupRiskSeries);
  731 +// } catch (Exception e) {
  732 +// e.printStackTrace();
  733 +// }
  734 +// }
735 735  
736 736  
737 737 Map<String, Map<String, Integer>> patientMonthMap = new HashMap<>();