yujian
2019-01-22 88b54772dbcf5ecab1e2316e4e4626ac901b8908
fanli/src/main/java/com/yeshi/fanli/controller/admin/utils/AdminUtils.java
@@ -94,12 +94,14 @@
   
   
   public static List<Object> dayOrMonthDataFactory(List<String> listDate , List<Map<String, Object>> list) throws Exception {
   public static List<Object> dayOrMonthDataFactory(Integer dateType, List<String> listDate ,
         List<Map<String, Object>> list) throws Exception {
      List<Object> resultList = new ArrayList<Object>();
      
      if (list != null && list.size() > 0) {
         for (int i = 0; i < listDate.size(); i++) {
            Object showValue = null;
            if (list != null && list.size() > 0) {
               // 日期匹配赋值
@@ -107,15 +109,21 @@
                  Map<String, Object> map = list.get(j);
                  
                  String showDate = listDate.get(i);
                  Object reslutDate = map.get("showDate");
                  String month = reslutDate.toString();
                  if (dateType == 2 && Integer.parseInt(showDate) < 10 ) {
                     showDate = "0" + showDate;
                  }
                  
                  if (showDate.equalsIgnoreCase(month)) {
                  Object reslutDate = map.get("showDate");
                  String reslutTime = reslutDate.toString();
                  if (showDate.equalsIgnoreCase(reslutTime)) {
                     showValue = map.get("showValue");
                     break;
                  }
               }
            }
            
            if (showValue == null) {
               showValue = 0;
@@ -150,7 +158,7 @@
      innerList.put("name", "总计");
      if (dateType != 3) {
         innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateList, list)));
         innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
      } else {
         // 年视图
         Map<String, Object> map = yearsDataFactory(list);