|
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.domain.Example;
|
|
import org.springframework.data.domain.Example;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -91,6 +92,9 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
@Autowired
|
|
@Autowired
|
|
private FaceBiopsyItemStepRepo faceBiopsyItemStepRepo;
|
|
private FaceBiopsyItemStepRepo faceBiopsyItemStepRepo;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamFaceLiveVerifyRepo examFaceLiveVerifyRepo;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private ExamAuditService examAuditService;
|
|
private ExamAuditService examAuditService;
|
|
|
|
|
|
@@ -230,6 +234,9 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
syncFaceBiopsy(req.getFaceBiopsy(), realExamRecordDataId);
|
|
syncFaceBiopsy(req.getFaceBiopsy(), realExamRecordDataId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //同步C端活体检测记录
|
|
|
|
+ syncFaceLiveVerifyRecords(req.getFaceLiveVerifyRecords(), realExamRecordDataId);
|
|
|
|
+
|
|
startTime = this.debugCost("10 同步face id活体检测数据", transitionExamRecordDataId, startTime);
|
|
startTime = this.debugCost("10 同步face id活体检测数据", transitionExamRecordDataId, startTime);
|
|
|
|
|
|
//同步考试记录对应的试卷结构
|
|
//同步考试记录对应的试卷结构
|
|
@@ -584,6 +591,27 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void syncFaceLiveVerifyRecords(List<FaceLiveVerifyBean> faceLiveVerifyRecords, Long examRecordDataId) {
|
|
|
|
+ if (CollectionUtils.isEmpty(faceLiveVerifyRecords)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (FaceLiveVerifyBean bean : faceLiveVerifyRecords) {
|
|
|
|
+ ExamFaceLiveVerifyEntity entity = new ExamFaceLiveVerifyEntity();
|
|
|
|
+
|
|
|
|
+ entity.setExamRecordDataId(examRecordDataId);
|
|
|
|
+ entity.setStatus(FaceLiveVerifyStatus.valueOf(bean.getStatus()));
|
|
|
|
+ entity.setFaceCount(bean.getFaceCount());
|
|
|
|
+ entity.setSimilarity(bean.getSimilarity());
|
|
|
|
+ entity.setRealness(bean.getRealness());
|
|
|
|
+ entity.setErrorMsg(bean.getErrorMsg());
|
|
|
|
+ entity.setProcessTime(bean.getProcessTime());
|
|
|
|
+ entity.setActions(bean.getActions());
|
|
|
|
+
|
|
|
|
+ examFaceLiveVerifyRepo.save(entity);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private FaceBiopsyEntity copyFaceBiopsyFrom(FaceBiopsyBean bean, Long examRecordDataId) {
|
|
private FaceBiopsyEntity copyFaceBiopsyFrom(FaceBiopsyBean bean, Long examRecordDataId) {
|
|
FaceBiopsyEntity entity = new FaceBiopsyEntity();
|
|
FaceBiopsyEntity entity = new FaceBiopsyEntity();
|
|
entity.setRootOrgId(bean.getRootOrgId());
|
|
entity.setRootOrgId(bean.getRootOrgId());
|