|
@@ -2,18 +2,13 @@ package com.qmth.teachcloud.report.business.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.google.common.reflect.TypeToken;
|
|
|
-import com.google.gson.Gson;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.entity.SysUser;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.teachcloud.common.service.SysOrgService;
|
|
|
import com.qmth.teachcloud.common.util.ExcelUtil;
|
|
|
-import com.qmth.teachcloud.common.util.JacksonUtil;
|
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
|
-import com.qmth.teachcloud.report.business.bean.dto.excel.TAExamCourseExportDto;
|
|
|
import com.qmth.teachcloud.report.business.bean.result.*;
|
|
|
import com.qmth.teachcloud.report.business.entity.TAExamCourse;
|
|
|
import com.qmth.teachcloud.report.business.entity.TAExamCourseRecord;
|
|
@@ -119,18 +114,23 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
|
|
|
@Override
|
|
|
public GradeDistributeFinalResult getGradeDistribute(SemesterEnum semester, Long examId, String courseCode) {
|
|
|
-// Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
+ Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- Long schoolId = sysUser.getSchoolId();
|
|
|
+// Long schoolId = sysUser.getSchoolId();
|
|
|
//取总体和应届平均分
|
|
|
SurveyTeacherExamCourseResult surveyTeacherExamCourseResult = reportCommonService.findAvgScore(schoolId, courseCode, examId);
|
|
|
//学院学科报表科目描述
|
|
|
- List<GradeDistributeResult> gradeDistributeResultList = new ArrayList<>();
|
|
|
+ List<GradeDistributeResult> gradeDistributeResultList = new ArrayList<>();//全体卷面成绩
|
|
|
+ List<GradeDistributePaperResult> gradeDistributePaperResultList = new ArrayList<>();//全体赋分成绩
|
|
|
+ List<GradeDistributeCurrentAssignedResult> gradeDistributeCurrentAssignedResultList = new ArrayList<>();//应届赋分成绩
|
|
|
List<SurveyTeacherGradeDistributionResult> surveyTeacherGradeDistributionResultList = reportCommonService.surveyTeacherDistribution(examId, courseCode, sysUser.getOrgId());
|
|
|
for (SurveyTeacherGradeDistributionResult s : surveyTeacherGradeDistributionResultList) {
|
|
|
- gradeDistributeResultList.add(new GradeDistributeResult(String.join(",", s.getDescribe()), s.getAllCountRateAfter(), s.getAllCountAfter(), s.getCurrentCountAfter(), s.getCurrentCountRateAfter()));
|
|
|
+ String describe = String.join(",", s.getDescribe());
|
|
|
+ gradeDistributeResultList.add(new GradeDistributeResult(describe, s.getAllCountRateAfter(), s.getAllCountAfter(), s.getCurrentCountAfter(), s.getCurrentCountRateAfter()));
|
|
|
+ gradeDistributePaperResultList.add(new GradeDistributePaperResult(describe, s.getAllCountRateBefore(), s.getAllCountBefore()));
|
|
|
+ gradeDistributeCurrentAssignedResultList.add(new GradeDistributeCurrentAssignedResult(describe, s.getCurrentCountRateAfter(), s.getCurrentCountAfter()));
|
|
|
}
|
|
|
- return new GradeDistributeFinalResult(surveyTeacherExamCourseResult, gradeDistributeResultList);
|
|
|
+ return new GradeDistributeFinalResult(surveyTeacherExamCourseResult, gradeDistributeResultList, gradeDistributePaperResultList, gradeDistributeCurrentAssignedResultList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -340,14 +340,13 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
*/
|
|
|
@Override
|
|
|
public void courseExport(Long examId, SemesterEnum semester, Long schoolId, String courseCode) throws Exception {
|
|
|
- SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
//成绩对比明细
|
|
|
IPage<TeachCollegeResult> teachCollegeResultIPage = tbExamStudentService.listTeachCollegeResult(Objects.nonNull(semester) ? semester.name() : null, examId, courseCode, null, null, null, null, SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, null, null);
|
|
|
//全校赋分分数段
|
|
|
GradeDistributeFinalResult gradeDistributeFinalResult = taExamCourseService.getGradeDistribute(semester, examId, courseCode);
|
|
|
List<String> sheetList = Arrays.asList("成绩对比明细", "全校卷面分数段", "全校赋分分数段(全部)", "全校赋分分数段(应届)", "各课堂应届生卷面非零平均成绩及排名");
|
|
|
- List<Class<?>> classList = Arrays.asList(TeachCollegeResult.class, GradeDistributeResult.class);
|
|
|
- List<Collection<?>> collectionList = Arrays.asList(teachCollegeResultIPage.getRecords(), gradeDistributeFinalResult.getGrades());
|
|
|
+ List<Class<?>> classList = Arrays.asList(TeachCollegeResult.class, GradeDistributePaperResult.class, GradeDistributeResult.class, GradeDistributeCurrentAssignedResult.class);
|
|
|
+ List<Collection<?>> collectionList = Arrays.asList(teachCollegeResultIPage.getRecords(), gradeDistributeFinalResult.getPaperGrades(), gradeDistributeFinalResult.getGrades(), gradeDistributeFinalResult.getCurrentAssignedGrades());
|
|
|
ExcelUtil.excelExportBatchSheet("课程分析", sheetList, classList, collectionList, ServletUtil.getResponse());
|
|
|
}
|
|
|
|