|
@@ -28,6 +28,8 @@ import cn.com.qmth.examcloud.core.oe.common.repository.ExamScoreRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.service.GainBaseDataService;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.service.LocalCacheService;
|
|
|
import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.OrgCacheBean;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -82,8 +84,8 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
ExamBean examBean = ExamCacheTransferHelper.getCachedExam(query.getExamId());
|
|
|
|
|
|
//阅卷方式
|
|
|
- String markingType = gainBaseDataService.getExamProperty(examBean.getId(),ExamProperties.MARKING_TYPE.name());
|
|
|
-
|
|
|
+ String markingType = gainBaseDataService.getExamProperty(examBean.getId(), ExamProperties.MARKING_TYPE.name());
|
|
|
+
|
|
|
//获取考生列表
|
|
|
Page<ExamStudentInfo> page = examStudentService.getExamStudentListPage(ExamScoreEntityConvert.of(query));
|
|
|
List<ExamStudentInfo> examStudentList = page.getContent();
|
|
@@ -94,7 +96,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
//封装成绩统计结果
|
|
|
List<ExamScoreInfo> examScoreList = new ArrayList<>();
|
|
|
examStudentList.forEach(examStudent -> {
|
|
|
- examScoreList.add(of(examStudent,examBean,markingType));
|
|
|
+ examScoreList.add(of(examStudent, examBean, markingType));
|
|
|
});
|
|
|
return new PageImpl<ExamScoreInfo>(examScoreList, pageable, page.getTotalElements());
|
|
|
}
|
|
@@ -102,7 +104,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
/**
|
|
|
* 封装成绩统计结果
|
|
|
*/
|
|
|
- private ExamScoreInfo of(ExamStudentInfo examStudent,ExamBean examBean,String markingType) {
|
|
|
+ private ExamScoreInfo of(ExamStudentInfo examStudent, ExamBean examBean, String markingType) {
|
|
|
ExamScoreInfo examScore = new ExamScoreInfo();
|
|
|
examScore.setExamId(examStudent.getExamId());
|
|
|
examScore.setExamName(examBean.getName());
|
|
@@ -110,13 +112,13 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
examScore.setStudentCode(examStudent.getStudentCode());
|
|
|
examScore.setStudentName(examStudent.getStudentName());
|
|
|
examScore.setIdentityNumber(examStudent.getIdentityNumber());
|
|
|
-
|
|
|
+
|
|
|
examScore.setCourseId(examStudent.getCourseId());
|
|
|
examScore.setCourseCode(examStudent.getCourseCode());
|
|
|
examScore.setCourseName(examStudent.getCourseName());
|
|
|
examScore.setCourseNameAndCode(examStudent.getCourseName() + "(" + examStudent.getCourseCode() + ")");
|
|
|
examScore.setCourseLevel(CourseLevel.getCourseLevelTitle(examStudent.getCourseLevel()));
|
|
|
-
|
|
|
+
|
|
|
examScore.setOrgId(examStudent.getOrgId());
|
|
|
examScore.setOrgCode(examStudent.getOrgCode());
|
|
|
examScore.setOrgName(examStudent.getOrgName());
|
|
@@ -124,84 +126,106 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
examScore.setSpecialtyName(examStudent.getSpecialtyName());
|
|
|
examScore.setGrade(examStudent.getGrade());
|
|
|
Long examTimes = examBean.getExamTimes();
|
|
|
- if(examTimes != null){
|
|
|
- examScore.setLeftExamTimes(examTimes - examStudent.getNormalExamTimes());
|
|
|
+ if (examTimes != null) {
|
|
|
+ examScore.setLeftExamTimes(examTimes - examStudent.getNormalExamTimes());
|
|
|
}
|
|
|
- return setCommomScoreInfo(examScore,examStudent.getFinished(),examStudent.getExamStudentId(),examBean,markingType);
|
|
|
+ return setCommomScoreInfo(examScore, examStudent.getFinished(), examStudent.getExamStudentId(), examBean, markingType);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public List<ExamScoreInfo> exportExamScoreList(ExamScoreQuery query) {
|
|
|
- Check.isNull(query, "查询参数不能为空!");
|
|
|
+ @Override
|
|
|
+ public List<ExamScoreInfo> exportExamScoreList(ExamScoreQuery query) {
|
|
|
+ Check.isNull(query, "查询参数不能为空!");
|
|
|
Check.isNull(query.getExamId(), "请先选择考试批次!");
|
|
|
//获取考试信息
|
|
|
ExamBean examBean = ExamCacheTransferHelper.getCachedExam(query.getExamId());
|
|
|
|
|
|
//阅卷方式
|
|
|
- String markingType = gainBaseDataService.getExamProperty(examBean.getId(),ExamProperties.MARKING_TYPE.name());
|
|
|
- return getExamStudentInfoListOfScoreExport(query,examBean,markingType);
|
|
|
- }
|
|
|
-
|
|
|
- private List<ExamScoreInfo> getExamStudentInfoListOfScoreExport(ExamScoreQuery query,ExamBean examBean,String markingType) {
|
|
|
- Check.isNull(query, "查询参数不能为空!");
|
|
|
+ String markingType = gainBaseDataService.getExamProperty(examBean.getId(), ExamProperties.MARKING_TYPE.name());
|
|
|
+ return getExamStudentInfoListOfScoreExport(query, examBean, markingType);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ExamScoreEntity getFinalEffectiveExamScore(Long examId, String identityNumber, Long courseId) {
|
|
|
+ ExamSettingsCacheBean examSettings = CacheHelper.getExamSettings(examId);
|
|
|
+ //阅卷方式
|
|
|
+ String markingType = gainBaseDataService.getExamProperty(examId, ExamProperties.MARKING_TYPE.name());
|
|
|
+ List<ExamRecordDataEntity> allExamRecordDataList =
|
|
|
+ examRecordDataRepo.findByExamIdAndIdentityNumberAndCourseId(examId, identityNumber, courseId);
|
|
|
+ return getFinalEffectiveExamScore(allExamRecordDataList, examSettings.getExamType(), markingType);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ExamScoreEntity> getAllExamScoreList(Long examId, String identityNumber, Long courseId) {
|
|
|
+ List<ExamRecordDataEntity> allExamRecordDataList =
|
|
|
+ examRecordDataRepo.findByExamIdAndIdentityNumberAndCourseId(examId, identityNumber, courseId);
|
|
|
+ if (allExamRecordDataList == null || allExamRecordDataList.isEmpty()) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Long> examRecordDataIds = allExamRecordDataList.stream().map(p->p.getId()).collect(Collectors.toList());
|
|
|
+ return examScoreRepo.findByExamRecordDataIdIn(examRecordDataIds);
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<ExamScoreInfo> getExamStudentInfoListOfScoreExport(ExamScoreQuery query, ExamBean examBean, String markingType) {
|
|
|
+ Check.isNull(query, "查询参数不能为空!");
|
|
|
//查询条件
|
|
|
StringBuffer sql = new StringBuffer();
|
|
|
sql.append("select id,exam_student_id,exam_id,course_id,course_code,course_level,finished,student_id,student_code,student_name,identity_number"
|
|
|
- + ",info_collector,root_org_id,org_id,paper_type,normal_exam_times,is_reexamine,reexamine_completed"
|
|
|
- + ",specialty_code,specialty_name,grade from ec_oe_exam_student where 1=1 ");
|
|
|
+ + ",info_collector,root_org_id,org_id,paper_type,normal_exam_times,is_reexamine,reexamine_completed"
|
|
|
+ + ",specialty_code,specialty_name,grade from ec_oe_exam_student where 1=1 ");
|
|
|
if (query.getOrgId() != null) {
|
|
|
- sql.append(" and org_id="+query.getOrgId());
|
|
|
+ sql.append(" and org_id=" + query.getOrgId());
|
|
|
}
|
|
|
if (query.getExamId() != null) {
|
|
|
- sql.append(" and exam_id="+query.getExamId());
|
|
|
+ sql.append(" and exam_id=" + query.getExamId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getStudentCode())) {
|
|
|
- sql.append(" and student_code LIKE '%"+query.getStudentCode()+"%'");
|
|
|
+ sql.append(" and student_code LIKE '%" + query.getStudentCode() + "%'");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getStudentName())) {
|
|
|
- sql.append(" and student_name LIKE '%"+query.getStudentName()+"%'");
|
|
|
+ sql.append(" and student_name LIKE '%" + query.getStudentName() + "%'");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getIdentityNumber())) {
|
|
|
- sql.append(" and identity_number LIKE '%"+query.getIdentityNumber()+"%'");
|
|
|
+ sql.append(" and identity_number LIKE '%" + query.getIdentityNumber() + "%'");
|
|
|
}
|
|
|
if (query.getCourseId() != null) {
|
|
|
- sql.append(" and course_id="+query.getCourseId());
|
|
|
+ sql.append(" and course_id=" + query.getCourseId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(query.getCourseLevel())) {
|
|
|
- sql.append(" and course_level= '"+query.getCourseLevel()+"'");
|
|
|
+ sql.append(" and course_level= '" + query.getCourseLevel() + "'");
|
|
|
}
|
|
|
if (query.getFinished() != null) {
|
|
|
- sql.append(" and finished= "+query.getFinished());
|
|
|
+ sql.append(" and finished= " + query.getFinished());
|
|
|
}
|
|
|
sql.append(" order by update_time desc");
|
|
|
-
|
|
|
- if(query.getStartLimit()!=null && query.getEndLimit() != null){
|
|
|
- int offset = query.getEndLimit() - query.getStartLimit() + 1;
|
|
|
- sql.append(" limit "+(query.getStartLimit()-1)+","+offset);
|
|
|
+
|
|
|
+ if (query.getStartLimit() != null && query.getEndLimit() != null) {
|
|
|
+ int offset = query.getEndLimit() - query.getStartLimit() + 1;
|
|
|
+ sql.append(" limit " + (query.getStartLimit() - 1) + "," + offset);
|
|
|
}
|
|
|
- List<ExamStudentEntity> examStudentList = jdbcTemplate.query(sql.toString(), new RowMapper<ExamStudentEntity>(){
|
|
|
- @Override
|
|
|
- public ExamStudentEntity mapRow(ResultSet rs, int rowNum)throws SQLException {
|
|
|
- return getExamStudentEntityByResultSet(rs);
|
|
|
- }
|
|
|
+ List<ExamStudentEntity> examStudentList = jdbcTemplate.query(sql.toString(), new RowMapper<ExamStudentEntity>() {
|
|
|
+ @Override
|
|
|
+ public ExamStudentEntity mapRow(ResultSet rs, int rowNum) throws SQLException {
|
|
|
+ return getExamStudentEntityByResultSet(rs);
|
|
|
+ }
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
List<ExamScoreInfo> examScoreInfoList = new ArrayList<ExamScoreInfo>();
|
|
|
//缓存
|
|
|
- for(ExamStudentEntity examStudent:examStudentList){
|
|
|
- long courseId = examStudent.getCourseId();
|
|
|
- CourseBean courseBean = ExamCacheTransferHelper.getCachedCourse(courseId);
|
|
|
-
|
|
|
- long orgId = examStudent.getOrgId();
|
|
|
+ for (ExamStudentEntity examStudent : examStudentList) {
|
|
|
+ long courseId = examStudent.getCourseId();
|
|
|
+ CourseBean courseBean = ExamCacheTransferHelper.getCachedCourse(courseId);
|
|
|
+
|
|
|
+ long orgId = examStudent.getOrgId();
|
|
|
OrgCacheBean orgBean = gainBaseDataService.getOrgBean(orgId);
|
|
|
|
|
|
- ExamScoreInfo examScoreInfo = convertToExamScoreInfo(examStudent,courseBean,orgBean,examBean,markingType);
|
|
|
- examScoreInfoList.add(examScoreInfo);
|
|
|
+ ExamScoreInfo examScoreInfo = convertToExamScoreInfo(examStudent, courseBean, orgBean, examBean, markingType);
|
|
|
+ examScoreInfoList.add(examScoreInfo);
|
|
|
}
|
|
|
return examScoreInfoList;
|
|
|
- }
|
|
|
-
|
|
|
- private ExamScoreInfo convertToExamScoreInfo(ExamStudentEntity examStudent,CourseBean courseBean,OrgCacheBean orgBean,ExamBean examBean,String markingType) {
|
|
|
+ }
|
|
|
+
|
|
|
+ private ExamScoreInfo convertToExamScoreInfo(ExamStudentEntity examStudent, CourseBean courseBean, OrgCacheBean orgBean, ExamBean examBean, String markingType) {
|
|
|
if (examStudent == null) {
|
|
|
return null;
|
|
|
}
|
|
@@ -213,54 +237,54 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
examScore.setStudentName(examStudent.getStudentName());
|
|
|
examScore.setIdentityNumber(examStudent.getIdentityNumber());
|
|
|
examScore.setInfoCollector(examStudent.getInfoCollector());
|
|
|
-
|
|
|
+
|
|
|
examScore.setCourseId(examStudent.getCourseId());
|
|
|
examScore.setCourseCode(examStudent.getCourseCode());
|
|
|
examScore.setCourseName(courseBean.getName());
|
|
|
examScore.setCourseNameAndCode(courseBean.getName() + "(" + courseBean.getCode() + ")");
|
|
|
examScore.setCourseLevel(CourseLevel.getCourseLevelTitle(examStudent.getCourseLevel()));
|
|
|
-
|
|
|
+
|
|
|
examScore.setOrgId(examStudent.getOrgId());
|
|
|
examScore.setOrgCode(orgBean.getCode());
|
|
|
examScore.setOrgName(orgBean.getName());
|
|
|
-
|
|
|
+
|
|
|
examScore.setSpecialtyName(examStudent.getSpecialtyName());
|
|
|
examScore.setGrade(examStudent.getGrade());
|
|
|
|
|
|
Long examTimes = examBean.getExamTimes();
|
|
|
- if(examTimes != null){
|
|
|
- examScore.setLeftExamTimes(examTimes - examStudent.getNormalExamTimes());
|
|
|
+ if (examTimes != null) {
|
|
|
+ examScore.setLeftExamTimes(examTimes - examStudent.getNormalExamTimes());
|
|
|
}
|
|
|
-
|
|
|
- return setCommomScoreInfo(examScore,examStudent.getFinished(),examStudent.getExamStudentId(),examBean,markingType);
|
|
|
+
|
|
|
+ return setCommomScoreInfo(examScore, examStudent.getFinished(), examStudent.getExamStudentId(), examBean, markingType);
|
|
|
}
|
|
|
-
|
|
|
- private ExamScoreInfo setCommomScoreInfo(ExamScoreInfo examScoreInfo,Boolean finished,long examStudentId,ExamBean examBean,String markingType){
|
|
|
- //查询考试记录
|
|
|
- if(finished != null && finished){
|
|
|
- //查询考试记录
|
|
|
- List<ExamRecordDataEntity> examRecordList = examRecordService.getExamRecordListByExamStudentId(examStudentId);
|
|
|
- examScoreInfo.setIsFinished("是");//是否完成考试
|
|
|
- examScoreInfo.setIsAbsent("否");//是否缺考
|
|
|
- //违纪次数
|
|
|
- examScoreInfo.setDisciplineCount(disciplineCount(examRecordList));
|
|
|
+
|
|
|
+ private ExamScoreInfo setCommomScoreInfo(ExamScoreInfo examScoreInfo, Boolean finished, long examStudentId, ExamBean examBean, String markingType) {
|
|
|
+ //查询考试记录
|
|
|
+ if (finished != null && finished) {
|
|
|
+ //查询考试记录
|
|
|
+ List<ExamRecordDataEntity> examRecordList = examRecordService.getExamRecordListByExamStudentId(examStudentId);
|
|
|
+ examScoreInfo.setIsFinished("是");//是否完成考试
|
|
|
+ examScoreInfo.setIsAbsent("否");//是否缺考
|
|
|
+ //违纪次数
|
|
|
+ examScoreInfo.setDisciplineCount(disciplineCount(examRecordList));
|
|
|
//提交次数
|
|
|
- examScoreInfo.setSubmitCount(submitCount(examRecordList));
|
|
|
+ examScoreInfo.setSubmitCount(submitCount(examRecordList));
|
|
|
//设置相关成绩(总分,主观分,客观分)
|
|
|
- ExamScoreEntity finalExamScore = getFinalEffectiveExamScore(examRecordList,examBean,markingType);
|
|
|
- setFinalExamScore(examScoreInfo,finalExamScore);
|
|
|
+ ExamScoreEntity finalExamScore = getFinalEffectiveExamScore(examRecordList, examBean.getExamType(), markingType);
|
|
|
+ setFinalExamScore(examScoreInfo, finalExamScore);
|
|
|
|
|
|
//考试开始时间
|
|
|
- examScoreInfo.setStartTime(getExamRecordStartTime(finalExamScore,examRecordList));
|
|
|
- }else{
|
|
|
- examScoreInfo.setIsFinished("否");//是否完成考试
|
|
|
- examScoreInfo.setIsAbsent("是");//是否缺考
|
|
|
- examScoreInfo.setDisciplineCount("--");//违纪次数
|
|
|
- examScoreInfo.setSubmitCount("--"); //提交次数
|
|
|
+ examScoreInfo.setStartTime(getExamRecordStartTime(finalExamScore, examRecordList));
|
|
|
+ } else {
|
|
|
+ examScoreInfo.setIsFinished("否");//是否完成考试
|
|
|
+ examScoreInfo.setIsAbsent("是");//是否缺考
|
|
|
+ examScoreInfo.setDisciplineCount("--");//违纪次数
|
|
|
+ examScoreInfo.setSubmitCount("--"); //提交次数
|
|
|
examScoreInfo.setObjectiveScore("--");//主观分
|
|
|
examScoreInfo.setSubjectiveScore("--");//客观分
|
|
|
- examScoreInfo.setFinalExamScore("--");//最终成绩
|
|
|
- examScoreInfo.setStartTime("--");//考试开始时间
|
|
|
+ examScoreInfo.setFinalExamScore("--");//最终成绩
|
|
|
+ examScoreInfo.setStartTime("--");//考试开始时间
|
|
|
}
|
|
|
return examScoreInfo;
|
|
|
}
|
|
@@ -268,7 +292,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
/**
|
|
|
* 计算得出最终有效成绩
|
|
|
*/
|
|
|
- private ExamScoreEntity getFinalEffectiveExamScore(List<ExamRecordDataEntity> examRecordAllList,ExamBean examBean,String markingType) {
|
|
|
+ private ExamScoreEntity getFinalEffectiveExamScore(List<ExamRecordDataEntity> examRecordAllList, String examType, String markingType) {
|
|
|
/*
|
|
|
* 第一次过滤考试记录:
|
|
|
* 状态为EXAM_END或EXAM_OVERDUE
|
|
@@ -305,22 +329,22 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
return null;
|
|
|
}
|
|
|
//离线考试
|
|
|
- if("OFFLINE".equals(examBean.getExamType())){
|
|
|
+ if ("OFFLINE".equals(examType)) {
|
|
|
return effectiveExamScoreList.get(0);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
if (markingType.equals(MarkingType.ALL.name()) || markingType.equals(MarkingType.OBJECT_SCORE_MAX.name())) {
|
|
|
- //全部评阅规则或客观分最高规则:取总分最高
|
|
|
+ //全部评阅规则或客观分最高规则:取总分最高
|
|
|
List<ExamScoreEntity> examScores = effectiveExamScoreList
|
|
|
- .stream()
|
|
|
- .sorted((o1, o2) -> o2.getTotalScore().compareTo(o1.getTotalScore()))
|
|
|
- .collect(Collectors.toList());
|
|
|
+ .stream()
|
|
|
+ .sorted((o1, o2) -> o2.getTotalScore().compareTo(o1.getTotalScore()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
return examScores.get(0);
|
|
|
} else if (markingType.equals(MarkingType.LAST_SUBMIT.name())) {
|
|
|
- //最后一次提交规则:取最后一次的成绩
|
|
|
+ //最后一次提交规则:取最后一次的成绩
|
|
|
List<ExamScoreEntity> examScores = effectiveExamScoreList
|
|
|
- .stream()
|
|
|
- .sorted((o1, o2) -> o2.getId().compareTo(o1.getId()))
|
|
|
- .collect(Collectors.toList());
|
|
|
+ .stream()
|
|
|
+ .sorted((o1, o2) -> o2.getId().compareTo(o1.getId()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
return examScores.get(0);
|
|
|
}
|
|
|
}
|
|
@@ -329,8 +353,9 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
|
|
|
/**
|
|
|
* 给考生最终成绩赋值
|
|
|
+ *
|
|
|
* @param examScoreInfo 考试模型实体
|
|
|
- * @param examScore 考试数据实体
|
|
|
+ * @param examScore 考试数据实体
|
|
|
*/
|
|
|
private void setFinalExamScore(ExamScoreInfo examScoreInfo, final ExamScoreEntity examScore) {
|
|
|
if (examScore == null) {
|
|
@@ -349,16 +374,16 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
/**
|
|
|
* 考试开始时间
|
|
|
*/
|
|
|
- private String getExamRecordStartTime(ExamScoreEntity examScore,List<ExamRecordDataEntity> examRecordList) {
|
|
|
+ private String getExamRecordStartTime(ExamScoreEntity examScore, List<ExamRecordDataEntity> examRecordList) {
|
|
|
if (examScore == null) {
|
|
|
return "";
|
|
|
}
|
|
|
ExamRecordDataEntity examRecordData = null;
|
|
|
- for(ExamRecordDataEntity examRecordDataEntity:examRecordList){
|
|
|
- if(examRecordDataEntity.getId().equals(examScore.getExamRecordDataId())){
|
|
|
- examRecordData = examRecordDataEntity;
|
|
|
- break;
|
|
|
- }
|
|
|
+ for (ExamRecordDataEntity examRecordDataEntity : examRecordList) {
|
|
|
+ if (examRecordDataEntity.getId().equals(examScore.getExamRecordDataId())) {
|
|
|
+ examRecordData = examRecordDataEntity;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
if (examRecordData == null) {
|
|
|
return "";
|
|
@@ -407,31 +432,31 @@ public class ExamScoreServiceImpl implements ExamScoreService {
|
|
|
}
|
|
|
return submitCount.toString();
|
|
|
}
|
|
|
-
|
|
|
- private ExamStudentEntity getExamStudentEntityByResultSet(ResultSet rs) throws SQLException{
|
|
|
- ExamStudentEntity examStudentEntity = new ExamStudentEntity();
|
|
|
- examStudentEntity.setId(rs.getLong("id"));
|
|
|
- examStudentEntity.setExamStudentId(rs.getLong("exam_student_id"));
|
|
|
- examStudentEntity.setExamId(rs.getLong("exam_id"));
|
|
|
- examStudentEntity.setCourseId(rs.getLong("course_id"));
|
|
|
- examStudentEntity.setCourseCode(rs.getString("course_code"));
|
|
|
- examStudentEntity.setCourseLevel(rs.getString("course_level"));
|
|
|
- examStudentEntity.setFinished(rs.getBoolean("finished"));
|
|
|
- examStudentEntity.setStudentId(rs.getLong("student_id"));
|
|
|
- examStudentEntity.setStudentCode(rs.getString("student_code"));
|
|
|
- examStudentEntity.setStudentName(rs.getString("student_name"));
|
|
|
- examStudentEntity.setIdentityNumber(rs.getString("identity_number"));
|
|
|
- examStudentEntity.setInfoCollector(rs.getString("info_collector"));
|
|
|
- examStudentEntity.setRootOrgId(rs.getLong("root_org_id"));
|
|
|
- examStudentEntity.setOrgId(rs.getLong("org_id"));
|
|
|
- examStudentEntity.setPaperType(rs.getString("paper_type"));
|
|
|
- examStudentEntity.setNormalExamTimes(rs.getInt("normal_exam_times"));
|
|
|
- examStudentEntity.setIsReExamine(rs.getBoolean("is_reexamine"));
|
|
|
- examStudentEntity.setReExamineCompleted(rs.getBoolean("reexamine_completed"));
|
|
|
- examStudentEntity.setSpecialtyCode(rs.getString("specialty_code"));
|
|
|
- examStudentEntity.setSpecialtyName(rs.getString("specialty_name"));
|
|
|
- examStudentEntity.setGrade(rs.getString("grade"));
|
|
|
- return examStudentEntity;
|
|
|
+
|
|
|
+ private ExamStudentEntity getExamStudentEntityByResultSet(ResultSet rs) throws SQLException {
|
|
|
+ ExamStudentEntity examStudentEntity = new ExamStudentEntity();
|
|
|
+ examStudentEntity.setId(rs.getLong("id"));
|
|
|
+ examStudentEntity.setExamStudentId(rs.getLong("exam_student_id"));
|
|
|
+ examStudentEntity.setExamId(rs.getLong("exam_id"));
|
|
|
+ examStudentEntity.setCourseId(rs.getLong("course_id"));
|
|
|
+ examStudentEntity.setCourseCode(rs.getString("course_code"));
|
|
|
+ examStudentEntity.setCourseLevel(rs.getString("course_level"));
|
|
|
+ examStudentEntity.setFinished(rs.getBoolean("finished"));
|
|
|
+ examStudentEntity.setStudentId(rs.getLong("student_id"));
|
|
|
+ examStudentEntity.setStudentCode(rs.getString("student_code"));
|
|
|
+ examStudentEntity.setStudentName(rs.getString("student_name"));
|
|
|
+ examStudentEntity.setIdentityNumber(rs.getString("identity_number"));
|
|
|
+ examStudentEntity.setInfoCollector(rs.getString("info_collector"));
|
|
|
+ examStudentEntity.setRootOrgId(rs.getLong("root_org_id"));
|
|
|
+ examStudentEntity.setOrgId(rs.getLong("org_id"));
|
|
|
+ examStudentEntity.setPaperType(rs.getString("paper_type"));
|
|
|
+ examStudentEntity.setNormalExamTimes(rs.getInt("normal_exam_times"));
|
|
|
+ examStudentEntity.setIsReExamine(rs.getBoolean("is_reexamine"));
|
|
|
+ examStudentEntity.setReExamineCompleted(rs.getBoolean("reexamine_completed"));
|
|
|
+ examStudentEntity.setSpecialtyCode(rs.getString("specialty_code"));
|
|
|
+ examStudentEntity.setSpecialtyName(rs.getString("specialty_name"));
|
|
|
+ examStudentEntity.setGrade(rs.getString("grade"));
|
|
|
+ return examStudentEntity;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|