|
@@ -172,6 +172,93 @@ public class ConsoleServiceImpl implements IConsoleService {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> getPeriodData(ConsoleQueryBo bo) {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
|
|
|
+ Long todZero = cal.getTimeInMillis() / 1000; //今天凌晨
|
|
|
+ cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
|
|
|
+ Long ytdZero = cal.getTimeInMillis() / 1000; //昨天凌晨
|
|
|
+ Calendar cal7 = new GregorianCalendar();
|
|
|
+ cal7.add(Calendar.DATE,-6); //7天内
|
|
|
+ cal7.set(cal7.get(Calendar.YEAR), cal7.get(Calendar.MONTH), cal7.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
|
|
|
+ Long sevenZero = cal7.getTimeInMillis() / 1000; //7日内凌晨
|
|
|
+
|
|
|
+ bo.setPeriodStatus(2);
|
|
|
+ Integer waitAllNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setPeriodStatus(null);
|
|
|
+ bo.setWaitStartTime(todZero);
|
|
|
+ bo.setWaitEndTime(DateUtils.getNowTime());
|
|
|
+ Integer waitTodNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setWaitStartTime(ytdZero);
|
|
|
+ bo.setWaitEndTime(todZero);
|
|
|
+ Integer waitYtdNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setWaitStartTime(sevenZero);
|
|
|
+ bo.setWaitEndTime(DateUtils.getNowTime());
|
|
|
+ Integer waitSevNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setWaitStartTime(null);
|
|
|
+ bo.setWaitEndTime(null);
|
|
|
+ bo.setPeriodStatus(3);
|
|
|
+ Integer ingAllNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setPeriodStatus(null);
|
|
|
+ bo.setStartTime(todZero);
|
|
|
+ bo.setEndTime(DateUtils.getNowTime());
|
|
|
+ Integer ingTodNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setStartTime(ytdZero);
|
|
|
+ bo.setEndTime(todZero);
|
|
|
+ Integer ingYtdNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+ bo.setStartTime(sevenZero);
|
|
|
+ bo.setEndTime(DateUtils.getNowTime());
|
|
|
+ Integer ingSevNum = iClassGradeService.getConsolePeriodNum(bo);
|
|
|
+
|
|
|
+ ConsoleQueryBo bo1 = new ConsoleQueryBo();
|
|
|
+ bo1.setBusinessId(bo.getBusinessId());
|
|
|
+ bo1.setInterfacePushId(0L);
|
|
|
+ Integer noInfoNum = iClassGradeService.getConsoleGradeAccountNum(bo1); //未配置报名接口班级
|
|
|
+ bo1.setInterfacePushId(1L);
|
|
|
+ Integer infoNum = iClassGradeService.getConsoleGradeAccountNum(bo1); //有配置报名接口班级
|
|
|
+ bo1.setInterfacePushId(null);
|
|
|
+ bo1.setInterfacePeriodId(0L);
|
|
|
+ Integer noPeriodNum = iClassGradeService.getConsoleGradeAccountNum(bo1); //未配置学时接口班级
|
|
|
+ bo1.setInterfacePeriodId(1L);
|
|
|
+ Integer periodNum = iClassGradeService.getConsoleGradeAccountNum(bo1); //有配置学时接口班级
|
|
|
+
|
|
|
+ ConsoleQueryBo bo2 = new ConsoleQueryBo();
|
|
|
+ bo2.setBusinessId(bo.getBusinessId());
|
|
|
+ bo2.setInterfacePushId(1L);
|
|
|
+ Integer applyUserNum = iClassGradeService.getConsoleGradeUserPeriodNum(bo2);
|
|
|
+ bo2.setOfficialStatus(1);
|
|
|
+ Integer applyPushUserNum = iClassGradeService.getConsoleGradeUserPeriodNum(bo2);
|
|
|
+
|
|
|
+ bo2.setInterfacePushId(null);
|
|
|
+ bo2.setOfficialStatus(null);
|
|
|
+ bo2.setPeriodStatus(1);
|
|
|
+ Integer periodUserNum = iClassGradeService.getConsoleGradeUserPeriodNum(bo2);
|
|
|
+ bo2.setPeriodPlush(1);
|
|
|
+ Integer periodPushUserNum = iClassGradeService.getConsoleGradeUserPeriodNum(bo2);
|
|
|
+
|
|
|
+ map.put("waitAllNum",waitAllNum);
|
|
|
+ map.put("waitTodNum",waitTodNum);
|
|
|
+ map.put("waitYtdNum",waitYtdNum);
|
|
|
+ map.put("waitSevNum",waitSevNum);
|
|
|
+ map.put("ingAllNum",ingAllNum);
|
|
|
+ map.put("ingTodNum",ingTodNum);
|
|
|
+ map.put("ingYtdNum",ingYtdNum);
|
|
|
+ map.put("ingSevNum",ingSevNum);
|
|
|
+
|
|
|
+ map.put("noInfoNum",noInfoNum);
|
|
|
+ map.put("infoNum",infoNum);
|
|
|
+ map.put("noPeriodNum",noPeriodNum);
|
|
|
+ map.put("periodNum",periodNum);
|
|
|
+
|
|
|
+ map.put("applyUserNum",applyUserNum);
|
|
|
+ map.put("applyPushUserNum",applyPushUserNum);
|
|
|
+ map.put("periodUserNum",periodUserNum);
|
|
|
+ map.put("periodPushUserNum",periodPushUserNum);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
private void countNum(Map<String, Object> map,String tag,List<OrderListVo> allList){
|
|
|
Integer allNum = allList.size();
|
|
|
map.put(tag+"Num",allNum);
|