deason 2 lat temu
rodzic
commit
cb10013826

+ 22 - 0
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamCloudServiceProvider.java

@@ -470,6 +470,28 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
         return resp;
     }
 
+    @ApiOperation(value = "查询考试课程特殊设置")
+    @PostMapping("getExamCourseSetting")
+    @Override
+    public GetExamCourseResp getExamCourseSetting(GetExamCourseReq req) {
+        ExamCourseRelationEntity entity = examCourseRelationRepo.findByExamIdAndCourseId(req.getExamId(), req.getCourseId());
+
+        GetExamCourseResp resp = new GetExamCourseResp();
+        if (entity != null) {
+            ExamCourseRelationBean bean = new ExamCourseRelationBean();
+            bean.setExamId(entity.getExamId());
+            bean.setCourseId(entity.getCourseId());
+            bean.setCourseCode(entity.getCourseCode());
+            bean.setCourseLevel(entity.getCourseLevel());
+            bean.setCourseName(entity.getCourseName());
+            bean.setCourseEnable(entity.getCourseEnable());
+            bean.setPassScoreLine(entity.getPassScoreLine());
+            bean.setGoodScoreLine(entity.getGoodScoreLine());
+            resp.setBean(bean);
+        }
+        return resp;
+    }
+
     @ApiOperation(value = "查询考试课程的试卷类型集")
     @PostMapping("getExamCoursePaperTypeList")
     @Override

+ 2 - 0
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/ExamCourseRelationRepo.java

@@ -21,6 +21,8 @@ public interface ExamCourseRelationRepo extends JpaRepository<ExamCourseRelation
 
     ExamCourseRelationEntity findByExamIdAndCourseCode(Long examId, String courseCode);
 
+    ExamCourseRelationEntity findByExamIdAndCourseId(Long examId, Long courseId);
+
     @Transactional
     @Modifying
     @Query("update ExamCourseRelationEntity s set s.courseName = ?1, s.courseLevel  = ?2,s.courseEnable=?3 where s.courseId=?4")