Bladeren bron

Merge remote-tracking branch 'origin/dev_v3.4.4' into dev_v3.4.4

wangliang 3 maanden geleden
bovenliggende
commit
2d381e4f91

+ 38 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/SysAdminSetController.java

@@ -668,4 +668,42 @@ public class SysAdminSetController {
         }
         return ResultUtil.ok(true);
     }
+
+    @ApiOperation(value = "识别配置查询")
+    @ApiResponses({@ApiResponse(code = 200, message = "识别配置信息", response = SysAdminSetResult.class)})
+    @RequestMapping(value = "/objective/omr/select", method = RequestMethod.POST)
+    public Result objectiveOmrSelect(@ApiParam(value = "学校id ", required = true) @RequestParam Long schoolId) {
+        SysConfig sysConfigOpenFlowMsgPush = commonCacheService.addSysConfigCache(schoolId, SystemConstant.OPEN_FLOW_MESSAGE_PUSH);
+        List<SysConfigResult> sysConfigResultList = new ArrayList<>();
+        if (Objects.nonNull(sysConfigOpenFlowMsgPush)) {
+            sysConfigResultList.add(new SysConfigResult(sysConfigOpenFlowMsgPush));
+        } else {
+            sysConfigResultList.add(new SysConfigResult(null, SystemConstant.SINGLE_QUESTION_OMR_TASK, "特定条件是否进入客观题检查", "true", 1));
+        }
+        return ResultUtil.ok(new SysAdminSetResult(schoolId, sysConfigResultList));
+    }
+
+    @ApiOperation(value = "识别配置保存")
+    @ApiResponses({@ApiResponse(code = 200, message = "识别配置信息", response = ResultUtil.class)})
+    @RequestMapping(value = "/objective/omr/save", method = RequestMethod.POST)
+    @Transactional
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    public Result objectiveOmrSave(@Valid @RequestBody SysAdminSetParam sysAdminSetParam, BindingResult bindingResult) {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
+        Optional.ofNullable(sysAdminSetParam.getParam()).orElseThrow(() -> ExceptionResultEnum.PARAMS_ERROR.exception("配置不能为空"));
+
+        List<SysConfigResult> sysConfigResultList = sysAdminSetParam.getParam();
+        List<SysConfig> sysConfigList = new ArrayList<>();
+        for (SysConfigResult s : sysConfigResultList) {
+            sysConfigList.add(new SysConfig(sysAdminSetParam.getSchoolId(), s));
+        }
+        sysConfigService.saveOrUpdateBatch(sysConfigList);
+
+        for (SysConfigResult s : sysConfigResultList) {
+            commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), s.getCode());
+        }
+        return ResultUtil.ok(true);
+    }
 }

+ 11 - 15
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/ScanOmrTaskController.java

@@ -2,16 +2,14 @@ package com.qmth.distributed.print.api.mark;
 
 import java.util.List;
 
