行驶证接口对接
This commit is contained in:
parent
51075e72c8
commit
1fd37db329
@ -0,0 +1,320 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName DriverUpBean
|
||||
* @Author john
|
||||
* @Date 2024/11/20 09:20
|
||||
* @Description TODO
|
||||
*/
|
||||
public class DriverUpBean implements Serializable {
|
||||
|
||||
private String frontImageUrl;
|
||||
private String backImageUrl;
|
||||
private String carNumber;
|
||||
private String type;
|
||||
private String owner;
|
||||
private String vehicleNumber;
|
||||
private String carLong;
|
||||
private String carWidth;
|
||||
private String carHeight;
|
||||
private String carPlateColor;
|
||||
private String carEnergyTyp;
|
||||
|
||||
private DataDTO zjObj;
|
||||
|
||||
|
||||
public String getFrontImageUrl() {
|
||||
return frontImageUrl;
|
||||
}
|
||||
|
||||
public void setFrontImageUrl(String frontImageUrl) {
|
||||
this.frontImageUrl = frontImageUrl;
|
||||
}
|
||||
|
||||
public String getBackImageUrl() {
|
||||
return backImageUrl;
|
||||
}
|
||||
|
||||
public void setBackImageUrl(String backImageUrl) {
|
||||
this.backImageUrl = backImageUrl;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
|
||||
public String getCarLong() {
|
||||
return carLong;
|
||||
}
|
||||
|
||||
public void setCarLong(String carLong) {
|
||||
this.carLong = carLong;
|
||||
}
|
||||
|
||||
public String getCarWidth() {
|
||||
return carWidth;
|
||||
}
|
||||
|
||||
public void setCarWidth(String carWidth) {
|
||||
this.carWidth = carWidth;
|
||||
}
|
||||
|
||||
public String getCarHeight() {
|
||||
return carHeight;
|
||||
}
|
||||
|
||||
public void setCarHeight(String carHeight) {
|
||||
this.carHeight = carHeight;
|
||||
}
|
||||
|
||||
public String getCarPlateColor() {
|
||||
return carPlateColor;
|
||||
}
|
||||
|
||||
public void setCarPlateColor(String carPlateColor) {
|
||||
this.carPlateColor = carPlateColor;
|
||||
}
|
||||
|
||||
public String getCarEnergyTyp() {
|
||||
return carEnergyTyp;
|
||||
}
|
||||
|
||||
public void setCarEnergyTyp(String carEnergyTyp) {
|
||||
this.carEnergyTyp = carEnergyTyp;
|
||||
}
|
||||
|
||||
public DataDTO getZjObj() {
|
||||
return zjObj;
|
||||
}
|
||||
|
||||
public void setZjObj(DataDTO zjObj) {
|
||||
this.zjObj = zjObj;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
|
||||
private String approveTon;
|
||||
private String recordId;
|
||||
private String note;
|
||||
private String passengers;
|
||||
private String vclDrwTn;
|
||||
private String overallDimen;
|
||||
private String vclN;
|
||||
private String enTn;
|
||||
private String loadTon;
|
||||
private String inspectionRecord;
|
||||
private String barCode;
|
||||
private String issuingAuthority;
|
||||
private String regTime;
|
||||
private String address;
|
||||
private String ownerName;
|
||||
private String engine;
|
||||
private String vin;
|
||||
private String licensedateOfissue;
|
||||
private String vcltype;
|
||||
private String vclBrand;
|
||||
private String natureOfUsage;
|
||||
|
||||
public String getApproveTon() {
|
||||
return approveTon;
|
||||
}
|
||||
|
||||
public void setApproveTon(String approveTon) {
|
||||
this.approveTon = approveTon;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getPassengers() {
|
||||
return passengers;
|
||||
}
|
||||
|
||||
public void setPassengers(String passengers) {
|
||||
this.passengers = passengers;
|
||||
}
|
||||
|
||||
public String getVclDrwTn() {
|
||||
return vclDrwTn;
|
||||
}
|
||||
|
||||
public void setVclDrwTn(String vclDrwTn) {
|
||||
this.vclDrwTn = vclDrwTn;
|
||||
}
|
||||
|
||||
public String getOverallDimen() {
|
||||
return overallDimen;
|
||||
}
|
||||
|
||||
public void setOverallDimen(String overallDimen) {
|
||||
this.overallDimen = overallDimen;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getEnTn() {
|
||||
return enTn;
|
||||
}
|
||||
|
||||
public void setEnTn(String enTn) {
|
||||
this.enTn = enTn;
|
||||
}
|
||||
|
||||
public String getLoadTon() {
|
||||
return loadTon;
|
||||
}
|
||||
|
||||
public void setLoadTon(String loadTon) {
|
||||
this.loadTon = loadTon;
|
||||
}
|
||||
|
||||
public String getInspectionRecord() {
|
||||
return inspectionRecord;
|
||||
}
|
||||
|
||||
public void setInspectionRecord(String inspectionRecord) {
|
||||
this.inspectionRecord = inspectionRecord;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getRegTime() {
|
||||
return regTime;
|
||||
}
|
||||
|
||||
public void setRegTime(String regTime) {
|
||||
this.regTime = regTime;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getLicensedateOfissue() {
|
||||
return licensedateOfissue;
|
||||
}
|
||||
|
||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
||||
this.licensedateOfissue = licensedateOfissue;
|
||||
}
|
||||
|
||||
public String getVcltype() {
|
||||
return vcltype;
|
||||
}
|
||||
|
||||
public void setVcltype(String vcltype) {
|
||||
this.vcltype = vcltype;
|
||||
}
|
||||
|
||||
public String getVclBrand() {
|
||||
return vclBrand;
|
||||
}
|
||||
|
||||
public void setVclBrand(String vclBrand) {
|
||||
this.vclBrand = vclBrand;
|
||||
}
|
||||
|
||||
public String getNatureOfUsage() {
|
||||
return natureOfUsage;
|
||||
}
|
||||
|
||||
public void setNatureOfUsage(String natureOfUsage) {
|
||||
this.natureOfUsage = natureOfUsage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,8 @@ public class RequestConstant {
|
||||
//驾驶证认证
|
||||
private static final String DRIVERAUTHLICENSE = "/app/driver/auth/driverAuthLicense";
|
||||
//行驶证认证
|
||||
// private static final String SAVEVEHICLELICENSE = "/app/carDriver/saveVehicleLicense";
|
||||
private static final String SAVEVEHICLELICENSE = "app/carDriver/save";
|
||||
private static final String SAVEVEHICLELICENSE = "/app/carDriver/saveVehicleLicense";
|
||||
// private static final String SAVEVEHICLELICENSE = "app/carDriver/save";
|
||||
//从业资格证认证
|
||||
private static final String DRIVER_AUTH_QUALIFICATION = "/app/driver/auth/driverAuthQualification";
|
||||
//车辆等级证书
|
||||
|
@ -25,6 +25,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DicBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverUpBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.SinglePickBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
@ -870,7 +871,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
case 0:
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[0]) != null) {
|
||||
ocb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[0]), OCRCardBean.class);
|
||||
if (ocb.getCode() == 200&&ocb.getData()!=null) {
|
||||
if (ocb.getCode() == 200 && ocb.getData() != null) {
|
||||
// url1 = ocb.getData().getUrl();
|
||||
value1.setText(ocb.getData().getName());
|
||||
value2.setText(ocb.getData().getIdcard());
|
||||
@ -883,7 +884,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME_BANK[0]) != null) {
|
||||
ocbb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME_BANK[0]), OCRCardBackBean.class);
|
||||
if (ocbb.getCode() == 200&&ocbb.getData()!=null) {
|
||||
if (ocbb.getCode() == 200 && ocbb.getData() != null) {
|
||||
value4.setText(ocbb.getData().getValidTo());
|
||||
Glide.with(con).load(path).into(img2);
|
||||
startTime = ocbb.getData().getValidFrom();
|
||||
@ -899,7 +900,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
//{"档案编号","初次领证日期","准驾车型","有效期限(止)"},
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[1]) != null) {
|
||||
odl = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[1]), OCRDrivingLicenseBean.class);
|
||||
if (odl.getCode() == 200&&odl.getData()!=null) {
|
||||
if (odl.getCode() == 200 && odl.getData() != null) {
|
||||
OCRDrivingLicenseBean.DataDTO od = odl.getData();
|
||||
// url1 = odl.getData().getUrl();
|
||||
value7.setText(StringUtil.isNull(od.getName(), "识别异常"));
|
||||
@ -915,7 +916,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME_BANK[1]) != null) {
|
||||
odlb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME_BANK[1]), OCRDrivingLicenseBackBean.class);
|
||||
if (odlb.getCode() == 200&&odlb.getData()!=null) {
|
||||
if (odlb.getCode() == 200 && odlb.getData() != null) {
|
||||
Glide.with(con).load(path).into(img2);
|
||||
//自动调取提交功能,实现页面自动跳转
|
||||
// subimt();
|
||||
@ -931,7 +932,7 @@ 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 (olb.getCode() == 200&&olb.getData()!=null) {
|
||||
if (olb.getCode() == 200 && olb.getData() != null) {
|
||||
if (olb.getData().isCarExist()) {
|
||||
value1.setEnabled(false);
|
||||
Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2);
|
||||
@ -957,7 +958,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME_BANK[2]) != null) {
|
||||
oblb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME_BANK[2]), OCRVehicleBackLicenseBean.class);
|
||||
if (oblb.getCode() == 200&&oblb.getData()!=null) {
|
||||
if (oblb.getCode() == 200 && oblb.getData() != null) {
|
||||
// url2 = oblb.getData().getUrl();
|
||||
// backId = oblb.getData().getId();
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
@ -1118,36 +1119,80 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
map.put("imgId", fid);
|
||||
}
|
||||
// map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||
map.put("carNum", str1);
|
||||
map.put("carType", str2);
|
||||
map.put("carOwner", str3);
|
||||
// map.put("vehicleNumber", str4);//车辆识别代号
|
||||
map.put("vclN", str1);
|
||||
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 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];
|
||||
}
|
||||
try {
|
||||
int i = Integer.parseInt(carLong);
|
||||
if (i<4200){
|
||||
carPlateColor = "302002";
|
||||
carEnergyTyp = "303001";
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
map.put("drivingLicenseRegisterDate", olb.getData().getRegTime());//注册日期
|
||||
map.put("drivingLicenseIssueDate", olb.getData().getLicensedateOfissue());//发证日期
|
||||
map.put("carUseCharacter", olb.getData().getNatureOfUsage());//使用性质
|
||||
// map.put("model", olb.getData().getVclBrand());//品牌型号
|
||||
map.put("carIssuingOrg", olb.getData().getIssuingAuthority());//发证机关
|
||||
map.put("engineNo", olb.getData().getEngine());//发动机号
|
||||
DriverUpBean driverUpBean = new DriverUpBean();
|
||||
DriverUpBean.DataDTO dataDTO = new DriverUpBean.DataDTO();
|
||||
driverUpBean.setFrontImageUrl(url1);
|
||||
driverUpBean.setBackImageUrl(url2);
|
||||
driverUpBean.setType(str2);
|
||||
driverUpBean.setOwner(str3);
|
||||
driverUpBean.setVehicleNumber(str4);
|
||||
driverUpBean.setCarPlateColor(carPlateColor);
|
||||
driverUpBean.setCarEnergyTyp(carEnergyTyp);
|
||||
driverUpBean.setCarLong(carLong);
|
||||
driverUpBean.setCarWidth(carWidth);
|
||||
driverUpBean.setCarHeight(carHeight);
|
||||
|
||||
|
||||
map.put("drivingLicensePhoto", url1);
|
||||
map.put("drivingLicenseBackPhoto", url2);
|
||||
map.put("outsideSizeName", oblb.getData().getOverallDimen());//车辆尺寸
|
||||
// map.put("allCapacity", oblb.getData().getEnTn());//整备质量
|
||||
map.put("approvedLoad", oblb.getData().getLoadTon());//核定载质量
|
||||
map.put("totalWeight", oblb.getData().getApproveTon());//总质量
|
||||
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());
|
||||
|
||||
// map.put("personCapacity", oblb.getData().getPassengers());//核定载人数
|
||||
// map.put("fileNumber", oblb.getData().getRecordId());//档案编号
|
||||
// map.put("towAuality", oblb.getData().getVclDrwTn());//准牵引总质量
|
||||
// if (olb.getData().isCarExist()) {
|
||||
// map.put("carId", olb.getData().getCarId());
|
||||
// }
|
||||
// map.put("carPlateColor", curColor.getValue());
|
||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
||||
|
||||
dataDTO.setApproveTon(oblb.getData().getApproveTon());
|
||||
dataDTO.setRecordId(oblb.getData().getRecordId());
|
||||
dataDTO.setNote(oblb.getData().getNote());
|
||||
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().saveVehicleLicense(con, hd, json);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -1188,12 +1233,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
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());//准牵引总质量
|
||||
map.put("allAuality", oblb.getData().getApproveTon());//总质量
|
||||
|
||||
map.put("personCapacity", oblb.getData().getPassengers());//核定载人数
|
||||
map.put("fileNumber", oblb.getData().getRecordId());//档案编号
|
||||
map.put("towAuality", oblb.getData().getVclDrwTn());//准牵引总质量
|
||||
|
||||
|
||||
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
||||
|
Loading…
Reference in New Issue
Block a user