ocr识别优化

This commit is contained in:
lijia 2024-11-21 16:38:33 +08:00
parent df7a29e54b
commit 65994b8eda

View File

@ -499,7 +499,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
EventBus.getDefault().postSticky(ve);
finish();
ToastUtils.showToast(con, bb.getMsg());
}else{
} else {
ToastUtils.showToast(con, bb.getMsg());
}
CacheGroup.cacheList.remove("bindCarInfo");
@ -976,16 +976,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
if (CacheGroup.cacheList.get(TYPE_NAME[2]) != null) {
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
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 (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 = "";
value1.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(path).into(img1);
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());
Log.e("-cardId-", oCrcarId);
} else {