Browse Source

同步照片的展示代码补充

lideyin 5 năm trước cách đây
mục cha
commit
42e6f5ad39

+ 13 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examcapture/ExamCaptureAuditInfo.java

@@ -100,6 +100,11 @@ public class ExamCaptureAuditInfo implements JsonSerializable {
      */
     private String virtualCameraNames;
 
+/**
+     * 同步抓拍照片URL
+     */
+    private String syncCaptureFileUrl;
+
     /**
      * 学习中心名称
      */
@@ -291,6 +296,14 @@ public class ExamCaptureAuditInfo implements JsonSerializable {
 	public void setVirtualCameraNames(String virtualCameraNames) {
 		this.virtualCameraNames = virtualCameraNames;
 	}
+	
+	public String getSyncCaptureFileUrl() {
+        return syncCaptureFileUrl;
+    }
+
+    public void setSyncCaptureFileUrl(String syncCaptureFileUrl) {
+        this.syncCaptureFileUrl = syncCaptureFileUrl;
+    }
 
     public String getOrgName() {
         return orgName;

+ 17 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamCaptureServiceImpl.java

@@ -11,9 +11,11 @@ import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamCaptureRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
+import cn.com.qmth.examcloud.core.oe.admin.dao.ExamSyncCaptureRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamAuditEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamCaptureEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamSyncCaptureEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.AuditStatus;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamAuditService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamCaptureService;
@@ -25,7 +27,6 @@ import cn.com.qmth.examcloud.support.cache.CacheHelper;
 import cn.com.qmth.examcloud.support.cache.bean.ExamStudentCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.OrgCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
-import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
@@ -54,6 +55,8 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
     private ExamAuditService examAuditService;
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
+    @Autowired
+    private ExamSyncCaptureRepo examSyncCaptureRepo;
 
     @Override
     public ExamCaptureAuditInfo getExamCaptureAuditDetail(Long examRecordDataId) {
@@ -105,6 +108,9 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
         }
         detail.setVirtualCameraNames(getVirtualCameraNames(examRecordDataId));
 
+		//同步人脸比较时抓拍照片的url
+        detail.setSyncCaptureFileUrl(getSyncCaptureFileUrl(examRecordDataId));
+
         //组织机构
         OrgCacheBean org = CacheHelper.getOrg(recordData.getOrgId());
         detail.setOrgName(org.getName());
@@ -119,6 +125,16 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
         return detail;
     }
 
+    //获取同步时抓拍的照片
+    private String getSyncCaptureFileUrl(Long examRecordDataId) {
+        ExamSyncCaptureEntity syncCapture = examSyncCaptureRepo.findByExamRecordDataId(examRecordDataId);
+        if (null == syncCapture) {
+            return null;
+        }
+
+        return syncCapture.getFileUrl();
+    }
+    
     /**
      * 获取虚拟摄像头名称
      * @param examRecordDataId