|
|
@@ -174,9 +174,9 @@ public class VerificationRuleManagerImpl extends AbstractCommManager implements |
|
|
|
*/ |
|
|
|
public void ocrVarifyIdCard(String name, String idNum, String imagUrl, String ocrId, StringBuilder builder, String msg) { |
|
|
|
OcrResult exist = ocrResultRepo.findByUrlAndType(imagUrl, OcrType.id_front); |
|
|
|
if (exist == null) exist = ocrResultRepo.findById(ocrId).orElse(null); |
|
|
|
if (exist == null) { |
|
|
|
exist = ocrResultRepo.findById(ocrId).orElse(null); |
|
|
|
if (exist == null) builder.append(msg+"证件正面照未找到识别结果;"); |
|
|
|
builder.append(msg + "证件正面照未找到识别结果;"); |
|
|
|
} else { |
|
|
|
try { |
|
|
|
IdCardOcrResponse res = JsonTools.json2Object(exist.getResult(), IdCardOcrResponse.class); |
|
|
@@ -215,9 +215,9 @@ public class VerificationRuleManagerImpl extends AbstractCommManager implements |
|
|
|
*/ |
|
|
|
public void ocrVarifyBusinessLicense(String name,String busNum, String imagUrl,String ocrId, StringBuilder builder, String msg) { |
|
|
|
OcrResult exist = ocrResultRepo.findByUrlAndType(imagUrl, OcrType.business_license); |
|
|
|
if (exist == null) { |
|
|
|
exist = ocrResultRepo.findById(ocrId).orElse(null); |
|
|
|
if (exist == null) builder.append(msg+"营业执照未找到识别结果;"); |
|
|
|
if (exist == null) exist = ocrResultRepo.findById(ocrId).orElse(null); |
|
|
|
if (exist == null){ |
|
|
|
builder.append(msg+"营业执照未找到识别结果;"); |
|
|
|
} else { |
|
|
|
try { |
|
|
|
BusinessLicenseOcrResponse res = JsonTools.json2Object(exist.getResult(), BusinessLicenseOcrResponse.class); |