Jelajahi Sumber

1、服务指标;
2、增加课外训练待布置学员列表;
3、网管课续费提醒;

Joburgess 5 tahun lalu
induk
melakukan
a8d100e885

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -30,6 +30,7 @@ import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.json.JsonUtil;
 import org.apache.commons.collections.ListUtils;
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -3607,6 +3608,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(courseGenerateInfo.getCourseCreateStartTime());
 
+        if(Objects.isNull(courseGenerateInfo.getCourseCount())||courseGenerateInfo.getCourseCount()<=0){
+        	throw new BizException("可排课次数不足");
+		}
+
         Set<String> holidayDays = new HashSet<>();
 
 		if (courseGenerateInfo.isSkipHoliday()) {

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1737,6 +1737,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			StudentPauseInfo studentPauseInfo1 = studentPauseInfos.stream().min(Comparator.comparing(StudentPauseInfo::getSurplusCourseNum)).get();
 			Map<String, Object> courseInfo1 = JSON.parseObject(studentPauseInfo1.getCoursesJson(), Map.class);
 			Integer[] teachModeSequence1=JSON.parseArray(courseInfo1.get("teaChModeSequence").toString(), Integer.class).stream().toArray(Integer[]::new);
+			if(teachModeSequence1.length<=0){
+				throw new BizException("此学员无剩余课时");
+			}
 			studentRecoverInfo.setCourseCount(teachModeSequence1.length);
 			List<CourseSchedule> newCourseSchedules = courseScheduleService.createCourses(studentRecoverInfo,false);
 			for(int i=0;i<newCourseSchedules.size();i++){