Commit bb9b708a2361f53a4e1a08dd97a555e221209392

Authored by liquanyu
1 parent 0d51683888

update

Showing 1 changed file with 7 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyStatisticsManagerFacade.java View file @ bb9b708
... ... @@ -924,9 +924,12 @@
924 924 }
925 925 }
926 926 }
927   - System.out.println(nocheckCount +" === "+ total);
928 927 babyCount.add(nocheckCount);
929   - percent.add(percent(nocheckCount,total));
  928 + if (total != null && total != 0)
  929 + {
  930 + percent.add(percent(nocheckCount,total));
  931 + }
  932 +
930 933 babyStatisticsManagerSelfConversionListResult.setResult(result);
931 934 babyStatisticsManagerSelfConversionListResult.setResultOther(resultOther);
932 935 babyStatisticsManagerSelfConversionListResult.setBabyCount(babyCount);
933 936  
... ... @@ -937,9 +940,10 @@
937 940 return babyStatisticsManagerSelfConversionListResult;
938 941 }
939 942  
940   - private String percent(Integer count,Integer total)
  943 + private String percent(Integer count,Integer total)
941 944 {
942 945 return new BigDecimal((double) count * 100 / (double) total).setScale(2, BigDecimal.ROUND_HALF_UP) + "%";
943 946 }
  947 +
944 948 }