|
|
@@ -396,6 +396,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
}
|
|
|
DaySectionVo daySectionVo = new DaySectionVo();
|
|
|
daySectionVo.setGoodsId(aLong);
|
|
|
+ //小于学习节数,直接加上剩余学习节数
|
|
|
if (allNum < Sec) {
|
|
|
daySectionVo.setStudyGoodsKnob(Convert.toLong(allNum));
|
|
|
} else{
|
|
|
@@ -489,7 +490,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
c1.set(Calendar.DAY_OF_MONTH, c1.getActualMaximum(Calendar.DAY_OF_MONTH));
|
|
|
System.out.println(c.getTimeInMillis());
|
|
|
System.out.println(c1.getTimeInMillis());
|
|
|
-
|
|
|
+ //获得学习范围的日历
|
|
|
List<CalendarStudyVo> clCalendarStudyVos = findDates(c.getTimeInMillis()/1000,c1.getTimeInMillis()/1000);
|
|
|
Long secAll = 0L;
|
|
|
for (Long aLong : bo.getGoodsId()) {
|
|
|
@@ -500,6 +501,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
if (dutyDays < 1){
|
|
|
throw new IllegalArgumentException("没有学习天数,请认真填写开始结束时间");
|
|
|
}
|
|
|
+ //查询商品每个课程得总节数
|
|
|
List<Long> seLongs = baseMapper.selectGoods(aLong);
|
|
|
Long allNum = 0L;
|
|
|
for (Long seLong : seLongs) {
|
|
|
@@ -515,6 +517,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
break;
|
|
|
}
|
|
|
Calendar c5 = Calendar.getInstance();
|
|
|
+ //给大于等于今天的天数赋值学习节数,小于直接跳出循环
|
|
|
if (dayStudyVo.getDate() < c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))){
|
|
|
continue;
|
|
|
}
|
|
|
@@ -540,6 +543,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
}
|
|
|
DaySectionVo daySectionVo = new DaySectionVo();
|
|
|
daySectionVo.setGoodsId(aLong);
|
|
|
+ //小于学习节数,直接加上剩余的学习节数
|
|
|
if (allNum < Sec) {
|
|
|
daySectionVo.setStudyGoodsKnob(Convert.toLong(allNum));
|
|
|
} else{
|