中交-身份证 驾驶证 行驶证 从业资格
This commit is contained in:
parent
c11974e9c1
commit
5bc0a041de
@ -55,6 +55,33 @@ public class OCRBankBean {
|
||||
private String validDate;
|
||||
private String bankCardType;
|
||||
private String bankName;
|
||||
private String expiryDate;
|
||||
private String type;
|
||||
private String cardNumber;
|
||||
|
||||
public String getExpiryDate() {
|
||||
return expiryDate;
|
||||
}
|
||||
|
||||
public void setExpiryDate(String expiryDate) {
|
||||
this.expiryDate = expiryDate;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
public void setCardNumber(String cardNumber) {
|
||||
this.cardNumber = cardNumber;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
@ -60,6 +60,33 @@ public class OCRCardBackBean {
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private String organizationName;
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
private String issue;
|
||||
|
||||
public String getIssue() {
|
||||
return issue;
|
||||
}
|
||||
|
||||
public void setIssue(String issue) {
|
||||
this.issue = issue;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
@ -63,6 +63,51 @@ public class OCRCardBean {
|
||||
private String cardId;
|
||||
private String birthday;
|
||||
private String sex;
|
||||
private String ethnicity;
|
||||
private String idcard;
|
||||
private String birth;
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
|
||||
public String getEthnicity() {
|
||||
return ethnicity;
|
||||
}
|
||||
|
||||
public void setEthnicity(String ethnicity) {
|
||||
this.ethnicity = ethnicity;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getBirth() {
|
||||
return birth;
|
||||
}
|
||||
|
||||
public void setBirth(String birth) {
|
||||
this.birth = birth;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
@ -68,6 +68,70 @@ public class OCRDrivingLicenseBean {
|
||||
private String allowType;
|
||||
private String sex;
|
||||
private String startTime;
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private String firstGetDocDate;
|
||||
private String idcard;
|
||||
private String quasiDriveType;
|
||||
private String issuingAuthority;
|
||||
private String nationality;
|
||||
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getFirstGetDocDate() {
|
||||
return firstGetDocDate;
|
||||
}
|
||||
|
||||
public void setFirstGetDocDate(String firstGetDocDate) {
|
||||
this.firstGetDocDate = firstGetDocDate;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getQuasiDriveType() {
|
||||
return quasiDriveType;
|
||||
}
|
||||
|
||||
public void setQuasiDriveType(String quasiDriveType) {
|
||||
this.quasiDriveType = quasiDriveType;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
@ -0,0 +1,200 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName OCRQualiBean
|
||||
* @Author john
|
||||
* @Date 2024/11/19 15:53
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OCRQualiBean {
|
||||
|
||||
|
||||
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 address;
|
||||
private List<QualificationCategoryListDTO> qualification_category_list;
|
||||
private String nationality;
|
||||
private String issuing_authority;
|
||||
private String sex;
|
||||
private String birth_date;
|
||||
private String integrity_assessment_info;
|
||||
private String name;
|
||||
private String driving_class;
|
||||
private String certificate_number;
|
||||
private String continuing_education_info;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public List<QualificationCategoryListDTO> getQualification_category_list() {
|
||||
return qualification_category_list;
|
||||
}
|
||||
|
||||
public void setQualification_category_list(List<QualificationCategoryListDTO> qualification_category_list) {
|
||||
this.qualification_category_list = qualification_category_list;
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public String getIssuing_authority() {
|
||||
return issuing_authority;
|
||||
}
|
||||
|
||||
public void setIssuing_authority(String issuing_authority) {
|
||||
this.issuing_authority = issuing_authority;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getBirth_date() {
|
||||
return birth_date;
|
||||
}
|
||||
|
||||
public void setBirth_date(String birth_date) {
|
||||
this.birth_date = birth_date;
|
||||
}
|
||||
|
||||
public String getIntegrity_assessment_info() {
|
||||
return integrity_assessment_info;
|
||||
}
|
||||
|
||||
public void setIntegrity_assessment_info(String integrity_assessment_info) {
|
||||
this.integrity_assessment_info = integrity_assessment_info;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDriving_class() {
|
||||
return driving_class;
|
||||
}
|
||||
|
||||
public void setDriving_class(String driving_class) {
|
||||
this.driving_class = driving_class;
|
||||
}
|
||||
|
||||
public String getCertificate_number() {
|
||||
return certificate_number;
|
||||
}
|
||||
|
||||
public void setCertificate_number(String certificate_number) {
|
||||
this.certificate_number = certificate_number;
|
||||
}
|
||||
|
||||
public String getContinuing_education_info() {
|
||||
return continuing_education_info;
|
||||
}
|
||||
|
||||
public void setContinuing_education_info(String continuing_education_info) {
|
||||
this.continuing_education_info = continuing_education_info;
|
||||
}
|
||||
|
||||
public static class QualificationCategoryListDTO {
|
||||
private String issue_date;
|
||||
private String expiry_date;
|
||||
private String category;
|
||||
|
||||
public String getIssue_date() {
|
||||
return issue_date;
|
||||
}
|
||||
|
||||
public void setIssue_date(String issue_date) {
|
||||
this.issue_date = issue_date;
|
||||
}
|
||||
|
||||
public String getExpiry_date() {
|
||||
return expiry_date;
|
||||
}
|
||||
|
||||
public void setExpiry_date(String expiry_date) {
|
||||
this.expiry_date = expiry_date;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -71,6 +71,114 @@ public class OCRVehicleBackLicenseBean {
|
||||
private String fileNumber;
|
||||
private String carNumber;
|
||||
private int licenseId;
|
||||
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 approveTon;
|
||||
private String recordId;
|
||||
private String issuingAuthority;
|
||||
|
||||
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 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 getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getIsSave() {
|
||||
return isSave;
|
||||
|
@ -63,6 +63,96 @@ public class OCRVehicleLicenseBean {
|
||||
private String url;
|
||||
private String vehicleNumber;
|
||||
private String licenseId;
|
||||
private String ownerName;
|
||||
private String regTime;
|
||||
private String issuingAuthority;
|
||||
private String engine;
|
||||
private String vclN;
|
||||
private String licensedateOfissue;
|
||||
private String vin;
|
||||
private String vcltype;
|
||||
private String vclBrand;
|
||||
private String natureOfUsage;
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getRegTime() {
|
||||
return regTime;
|
||||
}
|
||||
|
||||
public void setRegTime(String regTime) {
|
||||
this.regTime = regTime;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getLicensedateOfissue() {
|
||||
return licensedateOfissue;
|
||||
}
|
||||
|
||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
||||
this.licensedateOfissue = licensedateOfissue;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public String getLicenseId() {
|
||||
return licenseId;
|
||||
|
@ -3,13 +3,16 @@ package com.arpa.hndahesudintocctmsdriver.request;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkDate;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkHttpUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequestUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import okhttp3.Request;
|
||||
|
||||
public class OCRRequest {
|
||||
@ -23,37 +26,101 @@ public class OCRRequest {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()), getToken(con), file);
|
||||
RequestUtil.start(12, "OCR_BANK", re, con, hd);
|
||||
}
|
||||
|
||||
//银行卡识别-中交
|
||||
public void ORCBankZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getOrcBank() + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "OCR_BANK", re, con, hd);
|
||||
}
|
||||
|
||||
//从业资格证-中交
|
||||
public void ORCQualificaZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getTransQualificationCertOCR" + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "ORCQualificaZj", re, con, hd);
|
||||
}
|
||||
|
||||
//道路运输许可证-中交
|
||||
public void ORCRoadLicZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getVehicleRoadLicenseOCR" + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "ORCRoadLicZj", re, con, hd);
|
||||
}
|
||||
|
||||
//身份证正面识别
|
||||
public void OCRCard(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证背面识别
|
||||
public void OCRCardBack(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证正面识别-中交
|
||||
public void OCRZjCard(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证背面识别-中交
|
||||
public void OCRZjCardBack(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证正面识别
|
||||
public void OCRDrivingLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证背面识别
|
||||
public void OCRDrivingLicenseBack(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证正面识别-中交
|
||||
public void OCRDrivingLicenseZj(Context con, Handler hd, String imgUrl){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?faceDataUrl="+imgUrl,""),getToken(con),con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
||||
}
|
||||
|
||||
//驾驶证背面识别-中交
|
||||
public void OCRDrivingLicenseBackZj(Context con, Handler hd, String imgUrl){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?backDataUrl="+imgUrl,""),getToken(con),con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//行驶证正面识别
|
||||
public void OCRVehicleLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
||||
}
|
||||
|
||||
//行驶证背面识别
|
||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file, String carId, String carNum, boolean isSave) {
|
||||
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()), file, getToken(con), carId, carNum, isSave);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
||||
}
|
||||
|
||||
|
||||
//行驶证正面识别-中交
|
||||
public void OCRVehicleLicenseZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
||||
}
|
||||
|
||||
//行驶证背面识别-中交
|
||||
public void OCRVehicleLicenseBackZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
||||
}
|
||||
|
||||
public void OCRPlateLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, "carName", re, con, hd);
|
||||
|
@ -100,17 +100,21 @@ public class RequestConstant {
|
||||
//--ORC识别--
|
||||
|
||||
//银行卡识别
|
||||
private static final String ORC_BANK = "/common/ocr/bank";
|
||||
// private static final String ORC_BANK = "/common/ocr/bank";
|
||||
private static final String ORC_BANK = "sinoiov/ocr/getBankcardOCR";
|
||||
//身份证正面
|
||||
private static final String ID_CARD_FRONT = "/common/ocr/idCardFront";
|
||||
// private static final String ID_CARD_FRONT = "/common/ocr/idCardFront";
|
||||
private static final String ID_CARD_FRONT = "sinoiov/ocr/getIdCardLicenseV2";
|
||||
//身份证识别反面
|
||||
private static final String ID_CARD_BACK = "/common/ocr/idCardBack";
|
||||
//驾驶证正面
|
||||
private static final String DRIVING_LICENSE = "/common/ocr/drivingLicense";
|
||||
// private static final String DRIVING_LICENSE = "/common/ocr/drivingLicense";
|
||||
private static final String DRIVING_LICENSE = "sinoiov/ocr/getDrivingLicenseOCRV2";
|
||||
//驾驶证副页
|
||||
private static final String DRIVING_LICENSE_BACK = "/common/ocr/drivingLicenseBack";
|
||||
//行驶证正面
|
||||
private static final String VEHICLE_LICENSE = "/common/ocr/vehicleLicense";
|
||||
// private static final String VEHICLE_LICENSE = "/common/ocr/vehicleLicense";
|
||||
private static final String VEHICLE_LICENSE = "sinoiov/ocr/getVehicleLicenseOCRV2";
|
||||
//行驶证副页
|
||||
private static final String VEHICLE_LICENSE_BACK = "/common/ocr/v2/vehicleBackLicenseV3";
|
||||
//身份证认证信息
|
||||
@ -125,7 +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/saveVehicleLicense";
|
||||
private static final String SAVEVEHICLELICENSE = "app/carDriver/save";
|
||||
//从业资格证认证
|
||||
private static final String DRIVER_AUTH_QUALIFICATION = "/app/driver/auth/driverAuthQualification";
|
||||
//车辆等级证书
|
||||
|
@ -20,9 +20,12 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRQualiBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||
@ -83,6 +86,10 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
if ("0".equals(type)) {//从业资格识别,党员认证不识别
|
||||
new OCRRequest().ORCQualificaZj(con, hd, ub.getData().getUrl());
|
||||
}
|
||||
|
||||
url = ub.getData().getUrl();
|
||||
Glide.with(con).load(url).into(img);
|
||||
up_img.setVisibility(View.GONE);
|
||||
@ -90,6 +97,24 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("ORCQualificaZj") != null) {
|
||||
OCRQualiBean ocrQualiBean = gson.fromJson(CacheGroup.cacheList.get("ORCQualificaZj"), OCRQualiBean.class);
|
||||
if (ocrQualiBean.getCode() == 200 && ocrQualiBean.getData() != null) {
|
||||
List<OCRQualiBean.DataDTO.QualificationCategoryListDTO> qualificationCategoryList = ocrQualiBean.getData().getQualification_category_list();
|
||||
if (qualificationCategoryList != null && qualificationCategoryList.size() > 0) {
|
||||
String expiryDate = qualificationCategoryList.get(0).getExpiry_date();
|
||||
if (expiryDate.contains("-")){
|
||||
value2.setText(expiryDate);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("ORCQualificaZj");
|
||||
}
|
||||
|
||||
|
||||
if (CacheGroup.cacheList.get("isAuthDriverAuthQualification") != null) {
|
||||
Log.e("is", CacheGroup.cacheList.get("isAuthDriverAuthQualification"));
|
||||
ib = gson.fromJson(CacheGroup.cacheList.get("isAuthDriverAuthQualification"), IsAuthDriverAuthQualificationBean.class);
|
||||
@ -132,7 +157,6 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
Toast.makeText(con, "资格证上传成功", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
@ -300,7 +324,6 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
tvSkip.setOnClickListener(v -> {
|
||||
|
||||
|
||||
|
||||
if (type.equals("0")) {
|
||||
// finish();
|
||||
if (key) {
|
||||
|
@ -345,6 +345,92 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
}
|
||||
CacheGroup.cacheList.remove(CAR_COLOR);
|
||||
} else if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
// url3 = ub.getData().getUrl();
|
||||
// fid = ub.getData().getId();
|
||||
//// Glide.with(con).load(url3).into(img3);
|
||||
// Glide.with(con).load(path).into(img3);
|
||||
String imageUrl = ub.getData().getUrl();
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRZjCard(con, hd, imageUrl);
|
||||
} else {
|
||||
Log.e("res" + new File(path).getName(), new File(path).getPath());
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRZjCardBack(con, hd, imageUrl);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRDrivingLicenseZj(con, hd, imageUrl);
|
||||
} else {
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRDrivingLicenseBackZj(con, hd, imageUrl);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseZj(con, hd, imageUrl);
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
customDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseBackZj(con, hd, imageUrl);
|
||||
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
Log.e("添加挂车", "挂车" + oCrcarId);
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
customDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
} else if (CacheGroup.cacheList.get(CAR_ENERGY_TYPE) != null) {
|
||||
DicBean bb = gson.fromJson(CacheGroup.cacheList.get(CAR_ENERGY_TYPE), DicBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
@ -375,12 +461,13 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
CacheGroup.cacheList.remove("authUrl");
|
||||
} else {
|
||||
pathOrcRes();
|
||||
//重复代码?
|
||||
initView(null);
|
||||
if (!(CacheGroup.cacheList.get(TYPE_NAME_BANK[2]) != null || CacheGroup.cacheList.get(TYPE_NAME_BANK[3]) != null)) {
|
||||
initData();
|
||||
}
|
||||
pathOrcRes();
|
||||
|
||||
}
|
||||
break;
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
@ -783,14 +870,12 @@ 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) {
|
||||
url1 = ocb.getData().getUrl();
|
||||
if (ocb.getCode() == 200&&ocb.getData()!=null) {
|
||||
// url1 = ocb.getData().getUrl();
|
||||
value1.setText(ocb.getData().getName());
|
||||
value2.setText(ocb.getData().getCardId());
|
||||
value2.setText(ocb.getData().getIdcard());
|
||||
value3.setText(ocb.getData().getAddress());
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
Glide.with(con).load(path).into(img1);
|
||||
fontId = ocb.getData().getId();
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -798,14 +883,10 @@ 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) {
|
||||
url2 = ocbb.getData().getUrl();
|
||||
value4.setText(ocbb.getData().getEndTime());
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
if (ocbb.getCode() == 200&&ocbb.getData()!=null) {
|
||||
value4.setText(ocbb.getData().getValidTo());
|
||||
Glide.with(con).load(path).into(img2);
|
||||
startTime = ocbb.getData().getStartTime();
|
||||
backId = ocbb.getData().getId();
|
||||
|
||||
startTime = ocbb.getData().getValidFrom();
|
||||
//自动调取提交功能,实现页面自动跳转
|
||||
subimt();
|
||||
} else {
|
||||
@ -818,17 +899,15 @@ 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) {
|
||||
if (odl.getCode() == 200&&odl.getData()!=null) {
|
||||
OCRDrivingLicenseBean.DataDTO od = odl.getData();
|
||||
url1 = odl.getData().getUrl();
|
||||
// url1 = odl.getData().getUrl();
|
||||
value7.setText(StringUtil.isNull(od.getName(), "识别异常"));
|
||||
value1.setText(StringUtil.isNull(od.getNumber(), "识别异常"));
|
||||
value2.setText(StringUtil.isNull(od.getStartTime(), "识别异常"));
|
||||
value3.setText(StringUtil.isNull(od.getAllowType(), "识别异常"));
|
||||
value4.setText(StringUtil.isNull(od.getEndTime(), "识别异常"));
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
value1.setText(StringUtil.isNull(od.getIdcard(), "识别异常"));
|
||||
value2.setText(StringUtil.isNull(od.getFirstGetDocDate(), "识别异常"));
|
||||
value3.setText(StringUtil.isNull(od.getQuasiDriveType(), "识别异常"));
|
||||
value4.setText(StringUtil.isNull(od.getEndDate(), "识别异常"));
|
||||
Glide.with(con).load(path).into(img1);
|
||||
fontId = od.getId();
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -836,13 +915,10 @@ 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) {
|
||||
url2 = odlb.getData().getUrl();
|
||||
backId = odlb.getData().getId();
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
if (odlb.getCode() == 200&&odlb.getData()!=null) {
|
||||
Glide.with(con).load(path).into(img2);
|
||||
//自动调取提交功能,实现页面自动跳转
|
||||
subimt();
|
||||
// subimt();
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -855,56 +931,45 @@ 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) {
|
||||
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();
|
||||
// url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||
ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
|
||||
} else {
|
||||
value1.setEnabled(true);
|
||||
}
|
||||
url1 = olb.getData().getUrl();
|
||||
value1.setText(olb.getData().getCarNumber());
|
||||
value2.setText(olb.getData().getType());
|
||||
value3.setText(olb.getData().getOwner());
|
||||
value4.setText(olb.getData().getVehicleNumber());
|
||||
fontId = olb.getData().getId();
|
||||
// url1 = olb.getData().getUrl();
|
||||
value1.setText(olb.getData().getVclN());
|
||||
value2.setText(olb.getData().getVcltype());
|
||||
value3.setText(olb.getData().getOwnerName());
|
||||
value4.setText(olb.getData().getVin());
|
||||
// fontId = olb.getData().getId();
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
Glide.with(con).load(path).into(img1);
|
||||
oCrcarId = olb.getData().getCarId() + "";
|
||||
Log.e("-cardId-", oCrcarId);
|
||||
} else {
|
||||
Toast.makeText(con, olb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(TYPE_NAME[2]);
|
||||
}
|
||||
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) {
|
||||
url2 = oblb.getData().getUrl();
|
||||
backId = oblb.getData().getId();
|
||||
if (oblb.getCode() == 200&&oblb.getData()!=null) {
|
||||
// url2 = oblb.getData().getUrl();
|
||||
// backId = oblb.getData().getId();
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
Glide.with(con).load(path).into(img2);
|
||||
//自动调取提交功能,实现页面自动跳转实现页面自动跳转
|
||||
subimt();
|
||||
} else {
|
||||
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(TYPE_NAME_BANK[2]);
|
||||
}
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
url3 = ub.getData().getUrl();
|
||||
fid = ub.getData().getId();
|
||||
// Glide.with(con).load(url3).into(img3);
|
||||
Glide.with(con).load(path).into(img3);
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -921,29 +986,35 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRCard(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRCard(con, hd, new File(path));
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
Log.e("res" + new File(path).getName(), new File(path).getPath());
|
||||
new OCRRequest().OCRCardBack(con, hd, new File(path));
|
||||
// new OCRRequest().OCRCardBack(con, hd, new File(path));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRDrivingLicense(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRDrivingLicense(con, hd, new File(path));
|
||||
} else {
|
||||
new OCRRequest().OCRDrivingLicenseBack(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRDrivingLicenseBack(con, hd, new File(path));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
customDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
@ -952,7 +1023,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
case 3:
|
||||
Log.e("添加挂车", "挂车" + oCrcarId);
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
@ -968,7 +1040,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
isExist = true;
|
||||
}
|
||||
}
|
||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
}
|
||||
@ -1005,7 +1078,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
} else {
|
||||
ib.setIdcardSex(2);
|
||||
}
|
||||
ib.setIdcardValidity(ocbb.getData().getEndTime());
|
||||
ib.setIdcardValidity(ocbb.getData().getValidTo());
|
||||
new AuthRequest().driverAuthIdCard(con, hd, ib);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
@ -1022,11 +1095,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
iib.setArchivesName(str1);
|
||||
iib.setDriverLicenseName(value7.getText().toString());
|
||||
iib.setAllowType(str3);
|
||||
iib.setDriverLicense(odl.getData().getNumber());
|
||||
iib.setDriverLicense(odl.getData().getIdcard());
|
||||
iib.setDriverLicenseBackPhoto(backId);
|
||||
iib.setDriverLicensePhoto(fontId);
|
||||
iib.setEndTime(odl.getData().getEndTime());
|
||||
iib.setFirstTime(odl.getData().getFirstTime());
|
||||
iib.setEndTime(odl.getData().getEndDate());
|
||||
iib.setFirstTime(odl.getData().getFirstGetDocDate());
|
||||
new AuthRequest().driverAuthLicense(con, hd, iib);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
@ -1044,11 +1117,31 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
if ("".equals(url3)) {
|
||||
map.put("imgId", fid);
|
||||
}
|
||||
map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||
map.put("carNumber", str1);
|
||||
// map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||
map.put("carNum", str1);
|
||||
map.put("type", str2);
|
||||
map.put("owner", str3);
|
||||
map.put("vehicleNumber", str4);
|
||||
map.put("vehicleNumber", str4);//车辆识别代号
|
||||
|
||||
|
||||
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());//准牵引总质量
|
||||
// if (olb.getData().isCarExist()) {
|
||||
// map.put("carId", olb.getData().getCarId());
|
||||
// }
|
||||
@ -1081,6 +1174,28 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
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());//准牵引总质量
|
||||
|
||||
|
||||
|
||||
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
|
@ -20,10 +20,13 @@ import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarDelBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.IsAuthDriverAuthQualificationBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRBankBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.WalletFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
@ -104,6 +107,18 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
CacheGroup.cacheList.remove("onlyGetDetail");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("ORCRoadLicZj") != null) {
|
||||
OCRBankBean ib = new Gson().fromJson(CacheGroup.cacheList.get("ORCRoadLicZj"), OCRBankBean.class);
|
||||
customDialog.dismiss();
|
||||
// if (ib.getCode() == 200&&ib.getData()!=null) {
|
||||
// initView(null);
|
||||
// WalletFragment.isInsBank = true;
|
||||
// } else {
|
||||
// Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
CacheGroup.cacheList.remove("ORCRoadLicZj");
|
||||
}
|
||||
|
||||
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
UploadBean ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
@ -118,7 +133,9 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 5);
|
||||
break;
|
||||
case 3:
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
||||
//道路运输证ocr识别
|
||||
new OCRRequest().ORCRoadLicZj(con, hd, ub.getData().getUrl());
|
||||
// new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
||||
break;
|
||||
case 4:
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 7);
|
||||
|
@ -14,6 +14,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||
@ -65,6 +67,7 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
boolean isAuth = false;
|
||||
private WalletRequest qr;
|
||||
private TextView tp;
|
||||
private String imageId;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@ -74,11 +77,11 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
if (CacheGroup.cacheList.get("OCR_BANK") != null) {
|
||||
ib = new Gson().fromJson(CacheGroup.cacheList.get("OCR_BANK"), OCRBankBean.class);
|
||||
customDialog.dismiss();
|
||||
if (ib.getCode() == 200) {
|
||||
if (ib.getCode() == 200&&ib.getData()!=null) {
|
||||
initView(null);
|
||||
WalletFragment.isInsBank = true;
|
||||
} else {
|
||||
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("OCR_BANK");
|
||||
}
|
||||
@ -119,12 +122,26 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
}
|
||||
CacheGroup.cacheList.remove("insBank");
|
||||
}
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
UploadBean ub = new Gson().fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
imageId = ub.getData().getId()+"";
|
||||
new OCRRequest().ORCBankZj(con, hd, ub.getData().getUrl());
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
break;
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
customDialog = new CustomDialog(con, "上传识别中...");
|
||||
customDialog.show();
|
||||
path = (String) m.obj;
|
||||
new OCRRequest().ORCBank(con, hd, new File(path));
|
||||
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
|
||||
// new OCRRequest().ORCBank(con, hd, new File(path));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -184,8 +201,8 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
bank_name.setText(ib.getData().getBankName());
|
||||
bank_number.setText(ib.getData().getBankCardNumber());
|
||||
Glide.with(con).load(ib.getData().getUrl()).into(up_bank_img);
|
||||
bank_number.setText(ib.getData().getCardNumber());
|
||||
Glide.with(con).load(path).into(up_bank_img);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -224,10 +241,11 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
}
|
||||
InsBankInputBean ibib = new InsBankInputBean();
|
||||
ibib.setCardNo(bankNumber);
|
||||
ibib.setCardType(Integer.parseInt(ib.getData().getBankCardType()));
|
||||
// ibib.setCardType(Integer.parseInt(ib.getData().getType()));
|
||||
ibib.setCardType(1);
|
||||
ibib.setBankName(bankName);
|
||||
ibib.setCardUserType(1);
|
||||
ibib.setImageId(ib.getData().getId());
|
||||
ibib.setImageId(Integer.parseInt(imageId));
|
||||
Log.e("-res-", new Gson().toJson(ibib));
|
||||
qr.insBankCard(ibib);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user