wangliang преди 2 години
родител
ревизия
5c81913711

+ 9 - 2
src/main/java/com/qmth/eds/api/ExamAssignController.java

@@ -1,6 +1,7 @@
 package com.qmth.eds.api;
 
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.eds.bean.result.AssignContrastResult;
@@ -70,7 +71,7 @@ public class ExamAssignController {
     @PostMapping("/calc")
     @ApiResponses({@ApiResponse(code = 200, message = "保存/更新成功", response = EditResult.class)})
     public Result save(@RequestBody String data) {
-        return ResultUtil.ok(examAssignService.calcData(data),"");
+        return ResultUtil.ok(examAssignService.calcData(data), "");
     }
 
     @ApiOperation(value = "计算结果查询")
@@ -85,7 +86,13 @@ public class ExamAssignController {
                                       @ApiParam(value = "任课老师工号", required = false) @RequestParam(required = false) String teacherCode,
                                       @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                       @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        return ResultUtil.ok(examAssignService.assignResultPreview(new Page<>(pageNumber, pageSize), semesterId, examTypeId, courseCode, openCollege, kcCollege, clazzId, teacherCode));
+        IPage<AssignResultPreviewResult> assignResultPreviewResultIPage = examAssignService.assignResultPreview(new Page<>(pageNumber, pageSize), semesterId, examTypeId, courseCode, openCollege, kcCollege, clazzId, teacherCode);
+        if (Objects.nonNull(assignResultPreviewResultIPage) && !CollectionUtils.isEmpty(assignResultPreviewResultIPage.getRecords())) {
+            for (AssignResultPreviewResult a : assignResultPreviewResultIPage.getRecords()) {
+                a.setScoreDetail("客观题评分明细:" + a.getObjectiveScoreDetail() + "\r\n" + "主观题评分明细:" + a.getSubjectiveScoreDetail());
+            }
+        }
+        return ResultUtil.ok(assignResultPreviewResultIPage);
     }
 
     @ApiOperation(value = "计算结果对比")

+ 22 - 0
src/main/java/com/qmth/eds/bean/result/AssignResultPreviewResult.java

@@ -43,6 +43,12 @@ public class AssignResultPreviewResult implements Serializable {
     @ApiModelProperty(value = "评分明细")
     String scoreDetail;
 
+    @ApiModelProperty(value = "客观题评分明细")
+    String objectiveScoreDetail;
+
+    @ApiModelProperty(value = "主观题评分明细")
+    String subjectiveScoreDetail;
+
     @ApiModelProperty(value = "班级")
     String clazzName;
 
@@ -55,6 +61,22 @@ public class AssignResultPreviewResult implements Serializable {
     @ApiModelProperty(value = "赋分后总分")
     String assignScore;
 
+    public String getObjectiveScoreDetail() {
+        return objectiveScoreDetail;
+    }
+
+    public void setObjectiveScoreDetail(String objectiveScoreDetail) {
+        this.objectiveScoreDetail = objectiveScoreDetail;
+    }
+
+    public String getSubjectiveScoreDetail() {
+        return subjectiveScoreDetail;
+    }
+
+    public void setSubjectiveScoreDetail(String subjectiveScoreDetail) {
+        this.subjectiveScoreDetail = subjectiveScoreDetail;
+    }
+
     public Long getId() {
         return id;
     }

+ 5 - 1
src/main/resources/mapper/ExamAssignMapper.xml

@@ -34,7 +34,9 @@
             IFNULL(cms.objective_score,'/') as objectiveScore,
             IFNULL(cms.subjective_score,'/') as subjectiveScore,
             IFNULL(cms.total_score,'/') as totalScore,
-            group_concat(cms.objective_score_detail, CONCAT('|', cms.subjective_score_detail)) as scoreDetail,
+            cms.objective_score_detail as objectiveScoreDetail,
+            cms.subjective_score_detail as subjectiveScoreDetail,
+--             group_concat(cms.objective_score_detail, CONCAT('|', cms.subjective_score_detail)) as scoreDetail,
             ess.jxbmc as clazzName,
             ess.jgmc as collegeName,
             ess.xm as teacherName,
@@ -80,6 +82,8 @@
             cms.objective_score,
             cms.subjective_score,
             cms.total_score,
+            cms.objective_score_detail,
+            cms.subjective_score_detail,
             ess.jxbmc,
             ess.jgmc,
             ess.xm,