qiubh 4 일 전
부모
커밋
a02d89e48f

+ 2
- 2
gly-base-core/src/main/java/cn/com/taiji/core/entity/comm/OcrResult.java 파일 보기

private String code; private String code;
@Column(name = "OCR_SERVICE_TYPE") @Column(name = "OCR_SERVICE_TYPE")
private Integer ocrServiceType=1;// 1-百度 2-太极 private Integer ocrServiceType=1;// 1-百度 2-太极
@Column(name = "RESULT_ID")
private String resultId;
// @Column(name = "RESULT_ID")
// private String resultId;


} }

+ 7
- 4
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/AbstractUserwManager.java 파일 보기

req.setUrl(imagePath); req.setUrl(imagePath);
try { try {
IdCardOcrResponse res = jsonPostRepeat(req); IdCardOcrResponse res = jsonPostRepeat(req);
ocrResult.setResult(res.toJson());
ocrResult.setResult(res.getBizContent());
ocrResult.setCode(res.getRespCode()); ocrResult.setCode(res.getRespCode());
ocrResultRepo.save(ocrResult); ocrResultRepo.save(ocrResult);
res.setOcrResultId(ocrResult.getId());
return res; return res;
} catch (ServiceHandleException e) { } catch (ServiceHandleException e) {
throw new ManagerException("身份证OCR识别异常"); throw new ManagerException("身份证OCR识别异常");
req.setUrl(imagePath); req.setUrl(imagePath);
try { try {
VehicleLicenseOcrResponse res = jsonPostRepeat(req); VehicleLicenseOcrResponse res = jsonPostRepeat(req);
ocrResult.setResult(res.toJson());
ocrResult.setResult(res.getBizContent());
ocrResult.setCode(res.getRespCode()); ocrResult.setCode(res.getRespCode());
ocrResultRepo.save(ocrResult); ocrResultRepo.save(ocrResult);
res.setOcrResultId(ocrResult.getId());
return res; return res;
} catch (ServiceHandleException e) { } catch (ServiceHandleException e) {
throw new ManagerException("行驶证OCR识别异常"); throw new ManagerException("行驶证OCR识别异常");
req.setUrl(imagePath); req.setUrl(imagePath);
try { try {
BusinessLicenseOcrResponse res = jsonPostRepeat(req); BusinessLicenseOcrResponse res = jsonPostRepeat(req);
ocrResult.setResult(res.toJson());
ocrResult.setResult(res.getBizContent());
ocrResult.setCode(res.getRespCode()); ocrResult.setCode(res.getRespCode());
ocrResultRepo.save(ocrResult); ocrResultRepo.save(ocrResult);
return res;
res.setOcrResultId(ocrResult.getId());
return res;
} catch (ServiceHandleException e) { } catch (ServiceHandleException e) {
throw new ManagerException("营业执照OCR识别异常"); throw new ManagerException("营业执照OCR识别异常");
} }

Loading…
취소
저장