ocr识别优化
This commit is contained in:
parent
df7a29e54b
commit
65994b8eda
@ -499,7 +499,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
EventBus.getDefault().postSticky(ve);
|
EventBus.getDefault().postSticky(ve);
|
||||||
finish();
|
finish();
|
||||||
ToastUtils.showToast(con, bb.getMsg());
|
ToastUtils.showToast(con, bb.getMsg());
|
||||||
}else{
|
} else {
|
||||||
ToastUtils.showToast(con, bb.getMsg());
|
ToastUtils.showToast(con, bb.getMsg());
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("bindCarInfo");
|
CacheGroup.cacheList.remove("bindCarInfo");
|
||||||
@ -976,16 +976,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if (CacheGroup.cacheList.get(TYPE_NAME[2]) != null) {
|
if (CacheGroup.cacheList.get(TYPE_NAME[2]) != null) {
|
||||||
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
||||||
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
||||||
if (2==index&&olb.getData().getVclN().contains("挂")){
|
|
||||||
Toast.makeText(con,"该证件为挂车,请上传行驶证证件",Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (3==index&&!olb.getData().getVclN().contains("挂")){
|
|
||||||
Toast.makeText(con,"未识别到挂车相关信息,请上传挂车行驶证证件",Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (olb.getCode() == 200 && olb.getData() != null) {
|
if (olb.getCode() == 200 && olb.getData() != null) {
|
||||||
|
if (2 == index && olb.getData().getVclN().contains("挂")) {
|
||||||
|
Toast.makeText(con, "该证件为挂车,请上传行驶证证件", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (3 == index && !olb.getData().getVclN().contains("挂")) {
|
||||||
|
Toast.makeText(con, "未识别到挂车相关信息,请上传挂车行驶证证件", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
carExistCarId = "";
|
carExistCarId = "";
|
||||||
value1.setEnabled(true);
|
value1.setEnabled(true);
|
||||||
value2.setEnabled(true);
|
value2.setEnabled(true);
|
||||||
@ -1002,7 +1002,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
// Glide.with(con).load(url1).into(img1);
|
// Glide.with(con).load(url1).into(img1);
|
||||||
Glide.with(con).load(path).into(img1);
|
Glide.with(con).load(path).into(img1);
|
||||||
oCrcarId = olb.getData().getCarId() + "";
|
oCrcarId = olb.getData().getCarId() + "";
|
||||||
if (!TextUtils.isEmpty(olb.getData().getVclN())&&!olb.getData().getVclN().contains("挂"))
|
if (!TextUtils.isEmpty(olb.getData().getVclN()) && !olb.getData().getVclN().contains("挂"))
|
||||||
new AuthRequest().getCarInfo(con, hd, olb.getData().getVclN());
|
new AuthRequest().getCarInfo(con, hd, olb.getData().getVclN());
|
||||||
Log.e("-cardId-", oCrcarId);
|
Log.e("-cardId-", oCrcarId);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user