|
|
@@ -52,11 +52,7 @@ import com.xjrsoft.module.courseTable.service.ICourseTableService;
|
|
|
import com.xjrsoft.module.courseTable.vo.ClassListVo;
|
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
|
-import com.xjrsoft.module.schedule.dto.ClassOptionDto;
|
|
|
-import com.xjrsoft.module.schedule.dto.CourseTableAdjustDto;
|
|
|
-import com.xjrsoft.module.schedule.dto.CourseTableDto;
|
|
|
-import com.xjrsoft.module.schedule.dto.CourseTableExportQueryDto;
|
|
|
-import com.xjrsoft.module.schedule.dto.ScheduleWeekExportQueryDto;
|
|
|
+import com.xjrsoft.module.schedule.dto.*;
|
|
|
import com.xjrsoft.module.schedule.entity.CourseTableBak;
|
|
|
import com.xjrsoft.module.schedule.entity.WfCourseAdjust;
|
|
|
import com.xjrsoft.module.schedule.mapper.CourseTableBakMapper;
|
|
|
@@ -336,6 +332,52 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 调课顶课查询
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<CourseListVo> getAdjustList1(String classId,String teacherId, String adjustDate,String timeNumber,String applicantTeacherId, String exchangeDate, String adjustType) {
|
|
|
+ CourseTableAdjustDto1 dto = new CourseTableAdjustDto1();
|
|
|
+ if (adjustDate != null && !"".equals(adjustDate)) {
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ LocalDate localDateTime = LocalDate.parse(adjustDate, formatter);
|
|
|
+ DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();
|
|
|
+ dto.setAdjustDate(adjustDate);
|
|
|
+ dto.setWeek(dayOfWeek.getValue());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (exchangeDate != null && !"".equals(exchangeDate)) {
|
|
|
+ dto.setExchangeDate(exchangeDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ dto.setTimeNumber(timeNumber);
|
|
|
+
|
|
|
+ if (applicantTeacherId != null && !"".equals(applicantTeacherId)) {
|
|
|
+ dto.setApplicantTeacherId(Long.parseLong(applicantTeacherId));
|
|
|
+ }
|
|
|
+
|
|
|
+ dto.setClassId(classId);
|
|
|
+ if (teacherId != null && !"".equals(teacherId)) {
|
|
|
+ dto.setTeacherId(Long.parseLong(teacherId));
|
|
|
+ }
|
|
|
+ dto.setAdjustType(adjustType);
|
|
|
+ //查询正在进行中或者已经完成
|
|
|
+ List<Long> courseIds = courseTableMapper.getExceptCourseIds(dto.getTeacherId());
|
|
|
+ dto.setExceptCourseList(courseIds);
|
|
|
+ List<CourseListVo> list = courseTableMapper.getAdjustList1(dto);
|
|
|
+ for (CourseListVo courseListVo : list) {
|
|
|
+ if (courseListVo.getTimePeriod() == 1) {
|
|
|
+ courseListVo.setTimePeriodCn("上午");
|
|
|
+ } else if (courseListVo.getTimePeriod() == 2) {
|
|
|
+ courseListVo.setTimePeriodCn("下午");
|
|
|
+ } else if (courseListVo.getTimePeriod() == 3) {
|
|
|
+ courseListVo.setTimePeriodCn("晚上");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public String getPreCheck(String preCheckType, String courseId, String swapCourseId, String swapDate, String subTeacherId) {
|
|
|
if (preCheckType != null && !"".equals(preCheckType)) {
|