|
@@ -71,6 +71,9 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
@Resource
|
|
|
TBExamService tbExamService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TAExamCourseTeacherCollegeDifficultService taExamCourseTeacherCollegeDifficultService;
|
|
|
+
|
|
|
/**
|
|
|
* 学院学科报表查询科目信息
|
|
|
*
|
|
@@ -386,10 +389,15 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
public QuestionInfoResult findSituationOfQuestions(Long examId, String courseCode, Long collegeId, Long teacherId) {
|
|
|
//查找答题记录
|
|
|
List<CellResult> answerDetailDatasource = null;
|
|
|
- if (Objects.isNull(teacherId) || Objects.equals(teacherId, "")) {
|
|
|
+ if (SystemConstant.longNotNull(collegeId) && !SystemConstant.longNotNull(teacherId)) {
|
|
|
+ // 有学院id无教师id -> 开课院长看各考察学院数据
|
|
|
answerDetailDatasource = taExamCourseDifficultService.findValidAnswerDetail(examId, courseCode, collegeId);
|
|
|
- } else {
|
|
|
+ } else if (SystemConstant.longNotNull(teacherId) && !SystemConstant.longNotNull(collegeId)){
|
|
|
+ // 有教师id无学院id -> 开课院长看各授课教师数据
|
|
|
answerDetailDatasource = taExamCourseTeacherDifficultService.findValidAnswerDetail(examId, courseCode, teacherId);
|
|
|
+ } else if (SystemConstant.longNotNull(teacherId) && SystemConstant.longNotNull(collegeId)) {
|
|
|
+ // 既有教师id又有学院id -> 任课教师看某个学院下自己的数据
|
|
|
+ answerDetailDatasource = taExamCourseTeacherCollegeDifficultService.findValidAnswerDetail(examId, courseCode, collegeId, teacherId);
|
|
|
}
|
|
|
Set<String> paperTypeList = answerDetailDatasource.stream().map(e -> e.getPaperType()).collect(Collectors.toSet());
|
|
|
List<PaperTypeResult> questionInfoList = new ArrayList<>();
|