行驶证存在添加绑定逻辑
This commit is contained in:
parent
95667723e9
commit
97e0c5f629
@ -0,0 +1,386 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName CarInfoBean2
|
||||
* @Author john
|
||||
* @Date 2024/11/20 15:43
|
||||
* @Description TODO
|
||||
*/
|
||||
public class CarInfoBean2 implements Serializable {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private String remark;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String allAuality;
|
||||
private String allCapacity;
|
||||
private String approvedCapacity;
|
||||
private String auditStatus;
|
||||
private String auditTime;
|
||||
private String backImage;
|
||||
private String backStatus;
|
||||
private String backTime;
|
||||
private String carId;
|
||||
private String carNumber;
|
||||
private String checkRecord;
|
||||
private String createTime;
|
||||
private String dateIssue;
|
||||
private String engineNumber;
|
||||
private String fileNumber;
|
||||
private String frontImage;
|
||||
private String frontStatus;
|
||||
private String frontTime;
|
||||
private String fuelType;
|
||||
private String id;
|
||||
private String model;
|
||||
private String nature;
|
||||
private String organizationName;
|
||||
private String owner;
|
||||
private String personCapacity;
|
||||
private String registerDate;
|
||||
private String remark;
|
||||
private String size;
|
||||
private String threeImage;
|
||||
private String threeImageStatus;
|
||||
private String towAuality;
|
||||
private String trailer;
|
||||
private String type;
|
||||
private String vehicleAxis;
|
||||
private String vehicleNumber;
|
||||
|
||||
public String getAllAuality() {
|
||||
return allAuality;
|
||||
}
|
||||
|
||||
public void setAllAuality(String allAuality) {
|
||||
this.allAuality = allAuality;
|
||||
}
|
||||
|
||||
public String getAllCapacity() {
|
||||
return allCapacity;
|
||||
}
|
||||
|
||||
public void setAllCapacity(String allCapacity) {
|
||||
this.allCapacity = allCapacity;
|
||||
}
|
||||
|
||||
public String getApprovedCapacity() {
|
||||
return approvedCapacity;
|
||||
}
|
||||
|
||||
public void setApprovedCapacity(String approvedCapacity) {
|
||||
this.approvedCapacity = approvedCapacity;
|
||||
}
|
||||
|
||||
public String getAuditStatus() {
|
||||
return auditStatus;
|
||||
}
|
||||
|
||||
public void setAuditStatus(String auditStatus) {
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
public String getAuditTime() {
|
||||
return auditTime;
|
||||
}
|
||||
|
||||
public void setAuditTime(String auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
public String getBackImage() {
|
||||
return backImage;
|
||||
}
|
||||
|
||||
public void setBackImage(String backImage) {
|
||||
this.backImage = backImage;
|
||||
}
|
||||
|
||||
public String getBackStatus() {
|
||||
return backStatus;
|
||||
}
|
||||
|
||||
public void setBackStatus(String backStatus) {
|
||||
this.backStatus = backStatus;
|
||||
}
|
||||
|
||||
public String getBackTime() {
|
||||
return backTime;
|
||||
}
|
||||
|
||||
public void setBackTime(String backTime) {
|
||||
this.backTime = backTime;
|
||||
}
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getCheckRecord() {
|
||||
return checkRecord;
|
||||
}
|
||||
|
||||
public void setCheckRecord(String checkRecord) {
|
||||
this.checkRecord = checkRecord;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getDateIssue() {
|
||||
return dateIssue;
|
||||
}
|
||||
|
||||
public void setDateIssue(String dateIssue) {
|
||||
this.dateIssue = dateIssue;
|
||||
}
|
||||
|
||||
public String getEngineNumber() {
|
||||
return engineNumber;
|
||||
}
|
||||
|
||||
public void setEngineNumber(String engineNumber) {
|
||||
this.engineNumber = engineNumber;
|
||||
}
|
||||
|
||||
public String getFileNumber() {
|
||||
return fileNumber;
|
||||
}
|
||||
|
||||
public void setFileNumber(String fileNumber) {
|
||||
this.fileNumber = fileNumber;
|
||||
}
|
||||
|
||||
public String getFrontImage() {
|
||||
return frontImage;
|
||||
}
|
||||
|
||||
public void setFrontImage(String frontImage) {
|
||||
this.frontImage = frontImage;
|
||||
}
|
||||
|
||||
public String getFrontStatus() {
|
||||
return frontStatus;
|
||||
}
|
||||
|
||||
public void setFrontStatus(String frontStatus) {
|
||||
this.frontStatus = frontStatus;
|
||||
}
|
||||
|
||||
public String getFrontTime() {
|
||||
return frontTime;
|
||||
}
|
||||
|
||||
public void setFrontTime(String frontTime) {
|
||||
this.frontTime = frontTime;
|
||||
}
|
||||
|
||||
public String getFuelType() {
|
||||
return fuelType;
|
||||
}
|
||||
|
||||
public void setFuelType(String fuelType) {
|
||||
this.fuelType = fuelType;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getNature() {
|
||||
return nature;
|
||||
}
|
||||
|
||||
public void setNature(String nature) {
|
||||
this.nature = nature;
|
||||
}
|
||||
|
||||
public String getOrganizationName() {
|
||||
return organizationName;
|
||||
}
|
||||
|
||||
public void setOrganizationName(String organizationName) {
|
||||
this.organizationName = organizationName;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getPersonCapacity() {
|
||||
return personCapacity;
|
||||
}
|
||||
|
||||
public void setPersonCapacity(String personCapacity) {
|
||||
this.personCapacity = personCapacity;
|
||||
}
|
||||
|
||||
public String getRegisterDate() {
|
||||
return registerDate;
|
||||
}
|
||||
|
||||
public void setRegisterDate(String registerDate) {
|
||||
this.registerDate = registerDate;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public String getThreeImage() {
|
||||
return threeImage;
|
||||
}
|
||||
|
||||
public void setThreeImage(String threeImage) {
|
||||
this.threeImage = threeImage;
|
||||
}
|
||||
|
||||
public String getThreeImageStatus() {
|
||||
return threeImageStatus;
|
||||
}
|
||||
|
||||
public void setThreeImageStatus(String threeImageStatus) {
|
||||
this.threeImageStatus = threeImageStatus;
|
||||
}
|
||||
|
||||
public String getTowAuality() {
|
||||
return towAuality;
|
||||
}
|
||||
|
||||
public void setTowAuality(String towAuality) {
|
||||
this.towAuality = towAuality;
|
||||
}
|
||||
|
||||
public String getTrailer() {
|
||||
return trailer;
|
||||
}
|
||||
|
||||
public void setTrailer(String trailer) {
|
||||
this.trailer = trailer;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getVehicleAxis() {
|
||||
return vehicleAxis;
|
||||
}
|
||||
|
||||
public void setVehicleAxis(String vehicleAxis) {
|
||||
this.vehicleAxis = vehicleAxis;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
}
|
||||
}
|
@ -19,11 +19,19 @@ public class DriverUpBean implements Serializable {
|
||||
private String carLong;
|
||||
private String carWidth;
|
||||
private String carHeight;
|
||||
private String carId;
|
||||
private String carPlateColor;
|
||||
private String carEnergyTyp;
|
||||
|
||||
private DataDTO zjObj;
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getFrontImageUrl() {
|
||||
return frontImageUrl;
|
||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.IDInputBean;
|
||||
@ -74,6 +75,22 @@ public class AuthRequest {
|
||||
RequestUtil.start(1, "saveVehicleLicense", re, con, hd);
|
||||
}
|
||||
|
||||
//查询车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
||||
public void getCarInfo(Context con, Handler hd, String carNum) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carNum",carNum);
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/onlyGetVehicleLicense", MapUtil.mapJson(map)), getToken(con), con);
|
||||
RequestUtil.start(1, "getCarInfo", re, con, hd);
|
||||
}
|
||||
|
||||
//绑定车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
||||
public void bindCar(Context con, Handler hd, String carId) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carId",carId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/bindCar", MapUtil.mapJson(map)), getToken(con), con);
|
||||
RequestUtil.start(1, "bindCarInfo", re, con, hd);
|
||||
}
|
||||
|
||||
//上传头像
|
||||
public void upHeadImg(Context con, Handler hd, String imgUrl) {
|
||||
String mt = "{\"headportrait\": \"" + imgUrl + "\"}";
|
||||
@ -152,6 +169,7 @@ public class AuthRequest {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAuthUrl(), ""), getToken(con), con);
|
||||
RequestUtil.start(1, "authUrl", re, con, hd);
|
||||
}
|
||||
|
||||
//获取车牌颜色
|
||||
public void getCarColor(Context con, Handler hd) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
|
@ -24,6 +24,7 @@ import androidx.cardview.widget.CardView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean2;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DicBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverUpBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.SinglePickBean;
|
||||
@ -40,6 +41,9 @@ import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.dahe.mylibrary.utils.PatternUtils;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
@ -86,10 +90,12 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
//修改后不可编辑
|
||||
public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
@ -113,6 +119,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
private int[] typeImgOne = {R.mipmap.id, R.mipmap.license, R.mipmap.vehicle_license, R.mipmap.vehicle_license};
|
||||
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 DicBean.DataDTO curColor, curEnergy;
|
||||
private TextView zj_name, zjimg_name, zjimg2_name, zj_name2, zj_name3;
|
||||
private TextView name1, name2, name3, name4, value5, value6;
|
||||
@ -402,7 +409,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
new OCRRequest().OCRVehicleLicenseZj(con, hd, imageUrl);
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
@ -420,7 +427,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||
new OCRRequest().OCRVehicleLicenseBackZj(con, hd, imageUrl);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -461,6 +468,39 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
CacheGroup.cacheList.remove("authUrl");
|
||||
} else if (CacheGroup.cacheList.get("getCarInfo") != null) {
|
||||
Log.e("url", CacheGroup.cacheList.get("getCarInfo"));
|
||||
CarInfoBean2 bb = gson.fromJson(CacheGroup.cacheList.get("getCarInfo"), CarInfoBean2.class);
|
||||
if (bb.getCode() == 200 && bb.getData() != null) {
|
||||
if (!TextUtils.isEmpty(bb.getData().getCarId())) {
|
||||
carExistCarId = bb.getData().getCarId();
|
||||
value1.setEnabled(false);
|
||||
value2.setEnabled(false);
|
||||
value3.setEnabled(false);
|
||||
value4.setEnabled(false);
|
||||
// img2.setEnabled(false);
|
||||
u_img2.setEnabled(false);
|
||||
url2 = bb.getData().getBackImage();
|
||||
Glide.with(con).load(bb.getData().getBackImage()).into(img2);
|
||||
// url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||
ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
|
||||
}
|
||||
}
|
||||
CacheGroup.cacheList.remove("getCarInfo");
|
||||
} else if (CacheGroup.cacheList.get("bindCarInfo") != null) {
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
Log.e("url", CacheGroup.cacheList.get("bindCarInfo"));
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("bindCarInfo"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
VehicleEvent ve = new VehicleEvent(String.valueOf(carExistCarId));
|
||||
EventBus.getDefault().postSticky(ve);
|
||||
finish();
|
||||
ToastUtils.showToast(con, bb.getMsg());
|
||||
}else{
|
||||
ToastUtils.showToast(con, bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("bindCarInfo");
|
||||
} else {
|
||||
pathOrcRes();
|
||||
//重复代码?
|
||||
@ -585,10 +625,12 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
img1.setImageResource(typeImgOne[index]);
|
||||
img2.setImageResource(typeImgTwo[index]);
|
||||
if (!url1.equals("")) {
|
||||
Glide.with(con).load(url1).into(img1);
|
||||
ImageLoader.getInstance().loadImage(con, url1, img1, typeImgOne[index]);
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
}
|
||||
if (!url2.equals("")) {
|
||||
Glide.with(con).load(url2).into(img2);
|
||||
ImageLoader.getInstance().loadImage(con, url2, img2, typeImgTwo[index]);
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
}
|
||||
//查看第一张照片
|
||||
img1.setOnClickListener(v -> {
|
||||
@ -933,14 +975,13 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
||||
if (olb.getCode() == 200 && olb.getData() != null) {
|
||||
if (olb.getData().isCarExist()) {
|
||||
value1.setEnabled(false);
|
||||
Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2);
|
||||
// url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||
ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
|
||||
} else {
|
||||
value1.setEnabled(true);
|
||||
}
|
||||
carExistCarId = "";
|
||||
value1.setEnabled(true);
|
||||
value2.setEnabled(true);
|
||||
value3.setEnabled(true);
|
||||
value4.setEnabled(true);
|
||||
img2.setEnabled(true);
|
||||
u_img2.setEnabled(true);
|
||||
// url1 = olb.getData().getUrl();
|
||||
value1.setText(olb.getData().getVclN());
|
||||
value2.setText(olb.getData().getVcltype());
|
||||
@ -950,6 +991,8 @@ 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("挂"))
|
||||
new AuthRequest().getCarInfo(con, hd, olb.getData().getVclN());
|
||||
Log.e("-cardId-", oCrcarId);
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
@ -1079,7 +1122,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
} else {
|
||||
ib.setIdcardSex(2);
|
||||
}
|
||||
ib.setIdcardValidity(ocbb.getData().getValidTo());
|
||||
ib.setIdcardValidity("长期".equals(ocbb.getData().getValidTo()) ? "2999-12-31" : ocbb.getData().getValidTo());
|
||||
new AuthRequest().driverAuthIdCard(con, hd, ib);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
@ -1099,7 +1142,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
iib.setDriverLicense(odl.getData().getIdcard());
|
||||
iib.setDriverLicenseBackPhoto(backId);
|
||||
iib.setDriverLicensePhoto(fontId);
|
||||
iib.setEndTime(odl.getData().getEndDate());
|
||||
iib.setEndTime("长期".equals(odl.getData().getEndDate()) ? "2999-12-31" : odl.getData().getEndDate());
|
||||
iib.setFirstTime(odl.getData().getFirstGetDocDate());
|
||||
new AuthRequest().driverAuthLicense(con, hd, iib);
|
||||
} else {
|
||||
@ -1107,6 +1150,12 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!TextUtils.isEmpty(carExistCarId)) {
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
new AuthRequest().bindCar(con, hd, carExistCarId);
|
||||
return;
|
||||
}
|
||||
if ((olb != null && !olb.getData().isCarExist() && oblb != null) || (olb != null && olb.getData().isCarExist())) {
|
||||
// if (curColor == null || curEnergy == null) {
|
||||
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
||||
@ -1123,38 +1172,51 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
// map.put("vcltype", str2);
|
||||
// map.put("ownerName", str3);
|
||||
// map.put("vin", str4);//车辆识别代号
|
||||
|
||||
|
||||
String carLong = "";
|
||||
String carWidth = "";
|
||||
String carHeight = "";
|
||||
String carPlateColor = "302003";
|
||||
String carEnergyTyp = "303002";
|
||||
String note = "";
|
||||
|
||||
String overallDimen = oblb.getData().getOverallDimen();
|
||||
if (overallDimen.contains("mm")){
|
||||
if (overallDimen.contains("mm")) {
|
||||
String[] mms = overallDimen.split("mm");
|
||||
String mm = mms[0];
|
||||
|
||||
// String[] xes = mm.split("x");
|
||||
// String[] xes1 = mm.split("X");
|
||||
String[] xes = mm.split("×");
|
||||
if (xes.length==3){
|
||||
if (xes.length == 3) {
|
||||
carLong = xes[0];
|
||||
carWidth = xes[1];
|
||||
carHeight = xes[2];
|
||||
}
|
||||
try {
|
||||
int i = Integer.parseInt(carLong);
|
||||
if (i<4200){
|
||||
if (i < 4200) {
|
||||
carPlateColor = "302002";
|
||||
carEnergyTyp = "303001";
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
String inNote = oblb.getData().getNote();
|
||||
if (inNote.contains(":")) {
|
||||
String[] split = inNote.split(":");
|
||||
if (split.length == 2) {
|
||||
note = split[1];
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
DriverUpBean driverUpBean = new DriverUpBean();
|
||||
DriverUpBean.DataDTO dataDTO = new DriverUpBean.DataDTO();
|
||||
@ -1175,6 +1237,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
dataDTO.setVcltype(str2);
|
||||
dataDTO.setOwnerName(str3);
|
||||
dataDTO.setVin(str4);
|
||||
dataDTO.setNatureOfUsage(olb.getData().getNatureOfUsage());
|
||||
dataDTO.setIssuingAuthority(olb.getData().getIssuingAuthority());
|
||||
dataDTO.setRegTime(olb.getData().getRegTime());
|
||||
dataDTO.setAddress(olb.getData().getAddress());
|
||||
@ -1185,7 +1248,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
|
||||
dataDTO.setApproveTon(oblb.getData().getApproveTon());
|
||||
dataDTO.setRecordId(oblb.getData().getRecordId());
|
||||
dataDTO.setNote(oblb.getData().getNote());
|
||||
dataDTO.setNote(note);
|
||||
dataDTO.setPassengers(oblb.getData().getPassengers());
|
||||
dataDTO.setVclDrwTn(oblb.getData().getVclDrwTn());
|
||||
dataDTO.setOverallDimen(oblb.getData().getOverallDimen());
|
||||
@ -1210,42 +1273,114 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
// }
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("".equals(url3)) {
|
||||
map.put("imgId", fid);
|
||||
}
|
||||
// map.put("licenseId", oblb.getData().getLicenseId());
|
||||
map.put("carId", carId);
|
||||
map.put("carNumberDraw", str1);
|
||||
map.put("type", str2);
|
||||
map.put("owner", str3);
|
||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||
map.put("vehicleNumber", str4);
|
||||
if (cdb != null && cdb.getRes() == 1 && cdb.getData() != null && cdb.getData().getTrailerResVo() != null) {
|
||||
map.put("oldTrailerNumber", cdb.getData().getTrailerResVo().getCarNumber());
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if ("".equals(url3)) {
|
||||
// map.put("imgId", fid);
|
||||
// }
|
||||
//// map.put("licenseId", oblb.getData().getLicenseId());
|
||||
// map.put("carId", carId);
|
||||
// map.put("carNumberDraw", str1);
|
||||
// map.put("type", str2);
|
||||
// map.put("owner", str3);
|
||||
//// map.put("carEnergyTyp", curEnergy.getValue());
|
||||
// map.put("vehicleNumber", str4);
|
||||
// if (cdb != null && cdb.getRes() == 1 && cdb.getData() != null && cdb.getData().getTrailerResVo() != null) {
|
||||
// map.put("oldTrailerNumber", cdb.getData().getTrailerResVo().getCarNumber());
|
||||
// }
|
||||
//
|
||||
// map.put("registerDate", olb.getData().getRegTime());//注册日期
|
||||
// map.put("dateIssue", olb.getData().getLicensedateOfissue());//发证日期
|
||||
// map.put("nature", olb.getData().getNatureOfUsage());//使用性质
|
||||
// map.put("model", olb.getData().getVclBrand());//品牌型号
|
||||
// map.put("organizationName", olb.getData().getIssuingAuthority());//发证机关
|
||||
// map.put("engineNumber", olb.getData().getEngine());//发动机号
|
||||
//
|
||||
//
|
||||
// map.put("frontImage", url1);
|
||||
// map.put("backImage", url2);
|
||||
// map.put("size", oblb.getData().getOverallDimen());//车辆尺寸
|
||||
// map.put("allCapacity", oblb.getData().getEnTn());//整备质量
|
||||
// map.put("approvedCapacity", oblb.getData().getLoadTon());//核定载质量
|
||||
// map.put("allAuality", oblb.getData().getApproveTon());//总质量
|
||||
//
|
||||
// map.put("personCapacity", oblb.getData().getPassengers());//核定载人数
|
||||
// map.put("fileNumber", oblb.getData().getRecordId());//档案编号
|
||||
// map.put("towAuality", oblb.getData().getVclDrwTn());//准牵引总质量
|
||||
|
||||
|
||||
String carLong = "";
|
||||
String carWidth = "";
|
||||
String carHeight = "";
|
||||
String note = "";
|
||||
String overallDimen = oblb.getData().getOverallDimen();
|
||||
if (overallDimen.contains("mm")) {
|
||||
String[] mms = overallDimen.split("mm");
|
||||
String mm = mms[0];
|
||||
|
||||
// String[] xes = mm.split("x");
|
||||
// String[] xes1 = mm.split("X");
|
||||
String[] xes = mm.split("×");
|
||||
if (xes.length == 3) {
|
||||
carLong = xes[0];
|
||||
carWidth = xes[1];
|
||||
carHeight = xes[2];
|
||||
}
|
||||
}
|
||||
|
||||
map.put("registerDate", olb.getData().getRegTime());//注册日期
|
||||
map.put("dateIssue", olb.getData().getLicensedateOfissue());//发证日期
|
||||
map.put("nature", olb.getData().getNatureOfUsage());//使用性质
|
||||
map.put("model", olb.getData().getVclBrand());//品牌型号
|
||||
map.put("organizationName", olb.getData().getIssuingAuthority());//发证机关
|
||||
map.put("engineNumber", olb.getData().getEngine());//发动机号
|
||||
try {
|
||||
String inNote = oblb.getData().getNote();
|
||||
if (inNote.contains(":")) {
|
||||
String[] split = inNote.split(":");
|
||||
if (split.length == 2) {
|
||||
note = split[1];
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
map.put("frontImage", url1);
|
||||
map.put("backImage", url2);
|
||||
map.put("size", oblb.getData().getOverallDimen());//车辆尺寸
|
||||
map.put("allCapacity", oblb.getData().getEnTn());//整备质量
|
||||
map.put("approvedCapacity", oblb.getData().getLoadTon());//核定载质量
|
||||
map.put("allAuality", oblb.getData().getApproveTon());//总质量
|
||||
DriverUpBean driverUpBean = new DriverUpBean();
|
||||
DriverUpBean.DataDTO dataDTO = new DriverUpBean.DataDTO();
|
||||
driverUpBean.setCarId(carId);
|
||||
driverUpBean.setFrontImageUrl(url1);
|
||||
driverUpBean.setBackImageUrl(url2);
|
||||
driverUpBean.setCarNumber(str1);
|
||||
driverUpBean.setType(str2);
|
||||
driverUpBean.setOwner(str3);
|
||||
driverUpBean.setVehicleNumber(str4);
|
||||
driverUpBean.setCarLong(carLong);
|
||||
driverUpBean.setCarWidth(carWidth);
|
||||
driverUpBean.setCarHeight(carHeight);
|
||||
|
||||
map.put("personCapacity", oblb.getData().getPassengers());//核定载人数
|
||||
map.put("fileNumber", oblb.getData().getRecordId());//档案编号
|
||||
map.put("towAuality", oblb.getData().getVclDrwTn());//准牵引总质量
|
||||
dataDTO.setNatureOfUsage(olb.getData().getNatureOfUsage());
|
||||
dataDTO.setVclN(str1);
|
||||
dataDTO.setVcltype(str2);
|
||||
dataDTO.setOwnerName(str3);
|
||||
dataDTO.setVin(str4);
|
||||
dataDTO.setIssuingAuthority(olb.getData().getIssuingAuthority());
|
||||
dataDTO.setRegTime(olb.getData().getRegTime());
|
||||
dataDTO.setAddress(olb.getData().getAddress());
|
||||
dataDTO.setEngine(olb.getData().getEngine());
|
||||
dataDTO.setLicensedateOfissue(olb.getData().getLicensedateOfissue());
|
||||
dataDTO.setVclBrand(olb.getData().getVclBrand());
|
||||
|
||||
|
||||
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
||||
dataDTO.setApproveTon(oblb.getData().getApproveTon());
|
||||
dataDTO.setRecordId(oblb.getData().getRecordId());
|
||||
dataDTO.setNote(note);
|
||||
dataDTO.setPassengers(oblb.getData().getPassengers());
|
||||
dataDTO.setVclDrwTn(oblb.getData().getVclDrwTn());
|
||||
dataDTO.setOverallDimen(oblb.getData().getOverallDimen());
|
||||
dataDTO.setEnTn(oblb.getData().getEnTn());
|
||||
dataDTO.setLoadTon(oblb.getData().getLoadTon());
|
||||
dataDTO.setInspectionRecord(oblb.getData().getInspectionRecord());
|
||||
dataDTO.setBarCode(oblb.getData().getBarCode());
|
||||
driverUpBean.setZjObj(dataDTO);
|
||||
|
||||
String json = gson.toJson(driverUpBean);
|
||||
|
||||
new AuthRequest().saveDrawCar(con, hd, json);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user