|
|
@@ -5,6 +5,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.db.Db;
|
|
|
+import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.google.gson.JsonArray;
|
|
|
import com.google.gson.JsonObject;
|
|
|
@@ -19,6 +20,7 @@ import com.xjrsoft.module.courseTable.service.ICourseTableService;
|
|
|
import com.xjrsoft.module.schedule.dto.CourseTableAdjustDto;
|
|
|
import com.xjrsoft.module.schedule.dto.CourseTableDto;
|
|
|
import com.xjrsoft.module.schedule.dto.CourseTablePreCheckDto;
|
|
|
+import com.xjrsoft.module.schedule.dto.ScheduleWeekExportQueryDto;
|
|
|
import com.xjrsoft.module.schedule.entity.CourseReceiveMsg;
|
|
|
import com.xjrsoft.module.schedule.entity.JianyueData;
|
|
|
import com.xjrsoft.module.schedule.service.ICourseReceiveMsgService;
|
|
|
@@ -31,16 +33,17 @@ import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
import com.xjrsoft.module.student.service.impl.IBaseStudentSchoolRollService;
|
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
import com.xjrsoft.module.teacher.service.IBaseTeacherService;
|
|
|
+import com.xjrsoft.module.textbook.dto.TextbookClaimExportQueryDto;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.sql.DataSource;
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.io.ByteArrayOutputStream;
|
|
|
import java.sql.SQLException;
|
|
|
import java.time.DayOfWeek;
|
|
|
import java.time.LocalDateTime;
|
|
|
@@ -231,4 +234,14 @@ public class ScheduleController {
|
|
|
|
|
|
return jsonParser.parse(result).getAsJsonObject();
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/schedule-week-export-query")
|
|
|
+ @ApiOperation(value = "按周导出课表")
|
|
|
+ public ResponseEntity<byte[]> scheduleWeekExportQuery(@Valid @RequestBody ScheduleWeekExportQueryDto dto) {
|
|
|
+// @GetMapping("/schedule-week-export-query")
|
|
|
+// @ApiOperation(value = "按周导出课表")
|
|
|
+// public ResponseEntity<byte[]> textbookClaimExportQuery(@Valid ScheduleWeekExportQueryDto dto) {
|
|
|
+ ByteArrayOutputStream bot = courseTableService.listScheduleWeekExportQuery(dto);
|
|
|
+ return RT.fileStream(bot.toByteArray(), "scheduleWeek" + ExcelTypeEnum.XLSX.getValue());
|
|
|
+ }
|
|
|
}
|