|
@@ -3,6 +3,7 @@ package com.xhkjedu.sexam.controller.paperstudent;
|
3
|
3
|
import com.github.pagehelper.PageHelper;
|
4
|
4
|
import com.github.pagehelper.PageInfo;
|
5
|
5
|
import com.xhkjedu.sexam.model.paperstudent.EPsqbatch;
|
|
6
|
+import com.xhkjedu.sexam.model.paperstudent.EPsqbatchDetail;
|
6
|
7
|
import com.xhkjedu.sexam.service.paperstudent.EPsqbatchService;
|
7
|
8
|
import com.xhkjedu.utils.N_Utils;
|
8
|
9
|
import com.xhkjedu.utils.PageUtil;
|
|
@@ -18,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
|
18
|
19
|
import javax.annotation.Resource;
|
19
|
20
|
import java.util.List;
|
20
|
21
|
import java.util.Map;
|
|
22
|
+import java.util.TreeMap;
|
21
|
23
|
|
22
|
24
|
/**
|
23
|
25
|
* @Description 考试补录
|
|
@@ -50,13 +52,36 @@ public class EPsqbatchController {
|
50
|
52
|
try {
|
51
|
53
|
Integer page = ePsqbatch.getPage();
|
52
|
54
|
Integer pageSize = ePsqbatch.getPageSize();
|
53
|
|
- N_Utils.validation(new Object[]{ePsqbatch.getExamid(), "考试id", 1,page,"当前页",1,pageSize,"每页条数",1});
|
|
55
|
+ Integer examid= ePsqbatch.getExamid();
|
|
56
|
+ N_Utils.validation(new Object[]{examid, "考试id", 1,page,"当前页",1,pageSize,"每页条数",1});
|
54
|
57
|
PageHelper.startPage(page, pageSize);
|
55
|
|
- List<Map> rtnlst = ePsqbatchService.listPsqBatchsByExamid(ePsqbatch.getExamid());
|
|
58
|
+ List<Map> rtnlst = ePsqbatchService.listPsqBatchsByExamid(examid);
|
56
|
59
|
PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(rtnlst));
|
57
|
|
- return new ResultVo(0, "成功获取补录成绩信息",pageResult);
|
|
60
|
+ Map map = ePsqbatchService.getExamInfo(examid);
|
|
61
|
+ Map rtnmap = new TreeMap();
|
|
62
|
+ rtnmap.put("total",pageResult.getTotal());
|
|
63
|
+ rtnmap.put("list",pageResult.getList());
|
|
64
|
+ rtnmap.put("exam",map);
|
|
65
|
+ return new ResultVo(0, "成功获取补录成绩信息",rtnmap);
|
58
|
66
|
}catch (Exception e){
|
59
|
|
- log.error("获取获取补录成绩出错:" + e.getMessage());
|
|
67
|
+ log.error("获取获取补录成绩信息出错:" + e.getMessage());
|
|
68
|
+ return new ResultVo(0, "获取失败");
|
|
69
|
+ }
|
|
70
|
+ }
|
|
71
|
+
|
|
72
|
+ //补录成绩详情
|
|
73
|
+ @PostMapping("/detail")
|
|
74
|
+ public ResultVo listPsqBatchDetail(@RequestBody EPsqbatchDetail ePsqbatchDetail) {
|
|
75
|
+ try {
|
|
76
|
+ Integer page = ePsqbatchDetail.getPage();
|
|
77
|
+ Integer pageSize = ePsqbatchDetail.getPageSize();
|
|
78
|
+ N_Utils.validation(new Object[]{ePsqbatchDetail.getBatchid(), "补录批次id", 1,page,"当前页",1,pageSize,"每页条数",1});
|
|
79
|
+ PageHelper.startPage(page, pageSize);
|
|
80
|
+ List<Map> rtnlst = ePsqbatchService.listPsqBatchDetail(ePsqbatchDetail);
|
|
81
|
+ PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(rtnlst));
|
|
82
|
+ return new ResultVo(0, "成功获取补录成绩详细信息",pageResult);
|
|
83
|
+ }catch (Exception e){
|
|
84
|
+ log.error("获取获取补录成绩详细信息出错:" + e.getMessage());
|
60
|
85
|
return new ResultVo(0, "获取失败");
|
61
|
86
|
}
|
62
|
87
|
}
|