update
This commit is contained in:
parent
a7295537b6
commit
c15912c3cb
|
@ -175,7 +175,7 @@ public class ApiStatisticsContactController extends ApiBaseController {
|
|||
countList.add(activityCount);
|
||||
}
|
||||
}
|
||||
Dict dict = Dict.create().set("monthList", DateUtils.getMonthStrList()).set("count", countList);
|
||||
Dict dict = Dict.create().set("monthList", DateUtils.getMonthStrList()).set("countList", countList);
|
||||
render(Ret.ok().data(dict));
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ public class ApiStatisticsOfficeController extends ApiBaseController {
|
|||
//默认当前年
|
||||
Date date = DateUtil.date();
|
||||
String year = Convert.toStr(DateUtil.year(date));
|
||||
String month = Convert.toStr(DateUtil.month(date));
|
||||
String month = DateUtils.getCurrentMonth();
|
||||
String yearMonth = year + "-" + month;
|
||||
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
|
|
|
@ -257,4 +257,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||
return monthList;
|
||||
}
|
||||
|
||||
public static String getCurrentMonth() {
|
||||
String monthStr;
|
||||
Calendar cal = Calendar.getInstance();
|
||||
int month = cal.get(Calendar.MONTH) + 1;
|
||||
if (month < 10) {
|
||||
monthStr = "0" + month;
|
||||
} else {
|
||||
monthStr = month + "";
|
||||
}
|
||||
return monthStr;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue