修改--身份证识别性别定义为字符串
This commit is contained in:
parent
4bfe2c5a5e
commit
c4a8463e58
|
|
@ -23,7 +23,7 @@ public class AiIdcardrecognizeResult {
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 用户性别,'0' 表示男性,'1' 表示女性 */
|
/** 用户性别,'0' 表示男性,'1' 表示女性 */
|
||||||
private char sex;
|
private String sex;
|
||||||
|
|
||||||
/** 用户民族 */
|
/** 用户民族 */
|
||||||
private String enthnic;
|
private String enthnic;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ public class IdCardVo {
|
||||||
private String issuingAuthority;
|
private String issuingAuthority;
|
||||||
private String validTime;
|
private String validTime;
|
||||||
private String name;
|
private String name;
|
||||||
private char gender;
|
private String gender;
|
||||||
private String ethnicity;
|
private String ethnicity;
|
||||||
private String dateOfBirth;
|
private String dateOfBirth;
|
||||||
private String address;
|
private String address;
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,8 @@ public class OcrRecogServiceImpl implements IOcrRecogService {
|
||||||
// 解析转义字符
|
// 解析转义字符
|
||||||
json = StringEscapeUtils.unescapeJava(json);
|
json = StringEscapeUtils.unescapeJava(json);
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
return gson.fromJson(json, IdCardVo.class);
|
IdCardVo idCardVo = gson.fromJson(json, IdCardVo.class);//此方法 如果里面为空 错误 解决
|
||||||
|
return idCardVo;
|
||||||
}
|
}
|
||||||
private void saveRecognitionResult(IdCardVo idCardVo, char ifComplete, String frontFileName, String backFileName,long startTime) {
|
private void saveRecognitionResult(IdCardVo idCardVo, char ifComplete, String frontFileName, String backFileName,long startTime) {
|
||||||
String idNumber = idCardVo.getData().getIdNumber();
|
String idNumber = idCardVo.getData().getIdNumber();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue