添加挂车优化

This commit is contained in:
lijia 2024-11-22 16:35:54 +08:00
parent c6005ee9a1
commit 2da410bcd4
2 changed files with 21 additions and 1 deletions

View File

@ -99,10 +99,19 @@ public class CarInfoBean2 implements Serializable {
private String threeImageStatus;
private String towAuality;
private String trailer;
private String trailerId;
private String type;
private String vehicleAxis;
private String vehicleNumber;
public String getTrailerId() {
return trailerId;
}
public void setTrailerId(String trailerId) {
this.trailerId = trailerId;
}
public String getAllAuality() {
return allAuality;
}

View File

@ -125,6 +125,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
private int[] typeImgTwo = {R.mipmap.id_back, R.mipmap.license_back, R.mipmap.vehicle_license_back, R.mipmap.vehicle_license_back};
private int index = 0;
private String carExistCarId = "";
private String trailerId = "";
private DicBean.DataDTO curColor, curEnergy;
private TextView zj_name, zjimg_name, zjimg2_name, zj_name2, zj_name3;
private TextView name1, name2, name3, name4, value5, value6;
@ -489,6 +490,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
if (bb.getCode() == 200 && bb.getData() != null) {
if (!TextUtils.isEmpty(bb.getData().getCarId())) {
carExistCarId = bb.getData().getCarId();
trailerId = bb.getData().getTrailerId();
value1.setEnabled(false);
value2.setEnabled(false);
value3.setEnabled(false);
@ -510,7 +512,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
if (bb.getCode() == 200) {
VehicleEvent ve = new VehicleEvent(String.valueOf(carExistCarId));
EventBus.getDefault().postSticky(ve);
finish();
if (("0".equals(trailerId)||TextUtils.isEmpty(trailerId)) && value2.getText().toString().contains("")) {
Intent in = new Intent(con, CertificatesActivity.class);
in.putExtra("index", 3);
in.putExtra("carId", carExistCarId);
startActivity(in);
finish();
} else {
finish();
}
ToastUtils.showToast(con, bb.getMsg());
} else {
ToastUtils.showToast(con, bb.getMsg());