From 0e62c15e4b010ffa2d5cff9474f3fd389e369338 Mon Sep 17 00:00:00 2001
From: EricsHu <hrr145632>
Date: 星期五, 24 十一月 2023 14:31:46 +0800
Subject: [PATCH] 优化作业、考试、试卷、题库

---
 src/main/java/com/qxueyou/scc/controller/CourseScheduleController.java |   64 +++++++++++++++----------------
 1 files changed, 31 insertions(+), 33 deletions(-)

diff --git a/src/main/java/com/qxueyou/scc/controller/CourseScheduleController.java b/src/main/java/com/qxueyou/scc/controller/CourseScheduleController.java
index d1124c5..6d9ec39 100644
--- a/src/main/java/com/qxueyou/scc/controller/CourseScheduleController.java
+++ b/src/main/java/com/qxueyou/scc/controller/CourseScheduleController.java
@@ -7,10 +7,7 @@
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 
 import com.qxueyou.scc.admin.classes.model.ClsClass;
 import com.qxueyou.scc.admin.classroom.service.IClassRoomService;
@@ -27,16 +24,17 @@
 import io.swagger.annotations.ApiOperation;
 
 /**
- * 班级管理控制器
+ * 鐝骇绠$悊鎺у埗鍣�
  *
  * @author kevin
  */
-@Api(tags="课表接口")
+@Api(tags="璇捐〃鎺ュ彛")
 @Controller
