|
@@ -1,15 +1,20 @@
|
|
package com.ym.mec.biz.service.impl;
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
import com.ym.mec.biz.dal.dao.TeacherLeaveRecordDao;
|
|
import com.ym.mec.biz.dal.dao.TeacherLeaveRecordDao;
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
|
+import com.ym.mec.biz.dal.entity.Teacher;
|
|
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
|
|
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
|
|
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord.CoursesScheduleHistory;
|
|
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord.CoursesScheduleHistory;
|
|
import com.ym.mec.biz.dal.enums.AuditStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.AuditStatusEnum;
|
|
|
|
+import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
import com.ym.mec.biz.service.CourseScheduleService;
|
|
import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
|
+import com.ym.mec.biz.service.SysMessageService;
|
|
import com.ym.mec.biz.service.TeacherLeaveRecordService;
|
|
import com.ym.mec.biz.service.TeacherLeaveRecordService;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.exception.BizException;
|
|
import com.ym.mec.common.exception.BizException;
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
|
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import com.ym.mec.util.json.JsonUtil;
|
|
import com.ym.mec.util.json.JsonUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -19,10 +24,7 @@ import org.springframework.transaction.annotation.Propagation;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Date;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@@ -30,10 +32,15 @@ public class TeacherLeaveRecordServiceImpl extends BaseServiceImpl<Long, Teacher
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private TeacherLeaveRecordDao teacherLeaveRecordDao;
|
|
private TeacherLeaveRecordDao teacherLeaveRecordDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private TeacherDao teacherDao;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private CourseScheduleService courseScheduleService;
|
|
private CourseScheduleService courseScheduleService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysMessageService sysMessageService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public BaseDAO<Long, TeacherLeaveRecord> getDAO() {
|
|
public BaseDAO<Long, TeacherLeaveRecord> getDAO() {
|
|
return teacherLeaveRecordDao;
|
|
return teacherLeaveRecordDao;
|
|
@@ -110,7 +117,12 @@ public class TeacherLeaveRecordServiceImpl extends BaseServiceImpl<Long, Teacher
|
|
courseScheduleService.classStartDateAdjust(list);
|
|
courseScheduleService.classStartDateAdjust(list);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //教师请假结果通知
|
|
|
|
+ Map<Integer,String> map = new HashMap<>(1);
|
|
|
|
+ Teacher teacher = teacherDao.get(teacherLeaveRecord.getUserId());
|
|
|
|
+ map.put(teacher.getId(),teacher.getPhone());
|
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI, MessageTypeEnum.TEACHER_PUSH_LEAVE_RESULT,
|
|
|
|
+ map,null,0,"",status.getCode());
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|