Browse Source

加入期末成绩导入

wangliang 1 year ago
parent
commit
5553b73eee

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ScoreNormalResult.java → distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ScoreResult.java

@@ -7,13 +7,13 @@ import io.swagger.annotations.ApiModelProperty;
 import java.io.Serializable;
 
 /**
- * @Description: 平常作业result
+ * @Description: 成绩result
  * @Param:
  * @return:
  * @Author: wangliang
  * @Date: 2024/2/19
  */
-public class ScoreNormalResult implements Serializable {
+public class ScoreResult implements Serializable {
 
     @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "id")

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCScoreNormalMapper.java

@@ -2,7 +2,7 @@ package com.qmth.distributed.print.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.qmth.distributed.print.business.bean.result.ScoreNormalResult;
+import com.qmth.distributed.print.business.bean.result.ScoreResult;
 import com.qmth.distributed.print.business.entity.TCScoreNormal;
 import org.apache.ibatis.annotations.Param;
 
@@ -27,5 +27,5 @@ public interface TCScoreNormalMapper extends BaseMapper<TCScoreNormal> {
      * @param courseCode
      * @return
      */
-    public IPage<ScoreNormalResult> scoreList(IPage<Map> iPage, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode);
+    public IPage<ScoreResult> scoreList(IPage<Map> iPage, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode);
 }

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCScoreNormalService.java

@@ -3,7 +3,7 @@ package com.qmth.distributed.print.business.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.excel.ExcelField;
-import com.qmth.distributed.print.business.bean.result.ScoreNormalResult;
+import com.qmth.distributed.print.business.bean.result.ScoreResult;
 import com.qmth.distributed.print.business.entity.TCScoreNormal;
 import com.qmth.teachcloud.mark.entity.MarkPaper;
 import org.springframework.web.multipart.MultipartFile;
@@ -31,7 +31,7 @@ public interface TCScoreNormalService extends IService<TCScoreNormal> {
      * @param courseCode
      * @return
      */
-    public IPage<ScoreNormalResult> scoreList(IPage<Map> iPage, Long semesterId, Long examId, String courseCode);
+    public IPage<ScoreResult> scoreList(IPage<Map> iPage, Long semesterId, Long examId, String courseCode);
 
     /**
      * 动态生成excel

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCScoreNormalServiceImpl.java

@@ -3,7 +3,7 @@ package com.qmth.distributed.print.business.service.impl;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.excel.ExcelField;
-import com.qmth.distributed.print.business.bean.result.ScoreNormalResult;
+import com.qmth.distributed.print.business.bean.result.ScoreResult;
 import com.qmth.distributed.print.business.entity.TCScoreNormal;
 import com.qmth.distributed.print.business.mapper.TCScoreNormalMapper;
 import com.qmth.distributed.print.business.service.TCScoreNormalService;
@@ -57,7 +57,7 @@ public class TCScoreNormalServiceImpl extends ServiceImpl<TCScoreNormalMapper, T
      * @return
      */
     @Override
-    public IPage<ScoreNormalResult> scoreList(IPage<Map> iPage, Long semesterId, Long examId, String courseCode) {
+    public IPage<ScoreResult> scoreList(IPage<Map> iPage, Long semesterId, Long examId, String courseCode) {
         return this.baseMapper.scoreList(iPage, semesterId, examId, courseCode);
     }
 

+ 1 - 1
distributed-print-business/src/main/resources/mapper/TCScoreNormalMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.distributed.print.business.mapper.TCScoreNormalMapper">
 
-    <select id="scoreList" resultType="com.qmth.distributed.print.business.bean.result.ScoreNormalResult">
+    <select id="scoreList" resultType="com.qmth.distributed.print.business.bean.result.ScoreResult">
         SELECT distinct t.id,
                  bs.id as semesterId,
                  t.exam_id as examId,

+ 6 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/TCScoreEndExamController.java

@@ -181,8 +181,12 @@ public class TCScoreEndExamController {
     @ApiOperation(value = "期末成绩列表")
     @RequestMapping(value = "/score/end_exam/list", method = RequestMethod.POST)
     @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.SEARCH)
-    @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
-    public Object scoreEndExamList(@ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+    @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = EditResult.class)})
+    public Object scoreEndExamList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+                                   @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                   @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
+                                   @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType,
+                                   @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                    @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) throws IOException {
         return ResultUtil.ok(true);
     }

+ 8 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/TCScoreNormalController.java

@@ -9,6 +9,7 @@ import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.boot.api.exception.ApiException;
 import com.qmth.distributed.print.business.bean.excel.ExcelField;
 import com.qmth.distributed.print.business.bean.result.EditResult;
+import com.qmth.distributed.print.business.bean.result.ScoreResult;
 import com.qmth.distributed.print.business.entity.TCScoreNormal;
 import com.qmth.distributed.print.business.service.TCScoreNormalService;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
@@ -59,7 +60,7 @@ public class TCScoreNormalController {
     @ApiOperation(value = "成绩管理列表")
     @RequestMapping(value = "/score/list", method = RequestMethod.POST)
     @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.SEARCH)
-    @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = Object.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
     public Object scoreList(@ApiParam(value = "学期ID", required = true) @RequestParam Long semesterId,
                             @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                             @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,
@@ -188,8 +189,12 @@ public class TCScoreNormalController {
     @ApiOperation(value = "平时成绩列表")
     @RequestMapping(value = "/score/normal/list", method = RequestMethod.POST)
     @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.SEARCH)
-    @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
-    public Object scoreNormalList(@ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+    @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = EditResult.class)})
+    public Object scoreNormalList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+                                  @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                  @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
+                                  @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType,
+                                  @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                   @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) throws IOException {
         return ResultUtil.ok(true);
     }

+ 2 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/TRBasicInfoController.java

@@ -2,6 +2,7 @@ package com.qmth.distributed.print.api;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.distributed.print.business.bean.result.ScoreResult;
 import com.qmth.distributed.print.business.service.TCScoreNormalService;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
@@ -34,7 +35,7 @@ public class TRBasicInfoController {
     @ApiOperation(value = "报告管理列表")
     @RequestMapping(value = "/report/list", method = RequestMethod.POST)
     @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.SEARCH)
-    @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = Object.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
     public Object reportList(@ApiParam(value = "学期ID", required = true) @RequestParam Long semesterId,
                              @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                              @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,