|
|
|
@ -3,11 +3,14 @@ package com.docus.server.service.handler;
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
|
import com.docus.log.annotation.TrackRetryListener;
|
|
|
|
|
import com.docus.server.api.ocr.OcrApi;
|
|
|
|
|
import com.docus.server.entity.segmentation.OcrBasicTest;
|
|
|
|
|
import com.docus.server.entity.segmentation.OcrFileInfoTest;
|
|
|
|
|
import com.docus.server.entity.segmentation.OcrRuleResult;
|
|
|
|
|
import com.docus.server.entity.segmentation.OcrSpecialResult;
|
|
|
|
|
import com.docus.server.enums.OcrStatusEnum;
|
|
|
|
|
import com.docus.server.infrastructure.dao.IOcrBasicTestDao;
|
|
|
|
|
import com.docus.server.infrastructure.dao.IOcrFileInfoTestDao;
|
|
|
|
|
import com.docus.server.service.IOcrBasicTestService;
|
|
|
|
|
import com.docus.server.service.IOcrRuleTestService;
|
|
|
|
|
import com.docus.server.service.IOcrSpecialRuleTestService;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
@ -29,6 +32,8 @@ public class StartOcrTestHandler {
|
|
|
|
|
private IOcrSpecialRuleTestService iOcrSpecialRuleTestService;
|
|
|
|
|
@Resource
|
|
|
|
|
private IOcrRuleTestService iOcrRuleTestService;
|
|
|
|
|
@Resource
|
|
|
|
|
private IOcrBasicTestDao iOcrBasicTestDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@TrackRetryListener("START_OCR_TEST")
|
|
|
|
@ -37,6 +42,7 @@ public class StartOcrTestHandler {
|
|
|
|
|
OcrSpecialResult lastSpecialResul = null;
|
|
|
|
|
|
|
|
|
|
//根据病案号查询文件列表
|
|
|
|
|
OcrBasicTest ocrBasicTest = iOcrBasicTestDao.findBy("patientId",patientId).get(0);
|
|
|
|
|
List<OcrFileInfoTest> fileInfoTestList = iOcrFileInfoTestDao.findBy("patientId", patientId);
|
|
|
|
|
for (OcrFileInfoTest fileInfoTest : fileInfoTestList) {
|
|
|
|
|
|
|
|
|
@ -84,7 +90,11 @@ public class StartOcrTestHandler {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//更新数据库表
|
|
|
|
|
ocrBasicTest.setOcrFinishTime(new Date());
|
|
|
|
|
ocrBasicTest.setOcrStatue(OcrStatusEnum.COMPLETE);
|
|
|
|
|
|
|
|
|
|
iOcrFileInfoTestDao.updateBatchById(fileInfoTestList, 1000);
|
|
|
|
|
iOcrBasicTestDao.updateById(ocrBasicTest);
|
|
|
|
|
|
|
|
|
|
return fileInfoTestList;
|
|
|
|
|
}
|
|
|
|
|