新增司机,车辆显示错乱修复

This commit is contained in:
lijia 2024-07-15 11:29:21 +08:00
parent c1355629eb
commit 0d3e35d6f7
3 changed files with 44 additions and 5 deletions

View File

@ -66,6 +66,7 @@ public class CarDelBean {
private String owner; private String owner;
private String roadLicense; private String roadLicense;
private String roadLicensePhoto; private String roadLicensePhoto;
private String trailerLicenseId;
private String policyPhotoUrl; private String policyPhotoUrl;
private String insuranceCompany; private String insuranceCompany;
@ -83,6 +84,14 @@ public class CarDelBean {
private String carPlateColorValue; private String carPlateColorValue;
private String needUpQCPhoto; private String needUpQCPhoto;
public String getTrailerLicenseId() {
return trailerLicenseId;
}
public void setTrailerLicenseId(String trailerLicenseId) {
this.trailerLicenseId = trailerLicenseId;
}
public String getNeedUpQCPhoto() { public String getNeedUpQCPhoto() {
return needUpQCPhoto; return needUpQCPhoto;
} }
@ -299,6 +308,15 @@ public class CarDelBean {
private String threeImage; private String threeImage;
private String type; private String type;
private String vehicleNumber; private String vehicleNumber;
private String trailerLicenseId;
public String getTrailerLicenseId() {
return trailerLicenseId;
}
public void setTrailerLicenseId(String trailerLicenseId) {
this.trailerLicenseId = trailerLicenseId;
}
public String getBackImage() { public String getBackImage() {
return backImage == null ? "" : backImage; return backImage == null ? "" : backImage;

View File

@ -62,6 +62,15 @@ public class OCRVehicleLicenseBean {
private String type; private String type;
private String url; private String url;
private String vehicleNumber; private String vehicleNumber;
private String licenseId;
public String getLicenseId() {
return licenseId;
}
public void setLicenseId(String licenseId) {
this.licenseId = licenseId;
}
private DataDto2 existCarInfo; private DataDto2 existCarInfo;

View File

@ -357,9 +357,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
}//Log.e("url",CacheGroup.cacheList.get("authUrl")); }//Log.e("url",CacheGroup.cacheList.get("authUrl"));
CacheGroup.cacheList.remove("authUrl"); CacheGroup.cacheList.remove("authUrl");
} else { } else {
//重复代码 //重复代码?
// initView(null); initView(null);
// initData(); if (!(CacheGroup.cacheList.get(TYPE_NAME_BANK[2]) != null || CacheGroup.cacheList.get(TYPE_NAME_BANK[3]) != null)) {
initData();
}
pathOrcRes(); pathOrcRes();
} }
break; break;
@ -437,6 +439,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
// there_div.setVisibility(View.VISIBLE); // there_div.setVisibility(View.VISIBLE);
if (c_str != null && !c_str.equals("")) { if (c_str != null && !c_str.equals("")) {
cdb = gson.fromJson(c_str, CarDelBean.class); cdb = gson.fromJson(c_str, CarDelBean.class);
oCrcarId = cdb.getData().getTrailerResVo().getTrailerLicenseId() + "";
initView(null); initView(null);
initData(); initData();
} else { } else {
@ -834,7 +837,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
value1.setEnabled(false); value1.setEnabled(false);
Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2); Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2);
url2 = olb.getData().getExistCarInfo().getBackImage(); url2 = olb.getData().getExistCarInfo().getBackImage();
ToastUtils.showLongToast(con,"该车辆已存在,请仔细核对相关信息"); ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
} else { } else {
value1.setEnabled(true); value1.setEnabled(true);
} }
@ -933,7 +936,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
customDialog.dismiss(); customDialog.dismiss();
return; return;
} }
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist()); // if (cdb != null && cdb.getData().getTrailerResVo() &&cdb.getRes() == 1)
boolean isExist = false;
if (olb != null) {//主页识别成功后获取
isExist = olb.getData().isCarExist();
} else {
if (cdb != null && cdb.getData().getTrailerResVo() != null && cdb.getRes() == 1) {//上个页面带来数据
isExist = true;
}
}
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
} else { } else {
new AuthRequest().upload(con, hd, new File(path)); new AuthRequest().upload(con, hd, new File(path));
} }