Эх сурвалжийг харах

ip限制,审核人,答题纸上传

qinchao 4 жил өмнө
parent
commit
7e6fe4b6a9

+ 14 - 0
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/ExamRecordDataEntity.java

@@ -252,6 +252,12 @@ public class ExamRecordDataEntity extends JpaEntity {
     @Transient
     private String ip;
 
+    /**
+     * 审核人(忽略该字段持久化)
+     */
+    @Transient
+    private String auditUserName;
+
     public Long getId() {
         return id;
     }
@@ -641,4 +647,12 @@ public class ExamRecordDataEntity extends JpaEntity {
     public void setIp(String ip) {
         this.ip = ip;
     }
+
+    public String getAuditUserName() {
+        return auditUserName;
+    }
+
+    public void setAuditUserName(String auditUserName) {
+        this.auditUserName = auditUserName;
+    }
 }

+ 14 - 2
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordInfo.java

@@ -294,6 +294,12 @@ public class ExamRecordInfo implements JsonSerializable {
     @ExcelProperty(name = "Ip", width = 30, index = 32)
     private String ip;
 
+    /**
+     * Ip
+     */
+    @ExcelProperty(name = "审核人", width = 30, index = 33)
+    private String auditUserName;
+
 
     public Long getId() {
         return id;
@@ -776,6 +782,12 @@ public class ExamRecordInfo implements JsonSerializable {
 	public void setFaceVerifyResultValue(IsSuccess faceVerifyResultValue) {
 		this.faceVerifyResultValue = faceVerifyResultValue;
 	}
-    
-    
+
+    public String getAuditUserName() {
+        return auditUserName;
+    }
+
+    public void setAuditUserName(String auditUserName) {
+        this.auditUserName = auditUserName;
+    }
 }

+ 11 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordQuery.java

@@ -93,6 +93,9 @@ public class ExamRecordQuery implements JsonSerializable {
     @ApiModelProperty("Ip")
     private String ip;
 
+    @ApiModelProperty("审核人")
+    private String auditUserName;
+
     public ExamRecordQuery addRecordStatus(String recordStatus) {
         if (recordStatuses == null) {
             recordStatuses = new ArrayList<>();
@@ -357,4 +360,12 @@ public class ExamRecordQuery implements JsonSerializable {
     public void setIp(String ip) {
         this.ip = ip;
     }
+
+    public String getAuditUserName() {
+        return auditUserName;
+    }
+
+    public void setAuditUserName(String auditUserName) {
+        this.auditUserName = auditUserName;
+    }
 }

+ 6 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordServiceImpl.java

@@ -210,9 +210,11 @@ public class ExamRecordServiceImpl implements ExamRecordService {
             "record_data.paper_type paper_type," +
             "record_data.paper_struct_id paper_struct_id," +
             "record_data.info_collector info_collector," +
+            "audit.info_collector audit_user_name," +
             "GROUP_CONCAT(DISTINCT process.source_ip) ip" +
             " from ec_oe_exam_record_data record_data " +
             " LEFT JOIN ec_oe_exam_process_record AS process ON record_data.id = process.exam_record_data_id " +
+            " LEFT JOIN ec_oe_exam_audit AS audit ON record_data.id = audit.exam_record_data_id " +
             " where 1=1";
 
     /**
@@ -353,6 +355,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         examRecordData.setFaceVerifyResult(IsSuccess.strToEnum(rs.getString("face_verify_result")));
         examRecordData.setBaiduFaceLivenessSuccessPercent(rs.getDouble("baidu_face_liveness_success_percent"));
         examRecordData.setIp(rs.getString("ip"));
+        examRecordData.setAuditUserName(rs.getString("audit_user_name"));
 
         return examRecordData;
     }
@@ -398,6 +401,9 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         if (StringUtils.isNotBlank(query.getInfoCollector())) {
             sql.append(" and record_data.info_collector LIKE '%" + query.getInfoCollector() + "%'");
         }
+        if (StringUtils.isNotBlank(query.getAuditUserName())) {
+            sql.append(" and audit.audit_user_name LIKE '%" + query.getAuditUserName() + "%'");
+        }
         if (query.getCourseId() != null) {
             sql.append(" and record_data.course_id = " + query.getCourseId());
         }