|
@@ -9,7 +9,6 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
import com.alibaba.excel.ExcelWriter;
|
|
import com.alibaba.excel.ExcelWriter;
|
|
|
-import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
|
|
import com.alibaba.excel.write.metadata.WriteTable;
|
|
import com.alibaba.excel.write.metadata.WriteTable;
|
|
|
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
|
|
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
|
|
|
import com.alibaba.excel.write.metadata.style.WriteFont;
|
|
import com.alibaba.excel.write.metadata.style.WriteFont;
|
|
@@ -53,13 +52,11 @@ import com.xjrsoft.module.schedule.vo.CourseDetailVo;
|
|
|
import com.xjrsoft.module.schedule.vo.CourseListVo;
|
|
import com.xjrsoft.module.schedule.vo.CourseListVo;
|
|
|
import com.xjrsoft.module.schedule.vo.CourseTableVo;
|
|
import com.xjrsoft.module.schedule.vo.CourseTableVo;
|
|
|
import com.xjrsoft.module.schedule.vo.ScheduleWeekExportQueryVo;
|
|
import com.xjrsoft.module.schedule.vo.ScheduleWeekExportQueryVo;
|
|
|
|
|
+import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
|
|
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
|
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.teacher.service.ITeacherbaseManagerService;
|
|
import com.xjrsoft.module.teacher.service.ITeacherbaseManagerService;
|
|
|
-import com.xjrsoft.module.textbook.entity.SubjectGroupCourse;
|
|
|
|
|
-import com.xjrsoft.module.textbook.vo.TextbookClaimExportQueryVo;
|
|
|
|
|
-import com.xjrsoft.module.textbook.vo.TextbookIssueRecordExcelVo;
|
|
|
|
|
-import io.swagger.models.auth.In;
|
|
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
|
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
|
@@ -70,7 +67,6 @@ import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
|
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
|
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
|
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
|
|
-import org.checkerframework.checker.units.qual.C;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -84,7 +80,11 @@ import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
import java.time.ZoneId;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.*;
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.Collections;
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -111,7 +111,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
|
|
|
|
|
private final ClassTimeMapper classTimeMapper;
|
|
private final ClassTimeMapper classTimeMapper;
|
|
|
private final BaseSemesterMapper baseSemesterMapper;
|
|
private final BaseSemesterMapper baseSemesterMapper;
|
|
|
-
|
|
|
|
|
|
|
+ private final IBaseStudentSchoolRollService baseStudentSchoolRollService;
|
|
|
private final CourseTableBakMapper courseTableBakMapper;
|
|
private final CourseTableBakMapper courseTableBakMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -251,7 +251,17 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(dto.getStartDate() != null && dto.getEndDate() != null){
|
|
if(dto.getStartDate() != null && dto.getEndDate() != null){
|
|
|
- dto.setTeacherId(StpUtil.getLoginIdAsLong());
|
|
|
|
|
|
|
+ if(dto.getStudentId() == null){
|
|
|
|
|
+ dto.setTeacherId(StpUtil.getLoginIdAsLong());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ List<BaseStudentSchoolRoll> schoolRolls = baseStudentSchoolRollService.list(
|
|
|
|
|
+ new QueryWrapper<BaseStudentSchoolRoll>().lambda().eq(BaseStudentSchoolRoll::getUserId, dto.getStudentId())
|
|
|
|
|
+ );
|
|
|
|
|
+ if(schoolRolls != null && !schoolRolls.isEmpty()){
|
|
|
|
|
+ dto.setCourseType("class");
|
|
|
|
|
+ dto.setClassId(schoolRolls.get(0).getClassId());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
List<CourseDetailVo> list = courseTableMapper.getList(dto);
|
|
List<CourseDetailVo> list = courseTableMapper.getList(dto);
|
|
|
tableVo.setCourseList(list);
|
|
tableVo.setCourseList(list);
|