|
@@ -269,14 +269,17 @@ public class FrontStudentController extends BaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Integer preDay = 0; // 同月的排队计划开始之前的 历史月不好计算,待定 TODO MF
|
|
Integer preDay = 0; // 同月的排队计划开始之前的 历史月不好计算,待定 TODO MF
|
|
|
- if(DateUtils.isSameDay(DateUtils.truncate(cond.getReportDate(), Calendar.MONTH), DateUtils.truncate(curr.getFirstTime(), Calendar.MONTH))) {
|
|
|
|
|
|
|
+ Date month = DateUtils.truncate(cond.getReportDate(), Calendar.MONTH);
|
|
|
|
|
+ if(DateUtils.isSameDay(month, DateUtils.truncate(curr.getFirstTime(), Calendar.MONTH))) {
|
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
|
cal.setTime(curr.getFirstTime());
|
|
cal.setTime(curr.getFirstTime());
|
|
|
preDay = cal.get(Calendar.DAY_OF_MONTH) - 1;
|
|
preDay = cal.get(Calendar.DAY_OF_MONTH) - 1;
|
|
|
}
|
|
}
|
|
|
JSONObject stats = new JSONObject();
|
|
JSONObject stats = new JSONObject();
|
|
|
|
|
+ stats.put("firstDay", DateUtil.format(curr.getFirstTime(), "yyyy-MM-dd"));
|
|
|
|
|
+ stats.put("preDay", preDay);
|
|
|
stats.put("doneDay", doneDay);
|
|
stats.put("doneDay", doneDay);
|
|
|
- stats.put("undoneDay", LocalDateTimeUtil.of(cond.getReportDate()).getDayOfMonth() - doneDay - preDay);
|
|
|
|
|
|
|
+ stats.put("undoneDay", LocalDateTimeUtil.of(DateUtils.addDays(DateUtils.addMonths(month, 1), -1)).getDayOfMonth() - doneDay - preDay);
|
|
|
stats.put("videoTimes", videoTimes);
|
|
stats.put("videoTimes", videoTimes);
|
|
|
stats.put("questionCnt", questionCnt);
|
|
stats.put("questionCnt", questionCnt);
|
|
|
stats.put("studyList", monthStudyList);
|
|
stats.put("studyList", monthStudyList);
|