lideyin 5 年之前
父节点
当前提交
5036a91ac5

+ 8 - 5
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/FaceBiopsyServiceImpl.java

@@ -85,20 +85,23 @@ public class FaceBiopsyServiceImpl implements FaceBiopsyService {
             return result;
         }
 
-        //已活检次数
+        //不存在未完成的活检的校验逻辑
+        // 已活检次数
         int verifiedTimes = faceBiopsyEntity.getVerifiedTimes();
         if (verifiedTimes == 1) {
             FaceBiopsyItemEntity firstFaceBiopsyItem =
                     faceBiopsyItemRepo.findFirstByFaceBiopsyIdOrderByIdAsc(faceBiopsyEntity.getId());
-            if (firstFaceBiopsyItem.getInFreezeTime() && null != firstFaceBiopsyItem.getResult()
-                    && firstFaceBiopsyItem.getResult()) {
+            if (null != firstFaceBiopsyItem.getResult() && firstFaceBiopsyItem.getResult()) {
                 //第一次活检成功,且未开启追加新活检,再次调用,则抛出异常
                 if (!isAddFaceVerifyOutFreezeTime(examRecordDataId)) {
                     throw new StatusException("201006", "非法请求,无活体检测机会");
                 }
-                //第一次活检成功,且开启追加新活检,再次调用,生成新的活检步骤
-                return appendFaceBiopsy(faceBiopsyEntity.getId(), verifiedTimes, examRecordDataId, faceBiopsyType, true);
+                //第一次活检成功,且开启追加新活检,再次调用,按冻结时间外生成新的活检步骤
+                return appendFaceBiopsy(faceBiopsyEntity.getId(), verifiedTimes, examRecordDataId, faceBiopsyType, false);
             }
+
+            //如果第一次活检失败,再次调用,按冻结时间内生成新的活检步骤
+            return appendFaceBiopsy(faceBiopsyEntity.getId(), verifiedTimes, examRecordDataId, faceBiopsyType, true);
         }
         if (verifiedTimes == 2) {
             FaceBiopsyItemEntity secondFaceBiopsyItem =