-import io.swagger.annotations.ApiParam;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.contant.SystemConstant;
@@ -25,9 +23,7 @@ import com.qmth.teachcloud.mark.service.ScanOmrTaskService;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
+import io.swagger.annotations.ApiParam;
 
 /**
  * <p>
@@ -67,13 +63,13 @@ public class ScanOmrTaskController extends BaseController {
         return ResultUtil.ok(omrTaskService.getStatus(examId, courseId, coursePaperId));
     }
 
-//    @ApiOperation(value = "识别对照任务状态")
-//    @RequestMapping(value = "/release", method = RequestMethod.POST)
-//    public Result release(@RequestParam Long examId) {
-//        SysUser user = (SysUser) ServletUtil.getRequestUser();
+    @ApiOperation(value = "识别对照任务释放")
+    @RequestMapping(value = "/release", method = RequestMethod.POST)
+    public Result release(@RequestParam Long examId) {
+        SysUser user = (SysUser) ServletUtil.getRequestUser();
 //        omrTaskService.releaseByUser(examId, user.getId());
-//        return ResultUtil.ok(true);
-//    }
+        return ResultUtil.ok(true);
+    }
 
     @ApiOperation(value = "识别对照任务列表")
     @RequestMapping(value = "/list", method = RequestMethod.POST)

+ 22 - 19
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -1,10 +1,27 @@
 package com.qmth.teachcloud.common.contant;
 
-import cn.hutool.core.date.DateUtil;
+import java.io.*;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.net.URLEncoder;
+import java.nio.charset.Charset;
+import java.text.DecimalFormat;
+import java.text.MessageFormat;
+import java.time.LocalDateTime;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.alibaba.fastjson.JSONObject;
 import com.aventrix.jnanoid.jnanoid.NanoIdUtils;
 import com.qmth.boot.core.uid.service.UidService;
-import com.qmth.boot.tools.excel.model.CellValue;
 import com.qmth.teachcloud.common.annotation.DBVerify;
 import com.qmth.teachcloud.common.bean.result.DBVerifyResult;
 import com.qmth.teachcloud.common.config.DictionaryConfig;
@@ -17,24 +34,8 @@ import com.qmth.teachcloud.common.enums.TFCustomTypeEnum;
 import com.qmth.teachcloud.common.enums.UploadFileEnum;
 import com.qmth.teachcloud.common.service.CommonCacheService;
 import com.qmth.teachcloud.common.util.*;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-import java.io.*;
-import java.lang.reflect.Field;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.net.URLEncoder;
-import java.nio.charset.Charset;
-import java.text.DecimalFormat;
-import java.text.MessageFormat;
-import java.time.LocalDateTime;
-import java.util.*;
-import java.util.stream.Collectors;
+import cn.hutool.core.date.DateUtil;
 
 /**
  * @Description: 系统常量
@@ -198,6 +199,8 @@ public class SystemConstant {
     public static final String FLOW_MESSAGE_TYPE = "flow.message.type";//消息类型,标准/非标准
     public static final String MQ_HOST_URL = "mq.host.url";//消息中心地址,目前是cas单点登录地址
 
+    public static final String SINGLE_QUESTION_OMR_TASK = "single.question.omr.task";//单选题有且仅有一个识别答案的是否生成识别对照,默认为false表示生成
+
     public static final String SMS_SIGN_NAME = "sms.sign.name";
     public static final String SMS_TPL_CODE = "sms.tpl.code";
     public static final String SMS_AUDIT_PASS_CODE = "sms.audit.pass.code";

+ 16 - 5
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/ArchiveStudentVo.java

@@ -3,14 +3,14 @@ package com.qmth.teachcloud.mark.bean.archivescore;
 import java.util.LinkedList;
 import java.util.List;
 
-import com.qmth.teachcloud.common.enums.BasicExamStudentStatusEnum;
-import com.qmth.teachcloud.common.enums.ScanStatus;
 import org.apache.commons.lang3.StringUtils;
 
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.teachcloud.common.annotation.ExcelProperty;
 import com.qmth.teachcloud.common.entity.MarkQuestion;
+import com.qmth.teachcloud.common.enums.BasicExamStudentStatusEnum;
+import com.qmth.teachcloud.common.enums.ScanStatus;
 import com.qmth.teachcloud.mark.dto.mark.ScoreItem;
 
 public class ArchiveStudentVo {
@@ -34,11 +34,14 @@ public class ArchiveStudentVo {
     private String courseCode;
     @ExcelProperty(name = "课程名称", width = 20, index = 6)
     private String courseName;
-    @ExcelProperty(name = "客观分", width = 20, index = 7)
+
+    @ExcelProperty(name = "任课老师", width = 20, index = 7)
+    private String teacherName;
+    @ExcelProperty(name = "客观分", width = 20, index = 8)
     private Double objectiveScore;
-    @ExcelProperty(name = "主观分", width = 20, index = 8)
+    @ExcelProperty(name = "主观分", width = 20, index = 9)
     private Double subjectiveScore;
-    @ExcelProperty(name = "成绩", width = 20, index = 9)
+    @ExcelProperty(name = "成绩", width = 20, index = 10)
     private Double totalScore;
     private BasicExamStudentStatusEnum status;
 
@@ -164,6 +167,14 @@ public class ArchiveStudentVo {
         this.studentId = studentId;
     }
 
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
     public String getSheetPath() {
         return sheetPath;
     }

+ 9 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/dto/mark/score/StudentScoreDetailDto.java

@@ -30,6 +30,7 @@ public class StudentScoreDetailDto {
     private String majorName;
     private String teachClassName;
     private String className;
+    private String teacherName;
     private Double objectiveScore;
     private Double subjectiveScore;
     private Double totalScore;
@@ -367,6 +368,14 @@ public class StudentScoreDetailDto {
         this.omrBreach = omrBreach;
     }
 
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
     public BasicExamStudentStatusEnum getStudentStatus() {
         return studentStatus;
     }

+ 49 - 2
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -349,16 +349,25 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
 
         HttpServletResponse response = ServletUtil.getResponse();
         //生成表头
-        String[] columnName = new String[]{"姓名", "学号", "学院", "教学班", "行政班", "课程代码", "课程名称", "状态", "违纪状态", "客观分", "主观分", "成绩"};
+        String[] columnName = new String[]{"姓名", "学号", "学院", "教学班", "行政班", "课程代码", "课程名称","任课老师", "状态", "违纪状态", "客观分", "主观分", "成绩"};
         List<MarkQuestion> oQuestionList = markQuestionService.listByExamIdAndPaperNumberAndObjective(examId, paperNumber, true);
         List<MarkQuestion> sQuestionList = markQuestionService.listByExamIdAndPaperNumberAndObjective(examId, paperNumber, false);
         List<String> columnNameList = new ArrayList<>(Arrays.asList(columnName));
+        Set<Integer> mainNumberSet=new HashSet<>();
         for (MarkQuestion question : oQuestionList) {
+            if(!mainNumberSet.contains(question.getMainNumber())){
+                columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "总分");
+                mainNumberSet.add(question.getMainNumber());
+            }
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "选项");
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "得分");
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "满分");
         }
         for (MarkQuestion question : sQuestionList) {
+            if(!mainNumberSet.contains(question.getMainNumber())){
+                columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "总分");
+                mainNumberSet.add(question.getMainNumber());
+            }
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber());
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "满分");
         }
@@ -374,6 +383,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             valueList.add(CellValue.of(s.getClassName()));
             valueList.add(CellValue.of(s.getCourseCode()));
             valueList.add(CellValue.of(s.getCourseName()));
+            valueList.add(CellValue.of(s.getTeacherName()));
             // 扫描状态
             valueList.add(CellValue.of(s.getStudentStatusDisplay()));
 
@@ -382,12 +392,26 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             valueList.add(s.getObjectiveScore() == null ? CellValue.of("") : CellValue.of(s.getObjectiveScore()));
             valueList.add(s.getSubjectiveScore() == null ? CellValue.of("") : CellValue.of(s.getSubjectiveScore()));
             valueList.add(s.getTotalScore() == null ? CellValue.of("") : CellValue.of(s.getTotalScore()));
+
+            mainNumberSet = new HashSet<>();
+            Map<Integer,Double> mainScoreMap = s.getScoreList(true, oQuestionList).stream().collect(Collectors.groupingBy(
+                    ScoreItem::getMainNumber,Collectors.summingDouble(ScoreItem::getScore)));
             for (ScoreItem item : s.getScoreList(true, oQuestionList)) {
+                if(!mainNumberSet.contains(item.getMainNumber())){
+                    valueList.add(CellValue.of(mainScoreMap.get(item.getMainNumber())));
+                    mainNumberSet.add(item.getMainNumber());
+                }
                 valueList.add(CellValue.of(item.getAnswer()));
                 valueList.add(item.getScore() == null ? CellValue.of("") : CellValue.of(item.getScore()));
                 valueList.add(item.getTotalScore() == null ? CellValue.of("") : CellValue.of(item.getTotalScore()));
             }
+            mainScoreMap = s.getScoreList(true, sQuestionList).stream().collect(Collectors.groupingBy(
+                    ScoreItem::getMainNumber,Collectors.summingDouble(ScoreItem::getScore)));
             for (ScoreItem item : s.getScoreList(false, sQuestionList)) {
+                if(!mainNumberSet.contains(item.getMainNumber())){
+                    valueList.add(CellValue.of(mainScoreMap.get(item.getMainNumber())));
+                    mainNumberSet.add(item.getMainNumber());
+                }
                 valueList.add(CellValue.of(item.getScore()));
                 valueList.add(item.getTotalScore() == null ? CellValue.of("") : CellValue.of(item.getTotalScore()));
             }
@@ -1262,16 +1286,25 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         BasicCourse basicCourse = basicCourseService.getById(markPaper.getCourseId());
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         //生成表头
-        String[] columnName = new String[]{"姓名", "学号", "学院", "教学班", "行政班", "课程代码", "课程名称", "状态", "违纪状态", "客观分", "主观分", "成绩"};
+        String[] columnName = new String[]{"姓名", "学号", "学院", "教学班", "行政班", "课程代码", "课程名称", "任课老师","状态", "违纪状态", "客观分", "主观分", "成绩"};
         List<MarkQuestion> oQuestionList = markQuestionService.listByExamIdAndPaperNumberAndObjective(query.getExamId(), query.getPaperNumber(), true);
         List<MarkQuestion> sQuestionList = markQuestionService.listByExamIdAndPaperNumberAndObjective(query.getExamId(), query.getPaperNumber(), false);
         List<String> columnNameList = new ArrayList<>(Arrays.asList(columnName));
+        Set<Integer> mainNumberSet=new HashSet<>();
         for (MarkQuestion question : oQuestionList) {
+            if(!mainNumberSet.contains(question.getMainNumber())){
+                columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "总分");
+                mainNumberSet.add(question.getMainNumber());
+            }
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "选项");
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "得分");
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "满分");
         }
         for (MarkQuestion question : sQuestionList) {
+            if(!mainNumberSet.contains(question.getMainNumber())){
+                columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "总分");
+                mainNumberSet.add(question.getMainNumber());
+            }
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber());
             columnNameList.add(question.getMainTitle() + " " + question.getMainNumber() + "-" + question.getSubNumber() + "满分");
         }
@@ -1291,6 +1324,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             valueList.add(CellValue.of(s.getClassName()));
             valueList.add(CellValue.of(s.getCourseCode()));
             valueList.add(CellValue.of(s.getCourseName()));
+            valueList.add(CellValue.of(s.getTeacherName()));
             String studentStatusDisplay = "";
             // 扫描状态
             if (BasicExamStudentStatusEnum.M.equals(s.getStudentStatus()) || s.getAbsent() || s.getOmrAbsent() || s.getManualAbsent()) {
@@ -1314,12 +1348,25 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             valueList.add(s.getObjectiveScore() == null ? CellValue.of("") : CellValue.of(s.getObjectiveScore()));
             valueList.add(s.getSubjectiveScore() == null ? CellValue.of("") : CellValue.of(s.getSubjectiveScore()));
             valueList.add(s.getTotalScore() == null ? CellValue.of("") : CellValue.of(s.getTotalScore()));
+            mainNumberSet = new HashSet<>();
+            Map<Integer,Double> mainScoreMap = s.getScoreList(true, oQuestionList).stream().collect(Collectors.groupingBy(
+                    ScoreItem::getMainNumber,Collectors.summingDouble(ScoreItem::getScore)));
             for (ScoreItem item : s.getScoreList(true, oQuestionList)) {
+                if(!mainNumberSet.contains(item.getMainNumber())){
+                    valueList.add(CellValue.of(mainScoreMap.get(item.getMainNumber())));
+                    mainNumberSet.add(item.getMainNumber());
+                }
                 valueList.add(CellValue.of(item.getAnswer()));
                 valueList.add(item.getScore() == null ? CellValue.of("") : CellValue.of(item.getScore()));
                 valueList.add(item.getTotalScore() == null ? CellValue.of("") : CellValue.of(item.getTotalScore()));
             }
+            mainScoreMap = s.getScoreList(true, sQuestionList).stream().collect(Collectors.groupingBy(
+                    ScoreItem::getMainNumber,Collectors.summingDouble(ScoreItem::getScore)));
             for (ScoreItem item : s.getScoreList(false, sQuestionList)) {
+                if(!mainNumberSet.contains(item.getMainNumber())){
+                    valueList.add(CellValue.of(mainScoreMap.get(item.getMainNumber())));
+                    mainNumberSet.add(item.getMainNumber());
+                }
                 valueList.add(CellValue.of(item.getScore()));
                 valueList.add(item.getTotalScore() == null ? CellValue.of("") : CellValue.of(item.getTotalScore()));
             }

+ 21 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/ScanOmrTaskServiceImpl.java

@@ -7,6 +7,7 @@ import javax.annotation.Resource;
 import javax.validation.constraints.NotNull;
 
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -23,6 +24,7 @@ import com.qmth.boot.core.exception.ParameterException;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.MarkQuestion;
+import com.qmth.teachcloud.common.entity.SysConfig;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.QuestionType;
@@ -31,6 +33,7 @@ import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
 import com.qmth.teachcloud.common.enums.scan.ConditionType;
 import com.qmth.teachcloud.common.enums.scan.OmrField;
 import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
+import com.qmth.teachcloud.common.service.CommonCacheService;
 import com.qmth.teachcloud.common.service.TeachcloudCommonService;
 import com.qmth.teachcloud.common.util.ServletUtil;
 import com.qmth.teachcloud.mark.bean.OmrTaskItem;
@@ -81,6 +84,12 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
     @Resource
     private BasicRoleDataPermissionService basicRoleDataPermissionService;
 
+    @Resource
+    private CommonCacheService commonCacheService;
+
+    @Resource
+    private MarkQuestionService markQuestionService;
+
     private static final String OMR_SUSPECT = "?";
 
     private static final String OMR_BLANK = "#";
@@ -107,6 +116,11 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
         boolean single_blank = false;
         int multi_blank_count = 0;
         int single_blank_count = 0;
+
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        SysConfig config = commonCacheService.addSysConfigCache(sysUser.getSchoolId(), SystemConstant.SINGLE_QUESTION_OMR_TASK);
+        boolean enableObjectiveOmr = config != null && StringUtils.isNotBlank(config.getConfigValue()) ? Boolean.valueOf(config.getConfigValue()) : false;
+
         for (ScanStudentPaper spe : paperIds) {
             ScanPaper paper = paperService.getById(spe.getPaperId());
             if (paper == null) {
@@ -137,9 +151,16 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
                 // 分组类型
                 // 识别嫌疑
                 if (ConditionType.FILL_SUSPECT.equals(c)) {
+                    List<MarkQuestion> questionList = markQuestionService.listByExamIdAndPaperNumberAndPaperIndexAndPageIndex(paper.getExamId(),student.getPaperNumber(),spe.getPaperIndex(), pageEntity.getPageIndex(),true);
                     for (int i = 0; pageEntity.getQuestion() != null && pageEntity.getQuestion().getResult() != null
                             && i < pageEntity.getQuestion().getResult().size(); i++) {
                         String result = pageEntity.getQuestion().getResult().get(i);
+                        MarkQuestion question = questionList.get(i);
+                        //单选题若开启配置,仅有一个选项的不参与识别对照
+                        String answer = result.replaceAll(OMR_SUSPECT,"");
+                        if (question.getQuestionType().equals(QuestionType.SINGLE.getValue()) && enableObjectiveOmr && answer.length()==1){
+                            continue;
+                        }
                         if (result != null && result.startsWith(OMR_SUSPECT)) {
                             OmrTaskItem item = new OmrTaskItem();
                             item.setIndex(i + 1);

+ 2 - 0
teachcloud-mark/src/main/resources/mapper/MarkStudentMapper.xml

@@ -55,6 +55,7 @@
         bes.major_name majorName,
         bes.teach_class_name teachClassName,
         bes.class_name className,
+        su1.real_name teacherName,
         ms.objective_score objectiveScore,
         ms.subjective_score subjectiveScore,
         ifnull(ms.objective_score, 0) + ifnull(ms.subjective_score, 0) totalScore,
@@ -456,6 +457,7 @@
                bes.teach_class_name teachClassName,
                bc.code courseCode,
                bc.name courseName,
+               su.real_name teacherName,
                bes.exam_start_time examStartTime,
                bes.exam_end_time examEndTime
         from mark_student s