| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "成绩管理接口") |
| | | @Api(tags = "成绩管理接口") |
| | | @Controller |
| | | @CrossOrigin(origins="*",maxAge=3600) |
| | | @RequestMapping(value = "admin/score") |
| | | public class ScoreController { |
| | | |
| | | // 分页查询中,默认记录条数和页数 |
| | | // 分页查询中,默认记录条数和页数 |
| | | private static final int DEFAULT_PAGE_SIZE = 10; |
| | | private static final int DEFAULT_PAGE_NUM = 1; |
| | | |
| | |
| | | pageNum = pageNum != null && pageNum > 0 ? pageNum : DEFAULT_PAGE_NUM; |
| | | Pager pager = new Pager(pageSize,pageNum); |
| | | if(classId == null){ |
| | | classId = "%"; |
| | | classId = ""; |
| | | }else { |
| | | classId += "%"; |
| | | } |
| | | List<Map<String,Object>> mapList = new ArrayList<>(); |
| | | List<ExamResultV> examResultVS = scoreService.allExamResultV(classId); |
| | | List<ExerciseResultV> exerciseResultVS = scoreService.allExerciseResultV(classId); |
| | | //总成绩数量 |
| | | //总成绩数量 |
| | | int totalCount = scoreService.findCount("from ExamResultV where class_Id Like ? and score != null and score != 0",CollectionUtils.newList(classId)); |
| | | if (examResultVS.size() < exerciseResultVS.size()){ |
| | | totalCount = exerciseResultVS.size(); |