ocr识别优化

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

View File

@ -976,6 +976,7 @@ 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 (olb.getCode() == 200 && olb.getData() != null) {
if (2 == index && olb.getData().getVclN().contains("")) { if (2 == index && olb.getData().getVclN().contains("")) {
Toast.makeText(con, "该证件为挂车,请上传行驶证证件", Toast.LENGTH_SHORT).show(); Toast.makeText(con, "该证件为挂车,请上传行驶证证件", Toast.LENGTH_SHORT).show();
return; return;
@ -985,7 +986,6 @@ public class CertificatesActivity extends BaseAppCompatActivity {
Toast.makeText(con, "未识别到挂车相关信息,请上传挂车行驶证证件", Toast.LENGTH_SHORT).show(); Toast.makeText(con, "未识别到挂车相关信息,请上传挂车行驶证证件", Toast.LENGTH_SHORT).show();
return; return;
} }
if (olb.getCode() == 200 && olb.getData() != null) {
carExistCarId = ""; carExistCarId = "";
value1.setEnabled(true); value1.setEnabled(true);
value2.setEnabled(true); value2.setEnabled(true);