提交修改
This commit is contained in:
parent
adc9b5a428
commit
fd960804e8
@ -50,6 +50,12 @@ public class BDocAnalysisOfficeResp extends BBaseResp {
|
||||
@JsonProperty("log_id")
|
||||
private String ofdFileSize;
|
||||
|
||||
|
||||
@JsonProperty("error_msg")
|
||||
private String errorMsg;
|
||||
|
||||
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class UnderlineDTO {
|
||||
|
||||
@ -162,6 +162,9 @@ public class BGeneralBasicResp {
|
||||
private Integer wordsResultNum;
|
||||
@JsonProperty("log_id")
|
||||
private String logId;
|
||||
@JsonProperty("error_msg")
|
||||
private String errorMsg;
|
||||
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
|
||||
@ -21,7 +21,7 @@ import java.util.List;
|
||||
|
||||
/***
|
||||
* 银行卡三要素核验
|
||||
*https://market.aliyun.com/apimarket/detail/cmapi00066584#sku=yuncode60584000011
|
||||
*
|
||||
*
|
||||
* *
|
||||
* *银行卡二要素核验
|
||||
@ -53,8 +53,25 @@ public class GeneralBasicOcrController extends BaseController {
|
||||
//generalBasicOcrRequest.setImageBase64(a);
|
||||
|
||||
|
||||
BGeneralBasicRequest bGeneralBasicRequest = new BGeneralBasicRequest();
|
||||
//generalBasicOcrRequest.setImageBase64(null);
|
||||
|
||||
//generalBasicOcrRequest.setImageUrl("https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg");
|
||||
|
||||
|
||||
|
||||
|
||||
// 读取文件内容到Stream流中,按行读取
|
||||
//Stream<String> lines = Files.lines(Paths.get("/Users/quyixiao/gitb/eb-service-api/api-web/api-interface/src/main/resources/pdfbase64.txt"));
|
||||
|
||||
|
||||
//String a = lines.collect(Collectors.joining());
|
||||
|
||||
|
||||
//log.info("imagebase64:{}", a);
|
||||
//generalBasicOcrRequest.setImageBase64(null);
|
||||
//generalBasicOcrRequest.setPdfFile("xxxxxx");
|
||||
|
||||
BGeneralBasicRequest bGeneralBasicRequest = new BGeneralBasicRequest();
|
||||
bGeneralBasicRequest.setImageBase64(generalBasicOcrRequest.getImageBase64());
|
||||
bGeneralBasicRequest.setImageUrl(generalBasicOcrRequest.getImageUrl());
|
||||
bGeneralBasicRequest.setPdfFile(generalBasicOcrRequest.getPdfFile());
|
||||
@ -73,9 +90,9 @@ public class GeneralBasicOcrController extends BaseController {
|
||||
}
|
||||
return R.ok().setData(list);
|
||||
}
|
||||
|
||||
return R.ok().setMsg(bGeneralBasicResp.getErrorMsg());
|
||||
}
|
||||
return R.ok();
|
||||
return R.error(aR.getErrorMsg());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -32,21 +32,20 @@ public class HighPrecisionOcrController {
|
||||
|
||||
|
||||
// http://localhost:8888/high/precision/orc/recognize?imageBase64=3232
|
||||
// https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg
|
||||
@EbAuthentication(tencent = ApiConstants.TENCENT_AUTH)
|
||||
@RequestMapping("/recognize")
|
||||
public R recognize(HighPrecisionOcrRequest generalBasicOcrRequest) throws Exception {
|
||||
|
||||
|
||||
// 读取文件内容到Stream流中,按行读取
|
||||
//Stream<String> lines = Files.lines(Paths.get("/Users/quyixiao/gitb/eb-service-api/api-web/api-interface/src/main/resources/filebase64.txt"));
|
||||
|
||||
|
||||
//String a = lines.collect(Collectors.joining());
|
||||
|
||||
//Stream<String> lines = Files.lines(Paths.get("/Users/quyixiao/gitb/eb-service-api/api-web/api-interface/src/main/resources/pdfbase64.txt"));
|
||||
|
||||
//String a = lines.collect(Colle
|
||||
// ctors.joining());
|
||||
//log.info("imagebase64:{}", a);
|
||||
//generalBasicOcrRequest.setImageBase64(a);
|
||||
|
||||
//generalBasicOcrRequest.setImageBase64(null);
|
||||
//generalBasicOcrRequest.setPdfFile("xxxxxxxxx");
|
||||
//generalBasicOcrRequest.setImageUrl("https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg");
|
||||
|
||||
|
||||
BDocAnalysisOfficeRequest bGeneralBasicRequest = new BDocAnalysisOfficeRequest();
|
||||
@ -93,10 +92,13 @@ public class HighPrecisionOcrController {
|
||||
list.add(highPrecisionOcrResp);
|
||||
}
|
||||
}
|
||||
return R.ok().setData(list);
|
||||
}
|
||||
return R.ok().setData(list);
|
||||
|
||||
return R.ok().setMsg(bGeneralBasicResp.getErrorMsg());
|
||||
|
||||
}
|
||||
return R.error("识别错误");
|
||||
return R.error(aR.getErrorMsg());
|
||||
}
|
||||
|
||||
|
||||
|
||||
1
api-web/api-interface/src/main/resources/pdfbase64.txt
Normal file
1
api-web/api-interface/src/main/resources/pdfbase64.txt
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user