检验检测报告识别
Go to file
黄仁欢 c7d1d2ec80 feat(java): add Flask API integration components
NEW FILES - Python-First Architecture Support:

1. FlaskOCRClient.java (HTTP Client):
   - REST client for communicating with Python Flask API
   - POST /api/ocr/pdf - PDF processing endpoint
   - Configurable baseUrl and timeout
   - Error handling and response parsing
   - Methods: processPdf(), processImage(), healthCheck()

2. FlaskOCRResponse.java (Response DTO):
   - Data transfer object for Flask API responses
   - Fields: success, cma, institutions, seals, error
   - JSON serialization support

3. FlaskOCRVerboseResponse.java (Verbose Response DTO):
   - Extended response with detailed processing steps
   - Includes timing metrics for each processing stage
   - Used for debugging and performance analysis

4. OCRResultMessage.java (Message Entity):
   - Message format for OCR results
   - Used in async processing (if needed)

5. OCRTaskMessage.java (Task Message):
   - Message format for OCR task requests
   - Used in async processing (if needed)

USAGE:
These components are used by OcrService to communicate with
the Python Flask API server running on localhost:8081.

Example:
```java
FlaskOCRClient client = new FlaskOCRClient("http://localhost:8081");
FlaskOCRResponse response = client.processPdf(pdfPath, outputDir);
String cmaCode = response.getCma().getCode();
List<String> institutions = response.getInstitutions();
```

ARCHITECTURE:
Java Backend → FlaskOCRClient → HTTP → Flask API → PaddleOCR

DEPENDENCIES:
- Spring RestTemplate (for HTTP calls)
- Jackson (for JSON serialization)
- No additional OCR libraries required in Java

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 09:57:34 +08:00
archive chore(project): conservative cleanup - archive temp scripts and old docs 2026-03-03 14:35:06 +08:00
data 暂存 2026-02-05 13:57:22 +08:00
report_viz chore(project): conservative cleanup - archive temp scripts and old docs 2026-03-03 14:35:06 +08:00
scripts 暂存 2026-02-05 13:57:22 +08:00
src feat(java): add Flask API integration components 2026-03-05 09:57:34 +08:00
template feat(resources): add critical CMA logo template file 2026-03-05 09:54:49 +08:00
.gitignore feat(resources): add critical CMA logo template file 2026-03-05 09:54:49 +08:00
CLEANUP_COMPLETE.md docs(cleanup): add cleanup completion report 2026-03-03 14:35:50 +08:00
CLEANUP_PLAN.md docs(test): add comprehensive documentation for batch testing script 2026-03-03 14:32:04 +08:00
IMPLEMENTATION_SUMMARY.md chore(project): conservative cleanup - archive temp scripts and old docs 2026-03-03 14:35:06 +08:00
TEST_ACCURACY_BATCH_DEPENDENCIES.md docs(test): add comprehensive documentation for batch testing script 2026-03-03 14:32:04 +08:00
TEST_ACCURACY_BATCH_README.md docs(test): add comprehensive documentation for batch testing script 2026-03-03 14:32:04 +08:00
cma_extraction_final.py feat(cma): add CMA extraction module fallback implementation 2026-03-03 14:51:58 +08:00
cma_extraction_template_primary.py chore(project): conservative cleanup - archive temp scripts and old docs 2026-03-03 14:35:06 +08:00
pom.xml feat(java): implement Python-First OCR architecture 2026-03-05 09:56:40 +08:00
settings.xml chore(project): conservative cleanup - archive temp scripts and old docs 2026-03-03 14:35:06 +08:00
test_accuracy_batch_full.py fix(ocr): remove multiprocessing to fix Windows Queue synchronization issue 2026-03-05 09:52:45 +08:00