|
@@ -21,8 +21,8 @@ import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpSession;
|
|
import javax.servlet.http.HttpSession;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
+import java.math.RoundingMode;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -77,10 +77,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 学院学科报表查询科目信息
|
|
* 学院学科报表查询科目信息
|
|
*
|
|
*
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param collegeId
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param collegeId collegeId
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public CourseInfoResult findCourseInfo(Long examId, String courseCode, Long collegeId) {
|
|
public CourseInfoResult findCourseInfo(Long examId, String courseCode, Long collegeId) {
|
|
@@ -99,7 +99,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
if (tbPaperList.size() < 1) {
|
|
if (tbPaperList.size() < 1) {
|
|
throw ExceptionResultEnum.NO_DATA.exception();
|
|
throw ExceptionResultEnum.NO_DATA.exception();
|
|
}
|
|
}
|
|
- Set<String> paperTypeSet = tbPaperList.stream().map(e -> e.getPaperType()).collect(Collectors.toSet());
|
|
|
|
|
|
+ Set<String> paperTypeSet = tbPaperList.stream().map(TBPaper::getPaperType).collect(Collectors.toSet());
|
|
String paperType = String.join(",", paperTypeSet); // 多种试卷类型的试卷类型合并','号隔开
|
|
String paperType = String.join(",", paperTypeSet); // 多种试卷类型的试卷类型合并','号隔开
|
|
Gson gson = new Gson();
|
|
Gson gson = new Gson();
|
|
TBPaperInfoResult TBPaperInfoResult = gson.fromJson(gson.toJson(tbPaperList.get(0)), TBPaperInfoResult.class);
|
|
TBPaperInfoResult TBPaperInfoResult = gson.fromJson(gson.toJson(tbPaperList.get(0)), TBPaperInfoResult.class);
|
|
@@ -129,10 +129,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 学院学科报表科目描述
|
|
* 学院学科报表科目描述
|
|
*
|
|
*
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param collegeId
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param collegeId collegeId
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public CollegeAndSchoolGradeDistributionResult findCourseDistribution(Long examId, String courseCode, Long collegeId) {
|
|
public CollegeAndSchoolGradeDistributionResult findCourseDistribution(Long examId, String courseCode, Long collegeId) {
|
|
@@ -160,27 +160,27 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
double maxValue = Double.parseDouble(String.valueOf(scopeMap.get("maxValue")));
|
|
double maxValue = Double.parseDouble(String.valueOf(scopeMap.get("maxValue")));
|
|
if ("(".equals(minSign) && ")".equals(maxSign)) {
|
|
if ("(".equals(minSign) && ")".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue < e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getAssignedScore() && maxValue > e.getAssignedScore()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue < e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getAssignedScore() && maxValue > e.getAssignedScore()).count();
|
|
|
|
|
|
} else if ("(".equals(minSign) && "]".equals(maxSign)) {
|
|
} else if ("(".equals(minSign) && "]".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue < e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getAssignedScore() && maxValue >= e.getAssignedScore()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue < e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getAssignedScore() && maxValue >= e.getAssignedScore()).count();
|
|
|
|
|
|
} else if ("[".equals(minSign) && ")".equals(maxSign)) {
|
|
} else if ("[".equals(minSign) && ")".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getAssignedScore() && maxValue > e.getAssignedScore()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue > e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getAssignedScore() && maxValue > e.getAssignedScore()).count();
|
|
|
|
|
|
} else if ("[".equals(minSign) && "]".equals(maxSign)) {
|
|
} else if ("[".equals(minSign) && "]".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getAssignedScore() && maxValue >= e.getAssignedScore()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getAssignedScore() && maxValue >= e.getAssignedScore()).count();
|
|
}
|
|
}
|
|
|
|
|
|
gradeDistributionList.add(new GradeDistributionResult(colCount, schCount, describe));
|
|
gradeDistributionList.add(new GradeDistributionResult(colCount, schCount, describe));
|
|
@@ -201,27 +201,27 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
double maxValue = Double.parseDouble(String.valueOf(scopeMap.get("maxValue")));
|
|
double maxValue = Double.parseDouble(String.valueOf(scopeMap.get("maxValue")));
|
|
if ("(".equals(minSign) && ")".equals(maxSign)) {
|
|
if ("(".equals(minSign) && ")".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue < e.getPercentGrade().doubleValue() && maxValue > e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getPercentGrade() && maxValue > e.getPercentGrade()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue < e.getPercentGrade().doubleValue() && maxValue > e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getPercentGrade() && maxValue > e.getPercentGrade()).count();
|
|
|
|
|
|
} else if ("(".equals(minSign) && "]".equals(maxSign)) {
|
|
} else if ("(".equals(minSign) && "]".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue < e.getPercentGrade().doubleValue() && maxValue >= e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getPercentGrade() && maxValue >= e.getPercentGrade()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue < e.getPercentGrade().doubleValue() && maxValue >= e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue < e.getPercentGrade() && maxValue >= e.getPercentGrade()).count();
|
|
|
|
|
|
} else if ("[".equals(minSign) && ")".equals(maxSign)) {
|
|
} else if ("[".equals(minSign) && ")".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue <= e.getPercentGrade().doubleValue() && maxValue > e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getPercentGrade() && maxValue > e.getPercentGrade()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue <= e.getPercentGrade().doubleValue() && maxValue > e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getPercentGrade() && maxValue > e.getPercentGrade()).count();
|
|
|
|
|
|
} else if ("[".equals(minSign) && "]".equals(maxSign)) {
|
|
} else if ("[".equals(minSign) && "]".equals(maxSign)) {
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
colCount = (int) examPaperTikForCollege.stream()
|
|
- .filter(e -> minValue <= e.getPercentGrade().doubleValue() && maxValue >= e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getPercentGrade() && maxValue >= e.getPercentGrade()).count();
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
schCount = (int) examPaperTikForSchool.stream()
|
|
- .filter(e -> minValue <= e.getPercentGrade().doubleValue() && maxValue >= e.getPercentGrade().doubleValue()).count();
|
|
|
|
|
|
+ .filter(e -> minValue <= e.getPercentGrade() && maxValue >= e.getPercentGrade()).count();
|
|
}
|
|
}
|
|
double colCountRate = MathUtil.formatDouble2(colCount / colTotalCount * 100); //本院比率 保留2位小数
|
|
double colCountRate = MathUtil.formatDouble2(colCount / colTotalCount * 100); //本院比率 保留2位小数
|
|
double schCountRate = MathUtil.formatDouble2(schCount / schTotalCount * 100); //全校比率 保留2位小数
|
|
double schCountRate = MathUtil.formatDouble2(schCount / schTotalCount * 100); //全校比率 保留2位小数
|
|
@@ -234,11 +234,11 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 开课学院分数段
|
|
* 开课学院分数段
|
|
*
|
|
*
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param collegeId
|
|
|
|
- * @param filter
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param collegeId collegeId
|
|
|
|
+ * @param filter filter
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public List<SurveyTeacherGradeDistributionResult> surveyTeacherDistribution(Long examId, String courseCode, Long collegeId, boolean filter) {
|
|
public List<SurveyTeacherGradeDistributionResult> surveyTeacherDistribution(Long examId, String courseCode, Long collegeId, boolean filter) {
|
|
@@ -249,7 +249,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
}
|
|
}
|
|
surveyTeacherDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> !e.getAbsent()).collect(Collectors.toList());
|
|
surveyTeacherDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> !e.getAbsent()).collect(Collectors.toList());
|
|
//过滤应届
|
|
//过滤应届
|
|
- List<SurveyTeacherDistributionResult> currentDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> e.getStudentCurrent() == true && !e.getAbsent()).collect(Collectors.toList());
|
|
|
|
|
|
+ List<SurveyTeacherDistributionResult> currentDistributionResultList = surveyTeacherDistributionResultList.stream().filter(e -> e.getStudentCurrent() && !e.getAbsent()).collect(Collectors.toList());
|
|
double allTotalCount = surveyTeacherDistributionResultList.size(); // 总体人数
|
|
double allTotalCount = surveyTeacherDistributionResultList.size(); // 总体人数
|
|
double currentTotalCount = currentDistributionResultList.size(); // 应届人数
|
|
double currentTotalCount = currentDistributionResultList.size(); // 应届人数
|
|
|
|
|
|
@@ -257,7 +257,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
for (GradeScopeEnum value : GradeScopeEnum.values()) {
|
|
for (GradeScopeEnum value : GradeScopeEnum.values()) {
|
|
String describe = value.getDescribe();
|
|
String describe = value.getDescribe();
|
|
double allCountBefore = 0, allCountAfter = 0, currentCountBefore = 0, currentCountAfter = 0,
|
|
double allCountBefore = 0, allCountAfter = 0, currentCountBefore = 0, currentCountAfter = 0,
|
|
- allCountRateBefore = 0, allCountRateAfter = 0, currentCountRateBefore = 0, currentCountRateAfter = 0;
|
|
|
|
|
|
+ allCountRateBefore, allCountRateAfter, currentCountRateBefore, currentCountRateAfter;
|
|
|
|
|
|
Map<String, Object> scopeMap = AnalyzeScopeUtil.analyzeScope(value.getScope());
|
|
Map<String, Object> scopeMap = AnalyzeScopeUtil.analyzeScope(value.getScope());
|
|
String minSign = String.valueOf(scopeMap.get("minSign"));
|
|
String minSign = String.valueOf(scopeMap.get("minSign"));
|
|
@@ -313,10 +313,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
.filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
|
|
.filter(e -> minValue <= e.getAssignedScore().doubleValue() && maxValue >= e.getAssignedScore().doubleValue()).count();
|
|
}
|
|
}
|
|
BigDecimal hundredBig = new BigDecimal("100");
|
|
BigDecimal hundredBig = new BigDecimal("100");
|
|
- allCountRateBefore = allTotalCount > 0 ? new BigDecimal(allCountBefore).multiply(hundredBig).divide(new BigDecimal(allTotalCount), SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP).doubleValue() : 0;
|
|
|
|
- allCountRateAfter = allTotalCount > 0 ? new BigDecimal(allCountAfter).multiply(hundredBig).divide(new BigDecimal(allTotalCount), SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP).doubleValue() : 0;
|
|
|
|
- currentCountRateBefore = currentTotalCount > 0 ? new BigDecimal(currentCountBefore).multiply(hundredBig).divide(new BigDecimal(currentTotalCount), SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP).doubleValue() : 0;
|
|
|
|
- currentCountRateAfter = currentTotalCount > 0 ? new BigDecimal(currentCountAfter).multiply(hundredBig).divide(new BigDecimal(currentTotalCount), SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP).doubleValue() : 0;
|
|
|
|
|
|
+ allCountRateBefore = allTotalCount > 0 ? new BigDecimal(allCountBefore).multiply(hundredBig).divide(new BigDecimal(allTotalCount), SystemConstant.FINAL_SCALE, RoundingMode.HALF_UP).doubleValue() : 0;
|
|
|
|
+ allCountRateAfter = allTotalCount > 0 ? new BigDecimal(allCountAfter).multiply(hundredBig).divide(new BigDecimal(allTotalCount), SystemConstant.FINAL_SCALE, RoundingMode.HALF_UP).doubleValue() : 0;
|
|
|
|
+ currentCountRateBefore = currentTotalCount > 0 ? new BigDecimal(currentCountBefore).multiply(hundredBig).divide(new BigDecimal(currentTotalCount), SystemConstant.FINAL_SCALE, RoundingMode.HALF_UP).doubleValue() : 0;
|
|
|
|
+ currentCountRateAfter = currentTotalCount > 0 ? new BigDecimal(currentCountAfter).multiply(hundredBig).divide(new BigDecimal(currentTotalCount), SystemConstant.FINAL_SCALE, RoundingMode.HALF_UP).doubleValue() : 0;
|
|
|
|
|
|
surveyTeacherGradeDistributionResultList.add(new SurveyTeacherGradeDistributionResult((int) Math.abs(allCountBefore), (int) Math.abs(allCountAfter), (int) Math.abs(currentCountBefore), (int) Math.abs(currentCountAfter),
|
|
surveyTeacherGradeDistributionResultList.add(new SurveyTeacherGradeDistributionResult((int) Math.abs(allCountBefore), (int) Math.abs(allCountAfter), (int) Math.abs(currentCountBefore), (int) Math.abs(currentCountAfter),
|
|
allCountRateBefore, allCountRateAfter, currentCountRateBefore, currentCountRateAfter, describe));
|
|
allCountRateBefore, allCountRateAfter, currentCountRateBefore, currentCountRateAfter, describe));
|
|
@@ -327,51 +327,73 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 学院学科报表查询维度
|
|
* 学院学科报表查询维度
|
|
*
|
|
*
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param collegeId
|
|
|
|
- * @param teacherId
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param collegeId collegeId
|
|
|
|
+ * @param teacherId teacherId
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public DimensionAnalyzeResult findDimensionInfo(Long examId, String courseCode, Long collegeId, Long teacherId) {
|
|
public DimensionAnalyzeResult findDimensionInfo(Long examId, String courseCode, Long collegeId, Long teacherId) {
|
|
|
|
+ boolean deanLookCollege = false;
|
|
|
|
+ boolean deanLookTeacher = false;
|
|
|
|
+ boolean teacherLookSelf = false;
|
|
//查找维度
|
|
//查找维度
|
|
List<CourseDimensionResult> dimensionInfoDatasource = null;
|
|
List<CourseDimensionResult> dimensionInfoDatasource = null;
|
|
if (SystemConstant.longNotNull(collegeId) && !SystemConstant.longNotNull(teacherId)) {
|
|
if (SystemConstant.longNotNull(collegeId) && !SystemConstant.longNotNull(teacherId)) {
|
|
// 有学院id无教师id -> 开课院长看各考察学院数据
|
|
// 有学院id无教师id -> 开课院长看各考察学院数据
|
|
dimensionInfoDatasource = tbDimensionService.findDimensionInfo(examId, courseCode, collegeId);
|
|
dimensionInfoDatasource = tbDimensionService.findDimensionInfo(examId, courseCode, collegeId);
|
|
|
|
+ deanLookCollege = true;
|
|
} else if (SystemConstant.longNotNull(teacherId) && !SystemConstant.longNotNull(collegeId)) {
|
|
} else if (SystemConstant.longNotNull(teacherId) && !SystemConstant.longNotNull(collegeId)) {
|
|
// 有教师id无学院id -> 开课院长看各授课教师数据
|
|
// 有教师id无学院id -> 开课院长看各授课教师数据
|
|
dimensionInfoDatasource = tbDimensionService.findDimensionByTeacherInfo(examId, courseCode, teacherId);
|
|
dimensionInfoDatasource = tbDimensionService.findDimensionByTeacherInfo(examId, courseCode, teacherId);
|
|
|
|
+ deanLookTeacher = true;
|
|
} else if (SystemConstant.longNotNull(teacherId) && SystemConstant.longNotNull(collegeId)) {
|
|
} else if (SystemConstant.longNotNull(teacherId) && SystemConstant.longNotNull(collegeId)) {
|
|
// 既有教师id又有学院id -> 任课教师看某个学院下自己的数据
|
|
// 既有教师id又有学院id -> 任课教师看某个学院下自己的数据
|
|
dimensionInfoDatasource = tbDimensionService.findDimensionByTeacherCollegeInfo(examId, courseCode, teacherId, collegeId);
|
|
dimensionInfoDatasource = tbDimensionService.findDimensionByTeacherCollegeInfo(examId, courseCode, teacherId, collegeId);
|
|
|
|
+ teacherLookSelf = true;
|
|
}
|
|
}
|
|
// if (dimensionInfoDatasource.size() < 1) {
|
|
// if (dimensionInfoDatasource.size() < 1) {
|
|
// throw ExceptionResultEnum.DATA_ERROR.exception();
|
|
// throw ExceptionResultEnum.DATA_ERROR.exception();
|
|
// }
|
|
// }
|
|
List<ModuleDimensionResult> dimensionAnalyzeList = new ArrayList<>();
|
|
List<ModuleDimensionResult> dimensionAnalyzeList = new ArrayList<>();
|
|
- Set<String> moduleSet = dimensionInfoDatasource.stream().map(CourseDimensionResult::getModule).collect(Collectors.toSet()); // 考查模块集合
|
|
|
|
- for (String module : moduleSet) {
|
|
|
|
- List<CourseDimensionResult> dimensionInfoList = dimensionInfoDatasource
|
|
|
|
- .stream().filter(e -> module.equals(e.getModule())).collect(Collectors.toList());
|
|
|
|
-
|
|
|
|
- List<DimensionInfoResult> dioList = new ArrayList<>();
|
|
|
|
- List<DimensionInfoResult> batterThanAll = new ArrayList<>(); // 掌握较好
|
|
|
|
- List<DimensionInfoResult> worseThanAll = new ArrayList<>(); // 掌握较差
|
|
|
|
- for (CourseDimensionResult courseDimensionResult : dimensionInfoList) {
|
|
|
|
- String dimensionCode = String.valueOf(courseDimensionResult.getDimensionCode());
|
|
|
|
- String dimensionName = String.valueOf(courseDimensionResult.getDimensionName());
|
|
|
|
- double schScoreRate = courseDimensionResult.getSchScoreRate();
|
|
|
|
- double colScoreRate = courseDimensionResult.getColScoreRate();
|
|
|
|
- if (colScoreRate >= schScoreRate) {
|
|
|
|
- batterThanAll.add(new DimensionInfoResult(dimensionCode, dimensionName));
|
|
|
|
- } else {
|
|
|
|
- worseThanAll.add(new DimensionInfoResult(dimensionCode, dimensionName));
|
|
|
|
|
|
+ if (dimensionInfoDatasource != null && dimensionInfoDatasource.size() > 0){
|
|
|
|
+ Set<String> moduleSet = dimensionInfoDatasource.stream().map(CourseDimensionResult::getModule).collect(Collectors.toSet()); // 考查模块集合
|
|
|
|
+ for (String module : moduleSet) {
|
|
|
|
+ List<CourseDimensionResult> dimensionInfoList = dimensionInfoDatasource
|
|
|
|
+ .stream().filter(e -> module.equals(e.getModule())).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ List<DimensionInfoResult> dioList = new ArrayList<>();
|
|
|
|
+ List<DimensionInfoResult> batterThanAll = new ArrayList<>(); // 掌握较好
|
|
|
|
+ List<DimensionInfoResult> worseThanAll = new ArrayList<>(); // 掌握较差
|
|
|
|
+ for (CourseDimensionResult courseDimensionResult : dimensionInfoList) {
|
|
|
|
+ String dimensionCode = String.valueOf(courseDimensionResult.getDimensionCode());
|
|
|
|
+ String dimensionName = String.valueOf(courseDimensionResult.getDimensionName());
|
|
|
|
+ double referenceScoreRate = courseDimensionResult.getReferenceScoreRate();
|
|
|
|
+ double myScoreRate = courseDimensionResult.getMyScoreRate();
|
|
|
|
+ if (myScoreRate >= referenceScoreRate) {
|
|
|
|
+ batterThanAll.add(new DimensionInfoResult(dimensionCode, dimensionName));
|
|
|
|
+ } else {
|
|
|
|
+ worseThanAll.add(new DimensionInfoResult(dimensionCode, dimensionName));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String schScoreRate = null;
|
|
|
|
+ String colScoreRate = null;
|
|
|
|
+ String teaScoreRate = null;
|
|
|
|
+ if (deanLookCollege){
|
|
|
|
+ schScoreRate = String.valueOf(referenceScoreRate);
|
|
|
|
+ colScoreRate = String.valueOf(myScoreRate);
|
|
|
|
+ }else if (deanLookTeacher){
|
|
|
|
+ schScoreRate = String.valueOf(referenceScoreRate);
|
|
|
|
+ teaScoreRate = String.valueOf(myScoreRate);
|
|
|
|
+ }else if (teacherLookSelf){
|
|
|
|
+ colScoreRate = String.valueOf(myScoreRate);
|
|
|
|
+ teaScoreRate = String.valueOf(myScoreRate);
|
|
|
|
+ }
|
|
|
|
+ dioList.add(new DimensionInfoResult(dimensionCode, dimensionName, String.valueOf(courseDimensionResult.getTotalCount()), schScoreRate, colScoreRate, teaScoreRate, courseDimensionResult.getDegree()));
|
|
}
|
|
}
|
|
- dioList.add(new DimensionInfoResult(dimensionCode, dimensionName, String.valueOf(courseDimensionResult.getTotalCount()), String.valueOf(schScoreRate), String.valueOf(colScoreRate), courseDimensionResult.getDegree()));
|
|
|
|
|
|
+ dimensionAnalyzeList.add(new ModuleDimensionResult(module, dioList, batterThanAll, worseThanAll));
|
|
}
|
|
}
|
|
- dimensionAnalyzeList.add(new ModuleDimensionResult(module, dioList, batterThanAll, worseThanAll));
|
|
|
|
}
|
|
}
|
|
return new DimensionAnalyzeResult(dimensionAnalyzeList);
|
|
return new DimensionAnalyzeResult(dimensionAnalyzeList);
|
|
}
|
|
}
|
|
@@ -379,11 +401,11 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 查找题目相关
|
|
* 查找题目相关
|
|
*
|
|
*
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param collegeId
|
|
|
|
- * @param teacherId
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param collegeId collegeId
|
|
|
|
+ * @param teacherId teacherId
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public QuestionInfoResult findSituationOfQuestions(Long examId, String courseCode, Long collegeId, Long teacherId) {
|
|
public QuestionInfoResult findSituationOfQuestions(Long examId, String courseCode, Long collegeId, Long teacherId) {
|
|
@@ -399,10 +421,12 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
// 既有教师id又有学院id -> 任课教师看某个学院下自己的数据
|
|
// 既有教师id又有学院id -> 任课教师看某个学院下自己的数据
|
|
answerDetailDatasource = taExamCourseTeacherCollegeDifficultService.findValidAnswerDetail(examId, courseCode, teacherId, collegeId);
|
|
answerDetailDatasource = taExamCourseTeacherCollegeDifficultService.findValidAnswerDetail(examId, courseCode, teacherId, collegeId);
|
|
}
|
|
}
|
|
- Set<String> paperTypeList = answerDetailDatasource.stream().map(e -> e.getPaperType()).collect(Collectors.toSet());
|
|
|
|
List<PaperTypeResult> questionInfoList = new ArrayList<>();
|
|
List<PaperTypeResult> questionInfoList = new ArrayList<>();
|
|
- for (String paperType : paperTypeList) {
|
|
|
|
- questionInfoList.add(new PaperTypeResult(paperType, answerDetailDatasource.stream().filter(e -> Objects.equals(paperType, e.getPaperType())).collect(Collectors.toList())));
|
|
|
|
|
|
+ if (answerDetailDatasource != null && answerDetailDatasource.size() > 0){
|
|
|
|
+ Set<String> paperTypeList = answerDetailDatasource.stream().map(CellResult::getPaperType).collect(Collectors.toSet());
|
|
|
|
+ for (String paperType : paperTypeList) {
|
|
|
|
+ questionInfoList.add(new PaperTypeResult(paperType, answerDetailDatasource.stream().filter(e -> Objects.equals(paperType, e.getPaperType())).collect(Collectors.toList())));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return new QuestionInfoResult(questionInfoList);
|
|
return new QuestionInfoResult(questionInfoList);
|
|
}
|
|
}
|
|
@@ -410,10 +434,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 查找老师信息
|
|
* 查找老师信息
|
|
*
|
|
*
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param collegeId
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param collegeId collegeId
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public TeacherInfoListResult findTeacherInfo(Long examId, String courseCode, Long collegeId) {
|
|
public TeacherInfoListResult findTeacherInfo(Long examId, String courseCode, Long collegeId) {
|
|
@@ -427,21 +451,22 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查找题目信息
|
|
* 查找题目信息
|
|
- * @param examId 考试id
|
|
|
|
- * @param courseCode 课程编号
|
|
|
|
- * @param teachCollegeId 开课学院id
|
|
|
|
|
|
+ *
|
|
|
|
+ * @param examId 考试id
|
|
|
|
+ * @param courseCode 课程编号
|
|
|
|
+ * @param teachCollegeId 开课学院id
|
|
* @param inspectCollegeId 考察学院id
|
|
* @param inspectCollegeId 考察学院id
|
|
- * @param teacherId 授课教师id
|
|
|
|
|
|
+ * @param teacherId 授课教师id
|
|
* @return 结果
|
|
* @return 结果
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public QuestionListResult findQuestionInfo(Long examId, String courseCode, Long teachCollegeId,Long inspectCollegeId,Long teacherId) {
|
|
|
|
|
|
+ public QuestionListResult findQuestionInfo(Long examId, String courseCode, Long teachCollegeId, Long inspectCollegeId, Long teacherId) {
|
|
//查找试卷结构
|
|
//查找试卷结构
|
|
List<TBPaperStructResult> questionDatasource;
|
|
List<TBPaperStructResult> questionDatasource;
|
|
- if (SystemConstant.longNotNull(inspectCollegeId) && SystemConstant.longNotNull(teacherId)){
|
|
|
|
|
|
+ if (SystemConstant.longNotNull(inspectCollegeId) && SystemConstant.longNotNull(teacherId)) {
|
|
// 教师课堂查询 -> 教师在某课程学院下学生数据集
|
|
// 教师课堂查询 -> 教师在某课程学院下学生数据集
|
|
- questionDatasource = tbPaperStructService.findQuestionInfoByTeacherCollege(examId, courseCode,inspectCollegeId,teacherId);
|
|
|
|
- }else {
|
|
|
|
|
|
+ questionDatasource = tbPaperStructService.findQuestionInfoByTeacherCollege(examId, courseCode, inspectCollegeId, teacherId);
|
|
|
|
+ } else {
|
|
// 开课学院和考察学院查询 -> 全校学生某课程数据集
|
|
// 开课学院和考察学院查询 -> 全校学生某课程数据集
|
|
questionDatasource = tbPaperStructService.findQuestionInfo(examId, courseCode);
|
|
questionDatasource = tbPaperStructService.findQuestionInfo(examId, courseCode);
|
|
}
|
|
}
|
|
@@ -466,7 +491,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
List<TBPaperStructResult> errorCellList = cellList.stream().filter(e -> PaperStructJudgeEnum.NOT_QUITE_RIGHT.equals(e.getPaperStructJudge())).collect(Collectors.toList());
|
|
List<TBPaperStructResult> errorCellList = cellList.stream().filter(e -> PaperStructJudgeEnum.NOT_QUITE_RIGHT.equals(e.getPaperStructJudge())).collect(Collectors.toList());
|
|
// 获取考察点集合
|
|
// 获取考察点集合
|
|
for (TBPaperStructResult cell : errorCellList) {
|
|
for (TBPaperStructResult cell : errorCellList) {
|
|
- if (Objects.nonNull(cell.getKnowledgeDimension())){
|
|
|
|
|
|
+ if (Objects.nonNull(cell.getKnowledgeDimension())) {
|
|
String knowledgeDimension = cell.getKnowledgeDimension();
|
|
String knowledgeDimension = cell.getKnowledgeDimension();
|
|
String[] arr = knowledgeDimension.split(",");
|
|
String[] arr = knowledgeDimension.split(",");
|
|
knowledgeDimensionSet.addAll(Arrays.asList(arr));
|
|
knowledgeDimensionSet.addAll(Arrays.asList(arr));
|
|
@@ -482,7 +507,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
|
|
|
List<DimensionInfoResult> dimensionList = new ArrayList<>();
|
|
List<DimensionInfoResult> dimensionList = new ArrayList<>();
|
|
for (String dimensionCode : knowledgeDimensionSort) {
|
|
for (String dimensionCode : knowledgeDimensionSort) {
|
|
- String dimensionName = "";
|
|
|
|
|
|
+ String dimensionName;
|
|
List<String> nameTwoList = dimensionDataSource.stream()
|
|
List<String> nameTwoList = dimensionDataSource.stream()
|
|
.filter(e -> dimensionCode.equals(e.getCodeSecond()))
|
|
.filter(e -> dimensionCode.equals(e.getCodeSecond()))
|
|
.map(TBDimension::getNameSecond).collect(Collectors.toList());
|
|
.map(TBDimension::getNameSecond).collect(Collectors.toList());
|
|
@@ -502,7 +527,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
|
|
|
List<DimensionInfoResult> abilityDimensionList = new ArrayList<>();
|
|
List<DimensionInfoResult> abilityDimensionList = new ArrayList<>();
|
|
for (String dimensionCode : abilityDimensionSort) {
|
|
for (String dimensionCode : abilityDimensionSort) {
|
|
- String dimensionName = "";
|
|
|
|
|
|
+ String dimensionName;
|
|
List<String> nameTwoList = dimensionDataSource.stream()
|
|
List<String> nameTwoList = dimensionDataSource.stream()
|
|
.filter(e -> dimensionCode.equals(e.getCodeSecond()))
|
|
.filter(e -> dimensionCode.equals(e.getCodeSecond()))
|
|
.map(TBDimension::getNameSecond).collect(Collectors.toList());
|
|
.map(TBDimension::getNameSecond).collect(Collectors.toList());
|
|
@@ -527,11 +552,11 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 取总体平均分
|
|
* 取总体平均分
|
|
*
|
|
*
|
|
- * @param schoolId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @param examId
|
|
|
|
- * @param filter
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param schoolId schoolId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param filter filter
|
|
|
|
+ * @return 结果
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public SurveyTeacherExamCourseResult findAvgScore(Long schoolId, String courseCode, Long examId, boolean filter) {
|
|
public SurveyTeacherExamCourseResult findAvgScore(Long schoolId, String courseCode, Long examId, boolean filter) {
|
|
@@ -591,10 +616,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
/**
|
|
/**
|
|
* 获取开课课程考试课程总览
|
|
* 获取开课课程考试课程总览
|
|
*
|
|
*
|
|
- * @param semester
|
|
|
|
- * @param examId
|
|
|
|
- * @param courseCode
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param semester semester
|
|
|
|
+ * @param examId examId
|
|
|
|
+ * @param courseCode courseCode
|
|
|
|
+ * @return return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode) {
|
|
public TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode) {
|