Commit 81c3a68c503be78e0c0b3145381bbdd897191846
1 parent
614de6e412
Exists in
master
and in
6 other branches
高危评分
Showing 1 changed file with 38 additions and 31 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyStatisticsManagerFacade.java
View file @
81c3a68
| ... | ... | @@ -834,12 +834,12 @@ |
| 834 | 834 | }); |
| 835 | 835 | |
| 836 | 836 | // 检查人数 |
| 837 | - List<Integer> result = new ArrayList<>(); | |
| 837 | + List<Integer> temp = new ArrayList<>(); | |
| 838 | 838 | Integer total = 0; |
| 839 | 839 | ExceptionUtils.catchException("babyStatisticsManagerSelfConversionList list result :" + list); |
| 840 | 840 | // 从0开始,没有也填充 |
| 841 | 841 | int index = 0; |
| 842 | - for (Integer i = 0; i < 13; i++) { | |
| 842 | + for (Integer i = 0; i < 37; i++) { | |
| 843 | 843 | try { |
| 844 | 844 | while (!i.toString().equals(list.get(index).get("EXAMINE_MONTH").toString()) && i > Integer.valueOf(list.get(index).get("EXAMINE_MONTH").toString())) { |
| 845 | 845 | index++; |
| 846 | 846 | |
| 847 | 847 | |
| 848 | 848 | |
| 849 | 849 | |
| 850 | 850 | |
| 851 | 851 | |
| ... | ... | @@ -848,48 +848,55 @@ |
| 848 | 848 | index++; |
| 849 | 849 | } |
| 850 | 850 | if (CollectionUtils.isEmpty(list) || list.size() < index) { |
| 851 | - result.add(0); | |
| 851 | + temp.add(0); | |
| 852 | 852 | } else if (list.size() < index && (list.get(index) == null || !i.toString().equals(list.get(index).get("EXAMINE_MONTH").toString()))) { |
| 853 | - result.add(0); | |
| 853 | + temp.add(0); | |
| 854 | 854 | } else { |
| 855 | 855 | try { |
| 856 | - result.add(Integer.valueOf(list.get(index).get("CNT").toString())); | |
| 856 | + temp.add(Integer.valueOf(list.get(index).get("CNT").toString())); | |
| 857 | 857 | total += Integer.valueOf(list.get(index).get("CNT").toString()); |
| 858 | 858 | index++; |
| 859 | 859 | } catch (Exception e) { |
| 860 | - result.add(0); | |
| 860 | + temp.add(0); | |
| 861 | 861 | index++; |
| 862 | 862 | } |
| 863 | 863 | } |
| 864 | 864 | } |
| 865 | 865 | |
| 866 | - Integer check18 = 0; | |
| 867 | - Integer check24 = 0; | |
| 868 | - Integer check30 = 0; | |
| 869 | - Integer check36 = 0; | |
| 870 | - for (Map<String, Object> other : list) { | |
| 871 | - if (null != other.get("EXAMINE_MONTH") && "18".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 872 | - check18 = Integer.valueOf(other.get("CNT").toString()); | |
| 873 | - } | |
| 874 | - if (null != other.get("EXAMINE_MONTH") && "24".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 875 | - check24 = Integer.valueOf(other.get("CNT").toString()); | |
| 876 | - } | |
| 877 | - if (null != other.get("EXAMINE_MONTH") && "30".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 878 | - check30 = Integer.valueOf(other.get("CNT").toString()); | |
| 879 | - } | |
| 880 | - if (null != other.get("EXAMINE_MONTH") && "36".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 881 | - check36 = Integer.valueOf(other.get("CNT").toString()); | |
| 882 | - } | |
| 883 | - } | |
| 884 | - result.add(check18); | |
| 885 | - result.add(check24); | |
| 886 | - result.add(check30); | |
| 887 | - result.add(check36); | |
| 866 | + // Integer check18 = 0; | |
| 867 | + // Integer check24 = 0; | |
| 868 | + // Integer check30 = 0; | |
| 869 | + // Integer check36 = 0; | |
| 870 | + // for (Map<String, Object> other : list) { | |
| 871 | + // if (null != other.get("EXAMINE_MONTH") && "18".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 872 | + // check18 = Integer.valueOf(other.get("CNT").toString()); | |
| 873 | + // } | |
| 874 | + // if (null != other.get("EXAMINE_MONTH") && "24".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 875 | + // check24 = Integer.valueOf(other.get("CNT").toString()); | |
| 876 | + // } | |
| 877 | + // if (null != other.get("EXAMINE_MONTH") && "30".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 878 | + // check30 = Integer.valueOf(other.get("CNT").toString()); | |
| 879 | + // } | |
| 880 | + // if (null != other.get("EXAMINE_MONTH") && "36".equals(other.get("EXAMINE_MONTH").toString())) { | |
| 881 | + // check36 = Integer.valueOf(other.get("CNT").toString()); | |
| 882 | + // } | |
| 883 | + // } | |
| 884 | + // result.add(check18); | |
| 885 | + // result.add(check24); | |
| 886 | + // result.add(check30); | |
| 887 | + // result.add(check36); | |
| 888 | 888 | |
| 889 | - for (int i = 1; i < result.size(); i++) { | |
| 890 | - result.set(i, result.get(i) + result.get(i - 1)); | |
| 889 | + for (int i = 1; i < temp.size(); i++) { | |
| 890 | + temp.set(i, temp.get(i) + temp.get(i - 1)); | |
| 891 | 891 | } |
| 892 | - result.remove(0); | |
| 892 | + temp.remove(0); | |
| 893 | + | |
| 894 | + List<Integer> result = new ArrayList<>(); | |
| 895 | + result.addAll(temp.subList(0,12)); | |
| 896 | + result.add(temp.get(18)); | |
| 897 | + result.add(temp.get(24)); | |
| 898 | + result.add(temp.get(30)); | |
| 899 | + result.add(temp.get(36)); | |
| 893 | 900 | |
| 894 | 901 | // 未检查人数 |
| 895 | 902 | List<Integer> resultOther = new ArrayList<>(); |