wangliang 4 年之前
父節點
當前提交
2947baeac9

+ 6 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java

@@ -101,7 +101,6 @@ public class TEExamReexamController {
                     status = Objects.isNull(reexamAuditing) || reexamAuditing.intValue() == 0 ? 0 : 1;
                     TEExamReexam teExamReexam = new TEExamReexam(teExamStudent.getExamId(), teExamStudent.getExamActivityId(), teExamStudent.getId(), model, reason, status, Objects.isNull(mapParameter.get("remark")) ? null : String.valueOf(mapParameter.get("remark")));
                     teExamReexam.setCreateId(tbUser.getId());
-                    teExamReexamService.save(teExamReexam);
                     if (Objects.nonNull(status) && status.intValue() == 1) {
                         //这里查询该机构下所有为管理员角色的账号
                         List<TBUser> tbUserList = tbUserRoleService.userQueryByRole(tbUser.getOrgId(), RoleEnum.ADMIN.name());
@@ -113,7 +112,13 @@ public class TEExamReexamController {
                         }
                     } else if (Objects.nonNull(status) && status.intValue() == 0) {//无需审核时考生已考次数-1
                         examStudentIdNotAuditingList.add(teExamStudent.getId());
+                        teExamReexam.setAuditingId(tbUser.getId());
+                        teExamReexam.setAuditingStatus(0);
+                        teExamReexam.setAuditingTime(System.currentTimeMillis());
+                        teExamReexam.setAuditingSuggest("无需审核");
+                        teExamReexam.setUpdateId(tbUser.getId());
                     }
+                    teExamReexamService.save(teExamReexam);
                 }
             }
             if (Objects.nonNull(teExamReexamAuditingList) && teExamReexamAuditingList.size() > 0) {

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/ReexamListRequestBean.java

@@ -51,6 +51,17 @@ public class ReexamListRequestBean implements Serializable {
     @ApiModelProperty(name = "科目编码")
     private String courseCode;
 
+    @ApiModelProperty(name = "待审核数幕")
+    private Integer reexamCount;
+
+    public Integer getReexamCount() {
+        return reexamCount;
+    }
+
+    public void setReexamCount(Integer reexamCount) {
+        this.reexamCount = reexamCount;
+    }
+
     public Long getReexamId() {
         return reexamId;
     }

+ 3 - 2
themis-business/src/main/resources/mapper/TEExamReexamMapper.xml

@@ -14,7 +14,8 @@
             tees.course_name as courseName,
             tees.exam_id as examId,
             tee.exam_count - tees.already_exam_count as examCount,
-            (select count(1) from t_oe_exam_record toer where (toer.status <![CDATA[ <> ]]> 'FINISHED' and toer.status <![CDATA[ <> ]]> 'PERSISTED') and toer.exam_student_id = tees.id) as statusCount
+            (select count(1) from t_oe_exam_record toer where (toer.status <![CDATA[ <> ]]> 'FINISHED' and toer.status <![CDATA[ <> ]]> 'PERSISTED') and toer.exam_student_id = tees.id) as statusCount,
+            (select count(1) from t_e_exam_reexam teer where teer.exam_student_id = tees.id and teer.status = 1) as reexamCount
         from
             t_e_exam_student tees
             left join t_e_exam tee on
@@ -216,7 +217,7 @@
             and tee.enable = 1
             and teea.enable = 1
             and tees.enable = 1
-            and teer.status = 2
+            and (teer.status = 0 or teer.status = 2)
         </where>
         order by tees.room_code
     </select>