|
@@ -435,16 +435,19 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
@Transactional
|
|
|
public void syncFaceBiopsy(FaceBiopsyBean faceBiopsy, Long examRecordDataId) {
|
|
|
FaceBiopsyEntity faceBiopsyEntity = copyFaceBiopsyFrom(faceBiopsy, examRecordDataId);
|
|
|
- faceBiopsyRepo.save(faceBiopsyEntity);
|
|
|
+ faceBiopsyRepo.saveAndFlush(faceBiopsyEntity);
|
|
|
|
|
|
for (FaceBiopsyItemBean itemBean : faceBiopsy.getFaceBiopsyItems()) {
|
|
|
FaceBiopsyItemEntity faceBiopsyItemEntity = copyFaceBiopsyItemFrom(
|
|
|
itemBean, faceBiopsyEntity.getId(), examRecordDataId);
|
|
|
- faceBiopsyItemRepo.save(faceBiopsyItemEntity);
|
|
|
+ faceBiopsyItemRepo.saveAndFlush(faceBiopsyItemEntity);
|
|
|
|
|
|
List<FaceBiopsyItemStepEntity> faceBiopsyItemStepEntityList = copyFaceBiopsyItemStepFrom(
|
|
|
itemBean.getFaceBiopsyItemSteps(), faceBiopsyItemEntity.getId(), examRecordDataId);
|
|
|
- faceBiopsyItemStepRepo.saveAll(faceBiopsyItemStepEntityList);
|
|
|
+ for (FaceBiopsyItemStepEntity fbis : faceBiopsyItemStepEntityList) {
|
|
|
+ faceBiopsyItemStepRepo.saveAndFlush(fbis);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -501,7 +504,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
for (ExamFaceLivenessVerifyBean bean : examFaceLivenessVerifies) {
|
|
|
ExamFaceLivenessVerifyEntity entity = copyExamFaceLivenessVerifyFrom(bean, examRecordDataId);
|
|
|
|
|
|
- examFaceLivenessVerifyRepo.save(entity);
|
|
|
+ examFaceLivenessVerifyRepo.saveAndFlush(entity);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -529,7 +532,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
private void syncExamSyncCapture(ExamSyncCaptureBean examSyncCapture, Long examRecordDataId) {
|
|
|
ExamSyncCaptureEntity examSyncCaptureEntity = copyExamSyncCaptureFrom(examSyncCapture, examRecordDataId);
|
|
|
|
|
|
- examSyncCaptureRepo.save(examSyncCaptureEntity);
|
|
|
+ examSyncCaptureRepo.saveAndFlush(examSyncCaptureEntity);
|
|
|
}
|
|
|
|
|
|
private ExamSyncCaptureEntity copyExamSyncCaptureFrom(ExamSyncCaptureBean examSyncCapture, Long examRecordDataId) {
|
|
@@ -554,7 +557,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
private void syncExamCapture(List<ExamCaptureBean> examCaptures, Long examRecordDataId) {
|
|
|
for (ExamCaptureBean bean : examCaptures) {
|
|
|
ExamCaptureEntity examCaptureEntity = copyExamCaptureFrom(bean, examRecordDataId);
|
|
|
- examCaptureRepo.save(examCaptureEntity);
|
|
|
+ examCaptureRepo.saveAndFlush(examCaptureEntity);
|
|
|
}
|
|
|
}
|
|
|
|