|
@@ -10,6 +10,7 @@ import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
|
|
|
+import com.ym.mec.biz.service.ClassGroupService;
|
|
|
import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
import com.ym.mec.biz.service.SysConfigService;
|
|
|
import com.ym.mec.biz.service.SysMessageService;
|
|
@@ -20,6 +21,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
+
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -53,6 +55,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
private SysMessageService sysMessageService;
|
|
|
@Autowired
|
|
|
private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ClassGroupService classGroupService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, CourseSchedule> getDAO() {
|
|
@@ -512,15 +517,26 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
List<CourseSchedule> updateList = new ArrayList<CourseSchedule>();
|
|
|
Date date = new Date();
|
|
|
+ List<Integer> classGroups = new ArrayList<Integer>();
|
|
|
for (CourseSchedule courseSchedule : list) {
|
|
|
courseSchedule.setStatus(CourseStatusEnum.OVER);
|
|
|
courseSchedule.setUpdateTime(date);
|
|
|
updateList.add(courseSchedule);
|
|
|
+
|
|
|
+ if(!classGroups.contains(courseSchedule.getClassGroupId())){
|
|
|
+ classGroups.add(courseSchedule.getClassGroupId());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (updateList.size() > 0) {
|
|
|
courseScheduleDao.batchUpdate(updateList);
|
|
|
}
|
|
|
+
|
|
|
+ //更新班级课次
|
|
|
+ if(classGroups.size()>0){
|
|
|
+ classGroupService.batchIncreaseClassTimes(classGroups);
|
|
|
+ }
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|