diff --git a/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java b/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java index c56e781..2168c2f 100644 --- a/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java +++ b/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java @@ -259,6 +259,7 @@ public class StageExamServiceImpl implements StageExamService { * 获取考试详情试卷信息 BUS_STAGEEXAM * 找到最大的值,如果这个的成绩大于最大值,就修改,不然记录就可以 */ + PageData clazz = classMapper.findById(student); //更新学员考试成绩 PageData scores = new PageData(); PageData stageStudent = stageStudentRelationService.findByStuCla(student);//获取学员的成绩 @@ -280,9 +281,12 @@ public class StageExamServiceImpl implements StageExamService { scores.put("STUDYSTATE", '3'); // 学习状态 examResult = "1"; // 加强学习,记录错题,生成效果评估试卷 - PageData clazz = classMapper.findById(student); - if (clazz != null && clazz.get("ISSTRENGTHEN") != null && "1".equals(clazz.getString("ISSTRENGTHEN"))) { + if ("1".equals(clazz.getString("ISSTRENGTHEN")) || "2".equals(clazz.getString("ISSTRENGTHEN"))) { if (EXAMSCORE != Integer.parseInt(request.getString("EXAMSCORE"))) { + // 如果是强制效果评估的班级,学习状态是待评估 + if ("2".equals(clazz.getString("ISSTRENGTHEN"))) { + scores.put("STUDYSTATE", '5'); // 学习状态:待评估 + } this.saveStrengthPaper(entity, stageStudent); } } @@ -319,7 +323,7 @@ public class StageExamServiceImpl implements StageExamService { // 试卷信息 PageData strengPaper = new PageData(); strengPaper.put("STRENGTHEN_STAGEEXAMPAPER_INPUT_ID", Warden.get32UUID()); - initPageDataUtil.initSave(strengPaper); + initPageDataUtil.initSaveApp(strengPaper, stageStudent.getString("USER_ID")); double sumScore = 0d; int sumQuestion = 0; for (PageData errorType : errorTypeGroup) { @@ -344,7 +348,7 @@ public class StageExamServiceImpl implements StageExamService { strengPaper.put("PASSSCORE", sumScore); strengPaper.put("SUMQUESTION", sumQuestion); strengthenStageExamPaperInputMapper.save(strengPaper); - initPageDataUtil.initSave(stageStudent); + initPageDataUtil.initSaveApp(stageStudent, stageStudent.getString("USER_ID")); stageStudent.put("STRENGTHENSTUDENTRELATION_ID", Warden.get32UUID()); stageStudent.put("STRENGTHEN_STAGEEXAMPAPER_INPUT_ID", strengPaper.get("STRENGTHEN_STAGEEXAMPAPER_INPUT_ID")); stageStudent.put("STAGESTUDENTRELATION_ID", stageStudent.get("STAGESTUDENTRELATION_ID")); @@ -356,7 +360,7 @@ public class StageExamServiceImpl implements StageExamService { for (PageData errorQue : errorList) { errorQue.put("STRENGTHEN_PAPER_QUESTION_ID", Warden.get32UUID()); errorQue.put("STRENGTHEN_STAGEEXAMPAPER_INPUT_ID", strengPaper.get("STRENGTHEN_STAGEEXAMPAPER_INPUT_ID")); - initPageDataUtil.initSave(errorQue); + initPageDataUtil.initSaveApp(errorQue, stageStudent.getString("USER_ID")); strengthenPaperQuestionMapper.save(errorQue); } } @@ -439,7 +443,15 @@ public class StageExamServiceImpl implements StageExamService { scores.put("STRENGTHENEXAMSCORE", String.valueOf(EXAMSCORE)); //考试得分 } if (EXAMSCORE >= Double.parseDouble(request.getString("PASSSCORE"))) { // 考试通过 - // 修改学员学习结束时间 + // 修改学员学习状态 + PageData stura = new PageData(); + PageData stageStudent = stageStudentRelationService.findByStuCla(student);//获取学员的成绩 + stura.put("STAGESTUDENTRELATION_ID", stageStudent.get("STAGESTUDENTRELATION_ID")); + stura.put("STUDYSTATE", '3'); // 学习状态 + stura.put("OPERATOR", entity.getString("USER_ID")); //修改人 + stura.put("OPERATTIME", entity.getString("OPERATTIME")); //修改时间 + stageStudentRelationService.updateStudentScore(stura); + // 修改学员效果评估学习结束时间 PageData stuEndTime = new PageData(); stuEndTime.put("STUDENT_ID", student.getString("STUDENT_ID")); stuEndTime.put("STUDY_END_TIME", nowDate); @@ -524,6 +536,7 @@ public class StageExamServiceImpl implements StageExamService { * 获取考试详情试卷信息 BUS_STAGEEXAM * 找到最大的值,如果这个的成绩大于最大值,就修改,不然记录就可以 */ + PageData clazz = classMapper.findById(student); //更新学员考试成绩 PageData scores = new PageData(); PageData stageStudent = stageStudentRelationService.findByStuCla(student);//获取学员的成绩 @@ -546,9 +559,12 @@ public class StageExamServiceImpl implements StageExamService { examResult = "1"; // 加强学习,记录错题,生成效果评估试卷 - PageData clazz = classMapper.findById(student); - if (clazz != null && clazz.get("ISSTRENGTHEN") != null && "1".equals(clazz.getString("ISSTRENGTHEN"))) { + if ("1".equals(clazz.getString("ISSTRENGTHEN")) || "2".equals(clazz.getString("ISSTRENGTHEN"))) { if (EXAMSCORE != Integer.parseInt(request.getString("EXAMSCORE"))) { + // 如果是强制效果评估的班级,学习状态是待评估 + if ("2".equals(clazz.getString("ISSTRENGTHEN"))) { + scores.put("STUDYSTATE", '5'); // 学习状态:待评估 + } this.saveStrengthPaper(entity, stageStudent); } }