+@CrossOrigin(origins="*",maxAge=3600)
 @RequestMapping("/admin/schedule")
 public class CourseScheduleController {
 	
-	// 分页查询中,默认记录条数和页数
+	// 鍒嗛〉鏌ヨ涓紝榛樿璁板綍鏉℃暟鍜岄〉鏁�
 	private static final int DEFAULT_PAGE_SIZE = 10;
 	private static final int DEFAULT_PAGE_NUM = 1;
 
@@ -47,16 +45,16 @@
     IClassRoomService classRoomService;
     
     /**
-	 * 课表列表
+	 * 璇捐〃鍒楄〃
 	 */
     @SuppressWarnings("unchecked")
-	@ApiOperation(value = "获取课表列表")
+	@ApiOperation(value = "鑾峰彇璇捐〃鍒楄〃")
 	@RequestMapping(value = "list", method = RequestMethod.GET)
 	public @ResponseBody Result list(String keyword,Short status,Integer pageSize,Integer pageNum) {
 		pageSize = pageSize != null && pageSize > 0 ? pageSize : DEFAULT_PAGE_SIZE;
 		pageNum = pageNum != null && pageNum > 0 ? pageNum : DEFAULT_PAGE_NUM;
 		
-		//总考试数量
+		//鎬昏�冭瘯鏁伴噺
 		int totalCount = scheduleService.listCount(keyword, status);
 		Pager pager = new Pager(pageSize,pageNum);
 		pager.setTotalCount(totalCount);
@@ -92,16 +90,16 @@
 	}
     
     /**
-  	 * 课表列表
+  	 * 璇捐〃鍒楄〃
      * @throws ParseException 
   	 */
-    @ApiOperation(value = "教师获取当天课表信息")
+    @ApiOperation(value = "鏁欏笀鑾峰彇褰撳ぉ璇捐〃淇℃伅")
   	@RequestMapping(value = "teacher/list", method = RequestMethod.GET)
   	public @ResponseBody Result teacherList(String date,Integer pageSize,Integer pageNum) throws Exception {
   		pageSize = pageSize != null && pageSize > 0 ? pageSize : DEFAULT_PAGE_SIZE;
   		pageNum = pageNum != null && pageNum > 0 ? pageNum : DEFAULT_PAGE_NUM;
   		
-  		//总考试数量
+  		//鎬昏�冭瘯鏁伴噺
   		int totalCount = scheduleService.listTeacherOfScheduleCount(date, pageSize, pageNum);
   		Pager pager = new Pager(pageSize,pageNum);
   		pager.setTotalCount(totalCount);
@@ -144,16 +142,16 @@
     
     
     /**
-  	 * 课表列表
+  	 * 璇捐〃鍒楄〃
      * @throws ParseException 
   	 */
-    @ApiOperation(value = "学生获取当天课表信息")
+    @ApiOperation(value = "瀛︾敓鑾峰彇褰撳ぉ璇捐〃淇℃伅")
   	@RequestMapping(value = "student/list", method = RequestMethod.GET)
   	public @ResponseBody Result studentList(String date,Integer pageSize,Integer pageNum) throws Exception {
   		pageSize = pageSize != null && pageSize > 0 ? pageSize : DEFAULT_PAGE_SIZE;
   		pageNum = pageNum != null && pageNum > 0 ? pageNum : DEFAULT_PAGE_NUM;
   		
-  		//总考试数量
+  		//鎬昏�冭瘯鏁伴噺
   		int totalCount = scheduleService.listStudentScheduleCount(date, pageSize, pageNum);
   		Pager pager = new Pager(pageSize,pageNum);
   		pager.setTotalCount(totalCount);
@@ -193,13 +191,13 @@
   	}
      
 	/**
-	 * 保存
+	 * 淇濆瓨
 	 * 
 	 * @param examInfo
 	 * @return
 	 * @throws Exception 
 	 */
-    @ApiOperation(value = "保存课表")
+    @ApiOperation(value = "淇濆瓨璇捐〃")
 	@RequestMapping(value = "/save", method = RequestMethod.POST)
 	public @ResponseBody Result save(@RequestBody CourseSchedule courseSchedule) throws Exception {
     	if (StringUtils.isEmpty(courseSchedule.getScheduleId())) {
@@ -212,13 +210,13 @@
 	}
 
 	/**
-	 * 删除
+	 * 鍒犻櫎
 	 * 
 	 * @param examIds
 	 * @return
 	 */
-	@ApiOperation(value = "删除课表", httpMethod = "GET")
-	@ApiImplicitParam(name = "scheduleIds", value = "课表ID字符串", required = true, dataType = "String", paramType = "body")
+	@ApiOperation(value = "鍒犻櫎璇捐〃", httpMethod = "GET")
+	@ApiImplicitParam(name = "scheduleIds", value = "璇捐〃ID瀛楃涓�", required = true, dataType = "String", paramType = "body")
 	@RequestMapping(value = "delete", method = RequestMethod.GET)
 	public @ResponseBody Result delete(String scheduleIds) {
 		Result result = new Result(true);
@@ -229,47 +227,47 @@
 	}
 	
 	/**
-	 * 发布课表
+	 * 鍙戝竷璇捐〃
 	 * 
 	 * @param scheduleIds
 	 * @return
 	 */
-	@ApiOperation(value = "发布课表")
+	@ApiOperation(value = "鍙戝竷璇捐〃")
 	@RequestMapping(value = "/publish", method = RequestMethod.GET)
 	public @ResponseBody Result publish(String scheduleIds) {
 		if (StringUtils.isEmpty(scheduleIds)) {
-			return new Result(false, "参数错误");
+			return new Result(false, "鍙傛暟閿欒");
 		}
 		return this.scheduleService.doRelease(scheduleIds.split(","));
 	}
 
 	/**
-	 * 撤回课表
+	 * 鎾ゅ洖璇捐〃
 	 * 
 	 * @param scheduleIds
 	 * @return
 	 */
-	@ApiOperation(value = "撤回课表")
+	@ApiOperation(value = "鎾ゅ洖璇捐〃")
 	@RequestMapping(value = "/cancel", method = RequestMethod.GET)
 	public @ResponseBody Result cancel(String scheduleIds) {
 		if (StringUtils.isEmpty(scheduleIds)) {
-			return new Result(false, "参数错误");
+			return new Result(false, "鍙傛暟閿欒");
 		}
 		
 		return this.scheduleService.doCancel(scheduleIds.split(","));
 	}
 	
 	/**
-	 * 课表详情
+	 * 璇捐〃璇︽儏
 	 * 
 	 * @param scheduleIds
 	 * @return
 	 */
-	@ApiOperation(value = "课表详情")
+	@ApiOperation(value = "璇捐〃璇︽儏")
 	@RequestMapping(value = "/detail", method = RequestMethod.GET)
 	public @ResponseBody Result detail(String scheduleId) {
 		if (StringUtils.isEmpty(scheduleId)) {
-			return new Result(false, "参数错误");
+			return new Result(false, "鍙傛暟閿欒");
 		}
 		
 		CourseSchedule sche =  this.scheduleService.detail(scheduleId);
@@ -300,16 +298,16 @@
 	}
 	
 	/**
-	 * 标记有课的日期
+	 * 鏍囪鏈夎鐨勬棩鏈�
 	 * 
 	 * @param scheduleIds
 	 * @return
 	 */
-	@ApiOperation(value = "教师课表是否有课标识查询")
+	@ApiOperation(value = "鏁欏笀璇捐〃鏄惁鏈夎鏍囪瘑鏌ヨ")
 	@RequestMapping(value = "teacher/flag", method = RequestMethod.GET)
 	public @ResponseBody Result listTeacherDateFlag(Integer year,Integer month) {
 		if (year==null || month==null) {
-			return new Result(false, "参数错误");
+			return new Result(false, "鍙傛暟閿欒");
 		}
 		
 		List<Integer> listResult =  this.scheduleService.queryDateFlag(year, month);

--
Gitblit v1.8.0