车头,挂车,道路运输证新增绑定逻辑,优化车辆解绑逻辑
This commit is contained in:
parent
141c38182f
commit
bc135b9e98
@ -59,6 +59,7 @@ public class OCRVehicleBackLicenseBean {
|
|||||||
private int id;
|
private int id;
|
||||||
private String url;
|
private String url;
|
||||||
private String checkRecord;
|
private String checkRecord;
|
||||||
|
private String isSave;
|
||||||
private String approvedCapacity;
|
private String approvedCapacity;
|
||||||
private String allCapacity;
|
private String allCapacity;
|
||||||
private String size;
|
private String size;
|
||||||
@ -71,6 +72,14 @@ public class OCRVehicleBackLicenseBean {
|
|||||||
private String carNumber;
|
private String carNumber;
|
||||||
private int licenseId;
|
private int licenseId;
|
||||||
|
|
||||||
|
public String getIsSave() {
|
||||||
|
return isSave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsSave(String isSave) {
|
||||||
|
this.isSave = isSave;
|
||||||
|
}
|
||||||
|
|
||||||
public int getLicenseId() {
|
public int getLicenseId() {
|
||||||
return licenseId;
|
return licenseId;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,9 @@ public class OCRVehicleLicenseBean {
|
|||||||
private String address;
|
private String address;
|
||||||
private int carId;
|
private int carId;
|
||||||
private String carNumber;
|
private String carNumber;
|
||||||
|
private boolean carExist;
|
||||||
private String dateIssue;
|
private String dateIssue;
|
||||||
|
private String backImage;
|
||||||
private String engineNumber;
|
private String engineNumber;
|
||||||
private int id;
|
private int id;
|
||||||
private String model;
|
private String model;
|
||||||
@ -61,6 +63,32 @@ public class OCRVehicleLicenseBean {
|
|||||||
private String url;
|
private String url;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
|
|
||||||
|
private DataDto2 existCarInfo;
|
||||||
|
|
||||||
|
public DataDto2 getExistCarInfo() {
|
||||||
|
return existCarInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExistCarInfo(DataDto2 existCarInfo) {
|
||||||
|
this.existCarInfo = existCarInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCarExist() {
|
||||||
|
return carExist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBackImage() {
|
||||||
|
return backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackImage(String backImage) {
|
||||||
|
this.backImage = backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarExist(boolean carExist) {
|
||||||
|
this.carExist = carExist;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address == null ? "" : address;
|
return address == null ? "" : address;
|
||||||
}
|
}
|
||||||
@ -173,4 +201,44 @@ public class OCRVehicleLicenseBean {
|
|||||||
this.vehicleNumber = vehicleNumber;
|
this.vehicleNumber = vehicleNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class DataDto2 {
|
||||||
|
private String backImage;
|
||||||
|
private String carId;
|
||||||
|
private String licenseId;
|
||||||
|
|
||||||
|
private CarDelBean.DataDTO trailerResVo;
|
||||||
|
|
||||||
|
public CarDelBean.DataDTO getTrailerResVo() {
|
||||||
|
return trailerResVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrailerResVo(CarDelBean.DataDTO trailerResVo) {
|
||||||
|
this.trailerResVo = trailerResVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLicenseId() {
|
||||||
|
return licenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLicenseId(String licenseId) {
|
||||||
|
this.licenseId = licenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBackImage() {
|
||||||
|
return backImage == null ? "" : backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackImage(String backImage) {
|
||||||
|
this.backImage = backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCarId() {
|
||||||
|
return carId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarId(String carId) {
|
||||||
|
this.carId = carId;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ public class OCRRequest {
|
|||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
||||||
}
|
}
|
||||||
//行驶证背面识别
|
//行驶证背面识别
|
||||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file,String carId,String carNum){
|
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);
|
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);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ public class RequestConstant {
|
|||||||
//车辆详情
|
//车辆详情
|
||||||
private static final String GET_CAR_DEL = "/app/carDriver/getCarInfo";
|
private static final String GET_CAR_DEL = "/app/carDriver/getCarInfo";
|
||||||
//删除车辆
|
//删除车辆
|
||||||
private static final String DEL_CAR = "/app/carDriver/removeCar";
|
private static final String DEL_CAR = "/app/carDriver/unBindCar";
|
||||||
//上传车辆照片
|
//上传车辆照片
|
||||||
private static final String SAVECARIMG = "/app/carDriver/saveCarImg";
|
private static final String SAVECARIMG = "/app/carDriver/saveCarImg";
|
||||||
//上传头像保存
|
//上传头像保存
|
||||||
|
@ -221,6 +221,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index", 3);
|
in.putExtra("index", 3);
|
||||||
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
|
||||||
|
CarDelBean carDelBean = new CarDelBean();
|
||||||
|
carDelBean.setRes(1);//保留字段 1:为绑定车辆,可以进行修改挂车信息
|
||||||
|
carDelBean.setData(gson.fromJson(gson.toJson(olb.getData().getExistCarInfo()), CarDelBean.DataDTO.class));
|
||||||
|
in.putExtra("cheData", gson.toJson(carDelBean));
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else if ("1".equals(needUpQCPhoto)) {//判断是否跳转从业资格证
|
} else if ("1".equals(needUpQCPhoto)) {//判断是否跳转从业资格证
|
||||||
Intent in = new Intent(con, AuthQualificationActivity.class);
|
Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
@ -231,6 +236,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
} else if ("1".equals(needUpRLPhoto)) {//判断是否跳转道路运输许可证
|
} else if ("1".equals(needUpRLPhoto)) {//判断是否跳转道路运输许可证
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carExist", true);
|
||||||
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
} else {
|
||||||
@ -283,6 +289,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
} else if ("1".equals(needUpRLPhoto)) {//现判断是否跳转道路运输许可证
|
} else if ("1".equals(needUpRLPhoto)) {//现判断是否跳转道路运输许可证
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carExist", true);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
} else {
|
||||||
@ -671,14 +678,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
value3.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getOwner(), "空数据"));
|
value3.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getOwner(), "空数据"));
|
||||||
value4.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getVehicleNumber(), "空数据"));
|
value4.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getVehicleNumber(), "空数据"));
|
||||||
value6.setText(StringUtil.isNull(cdb.getData().getCarEnergyTypValue(), "空数据"));
|
value6.setText(StringUtil.isNull(cdb.getData().getCarEnergyTypValue(), "空数据"));
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
|
||||||
Glide.with(con).load(url1).into(img1);
|
Glide.with(con).load(url1).into(img1);
|
||||||
Glide.with(con).load(url2).into(img2);
|
Glide.with(con).load(url2).into(img2);
|
||||||
Glide.with(con).load(url3).into(img3);
|
Glide.with(con).load(url3).into(img3);
|
||||||
u_img.setText("已上传");
|
if (cdb.getRes() != 1) {
|
||||||
u_img2.setText("已上传");
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
u_img3.setText("点击查看");
|
u_img.setText("已上传");
|
||||||
isAuth = true;
|
u_img2.setText("已上传");
|
||||||
|
u_img3.setText("点击查看");
|
||||||
|
isAuth = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -806,6 +815,13 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
||||||
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
||||||
if (olb.getCode() == 200) {
|
if (olb.getCode() == 200) {
|
||||||
|
if (olb.getData().isCarExist()) {
|
||||||
|
value1.setEnabled(false);
|
||||||
|
Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2);
|
||||||
|
url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||||
|
} else {
|
||||||
|
value1.setEnabled(true);
|
||||||
|
}
|
||||||
url1 = olb.getData().getUrl();
|
url1 = olb.getData().getUrl();
|
||||||
value1.setText(olb.getData().getCarNumber());
|
value1.setText(olb.getData().getCarNumber());
|
||||||
value2.setText(olb.getData().getType());
|
value2.setText(olb.getData().getType());
|
||||||
@ -828,7 +844,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
backId = oblb.getData().getId();
|
backId = oblb.getData().getId();
|
||||||
// Glide.with(con).load(url2).into(img2);
|
// Glide.with(con).load(url2).into(img2);
|
||||||
Glide.with(con).load(path).into(img2);
|
Glide.with(con).load(path).into(img2);
|
||||||
//自动调取提交功能,实现页面自动跳转
|
//自动调取提交功能,实现页面自动跳转实现页面自动跳转
|
||||||
subimt();
|
subimt();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@ -885,7 +901,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum);
|
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
new AuthRequest().upload(con, hd, new File(path));
|
new AuthRequest().upload(con, hd, new File(path));
|
||||||
@ -901,7 +917,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum);
|
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||||
} else {
|
} else {
|
||||||
new AuthRequest().upload(con, hd, new File(path));
|
new AuthRequest().upload(con, hd, new File(path));
|
||||||
}
|
}
|
||||||
@ -962,7 +978,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (olb != null && oblb != null) {
|
if ((olb != null && !olb.getData().isCarExist() && oblb != null) || (olb != null && olb.getData().isCarExist())) {
|
||||||
// if (curColor == null || curEnergy == null) {
|
// if (curColor == null || curEnergy == null) {
|
||||||
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
||||||
// return;
|
// return;
|
||||||
@ -971,11 +987,14 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if ("".equals(url3)) {
|
if ("".equals(url3)) {
|
||||||
map.put("imgId", fid);
|
map.put("imgId", fid);
|
||||||
}
|
}
|
||||||
map.put("licenseId", oblb.getData().getLicenseId());
|
map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||||
map.put("carNumber", str1);
|
map.put("carNumber", str1);
|
||||||
map.put("type", str2);
|
map.put("type", str2);
|
||||||
map.put("owner", str3);
|
map.put("owner", str3);
|
||||||
map.put("vehicleNumber", str4);
|
map.put("vehicleNumber", str4);
|
||||||
|
// if (olb.getData().isCarExist()) {
|
||||||
|
// map.put("carId", olb.getData().getCarId());
|
||||||
|
// }
|
||||||
// map.put("carPlateColor", curColor.getValue());
|
// map.put("carPlateColor", curColor.getValue());
|
||||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||||
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
||||||
@ -984,7 +1003,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (olb != null && oblb != null) {
|
if (olb != null || (cdb != null && cdb.getRes() == 1)) {
|
||||||
// if (curEnergy==null){
|
// if (curEnergy==null){
|
||||||
// Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show();
|
||||||
// return;
|
// return;
|
||||||
@ -993,13 +1012,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if ("".equals(url3)) {
|
if ("".equals(url3)) {
|
||||||
map.put("imgId", fid);
|
map.put("imgId", fid);
|
||||||
}
|
}
|
||||||
map.put("licenseId", oblb.getData().getLicenseId());
|
// map.put("licenseId", oblb.getData().getLicenseId());
|
||||||
map.put("carId", carId);
|
map.put("carId", carId);
|
||||||
map.put("carNumberDraw", str1);
|
map.put("carNumberDraw", str1);
|
||||||
map.put("type", str2);
|
map.put("type", str2);
|
||||||
map.put("owner", str3);
|
map.put("owner", str3);
|
||||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||||
map.put("vehicleNumber", str4);
|
map.put("vehicleNumber", str4);
|
||||||
|
if (cdb != null && cdb.getRes() == 1 && cdb.getData() != null && cdb.getData().getTrailerResVo() != null) {
|
||||||
|
map.put("oldTrailerNumber", cdb.getData().getTrailerResVo().getCarNumber());
|
||||||
|
}
|
||||||
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -79,6 +79,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
private int type;//页面类型
|
private int type;//页面类型
|
||||||
private String path, carId, url;//图片路径
|
private String path, carId, url;//图片路径
|
||||||
|
private boolean carExist = false;
|
||||||
private GetImageAlert gia = new GetImageAlert();
|
private GetImageAlert gia = new GetImageAlert();
|
||||||
private CustomDialog customDialog;
|
private CustomDialog customDialog;
|
||||||
|
|
||||||
@ -206,8 +207,6 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
// if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
||||||
// if (!"".equals(carId)) {
|
// if (!"".equals(carId)) {
|
||||||
// finish();
|
// finish();
|
||||||
@ -288,6 +287,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
type = getIntent().getExtras().getInt("type");
|
type = getIntent().getExtras().getInt("type");
|
||||||
carId = getIntent().getExtras().getString("carId", "");
|
carId = getIntent().getExtras().getString("carId", "");
|
||||||
|
carExist = getIntent().getExtras().getBoolean("carExist", false);
|
||||||
changeViewByType(type);
|
changeViewByType(type);
|
||||||
|
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
@ -509,8 +509,11 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
||||||
Glide.with(con).load(cdb.getData().getRoadLicensePhoto()).into(img);
|
Glide.with(con).load(cdb.getData().getRoadLicensePhoto()).into(img);
|
||||||
value1.setText(cdb.getData().getRoadLicense());
|
value1.setText(cdb.getData().getRoadLicense());
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
if (!carExist) {
|
||||||
upload_img.setText("已上传");
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
|
upload_img.setText("已上传");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (4 == type) {
|
} else if (4 == type) {
|
||||||
if (!TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl())) {
|
if (!TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl())) {
|
||||||
|
@ -81,6 +81,8 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
||||||
if (bb.getCode()==200) {
|
if (bb.getCode()==200) {
|
||||||
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
||||||
|
VehicleEvent ve = new VehicleEvent("");
|
||||||
|
EventBus.getDefault().post(ve);
|
||||||
finish();
|
finish();
|
||||||
}else{
|
}else{
|
||||||
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
@ -214,7 +216,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
View vs2=v.findViewById(R.id.vs2);
|
View vs2=v.findViewById(R.id.vs2);
|
||||||
r4.setVisibility(View.GONE);
|
r4.setVisibility(View.GONE);
|
||||||
r5.setVisibility(View.GONE);
|
r5.setVisibility(View.GONE);
|
||||||
vs1.setVisibility(View.GONE);
|
// vs1.setVisibility(View.GONE);
|
||||||
vs2.setVisibility(View.GONE);
|
vs2.setVisibility(View.GONE);
|
||||||
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
||||||
r4.setVisibility(View.VISIBLE);
|
r4.setVisibility(View.VISIBLE);
|
||||||
|
@ -7,6 +7,7 @@ import android.graphics.Outline;
|
|||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -240,9 +241,9 @@ public class HomeFragment extends BaseFragment {
|
|||||||
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!"".equals(deb.getData().getDriverLicenseUpdateUrl()) || !"".equals(deb.getData().getIdCardUpdateUrl())||
|
if (!TextUtils.isEmpty(deb.getData().getDriverLicenseUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getIdCardUpdateUrl())||
|
||||||
!"".equals(deb.getData().getQualificationUpdateUrl())||!"".equals(deb.getData().getRoadLicenseUpdateUrl())||
|
!TextUtils.isEmpty(deb.getData().getQualificationUpdateUrl())||!TextUtils.isEmpty(deb.getData().getRoadLicenseUpdateUrl())||
|
||||||
!"".equals(deb.getData().getInsuranceUpdateUrl())) {
|
!TextUtils.isEmpty(deb.getData().getInsuranceUpdateUrl())) {
|
||||||
new XToast<>(act)
|
new XToast<>(act)
|
||||||
.setContentView(R.layout.view_bc)
|
.setContentView(R.layout.view_bc)
|
||||||
// 设置成可拖拽的
|
// 设置成可拖拽的
|
||||||
|
@ -94,11 +94,15 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("upload") != null) {
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Log.e("upload", CacheGroup.cacheList.get("upload"));
|
Log.e("upload", CacheGroup.cacheList.get("upload"));
|
||||||
ub = gson.fromJson(CacheGroup.cacheList.remove("upload"), UploadBean.class);
|
ub = gson.fromJson(CacheGroup.cacheList.remove("upload"), UploadBean.class);
|
||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
imgIds.add(ub.getData().getId());
|
imgIds.add(ub.getData().getId());
|
||||||
Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
// Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
||||||
|
Glide.with(con).load(path).into(res_img);
|
||||||
res_img.setVisibility(View.VISIBLE);
|
res_img.setVisibility(View.VISIBLE);
|
||||||
img_delete.setVisibility(View.VISIBLE);
|
img_delete.setVisibility(View.VISIBLE);
|
||||||
img_icon.setVisibility(View.GONE);
|
img_icon.setVisibility(View.GONE);
|
||||||
@ -152,6 +156,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
hyr.uploadFile(new File(path));
|
hyr.uploadFile(new File(path));
|
||||||
}
|
}
|
||||||
} else {//识别失败后返回code500
|
} else {//识别失败后返回code500
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
if (index == 0) {//装卸货车辆需要识别车牌号){
|
if (index == 0) {//装卸货车辆需要识别车牌号){
|
||||||
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
@ -331,6 +338,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
path = gia.getFile().getPath();
|
path = gia.getFile().getPath();
|
||||||
Log.e("图片地址:", path);
|
Log.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
|
|
||||||
|
if (customDialog!=null&&!customDialog.isShowing()){
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||||
@ -344,6 +357,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
path = paths;
|
path = paths;
|
||||||
Log.e("图片地址:", path);
|
Log.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
|
|
||||||
|
if (customDialog!=null&&!customDialog.isShowing()){
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.login;
|
package com.arpa.hndahesudintocctmsdriver.ui.login;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.wifi.WifiManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.provider.Settings;
|
||||||
|
import android.telecom.TelecomManager;
|
||||||
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
@ -38,6 +44,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBarUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBarUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import cn.jiguang.verifysdk.api.AuthPageEventListener;
|
import cn.jiguang.verifysdk.api.AuthPageEventListener;
|
||||||
|
@ -150,13 +150,14 @@ public class OkHttpUtil {
|
|||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Request postFiles(OkDate od,File file,String token,String carId,String carNum) {
|
public static Request postFiles(OkDate od,File file,String token,String carId,String carNum,boolean isSave) {
|
||||||
MediaType mediaType = MediaType.parse("text/plain");
|
MediaType mediaType = MediaType.parse("text/plain");
|
||||||
RequestBody body = new MultipartBody.Builder()
|
RequestBody body = new MultipartBody.Builder()
|
||||||
.setType(MultipartBody.FORM)
|
.setType(MultipartBody.FORM)
|
||||||
.addFormDataPart("file",file.getPath(),RequestBody.create(MediaType.parse("application/octet-stream"), file))
|
.addFormDataPart("file",file.getPath(),RequestBody.create(MediaType.parse("application/octet-stream"), file))
|
||||||
.addFormDataPart("carId",carId)
|
.addFormDataPart("carId",carId)
|
||||||
.addFormDataPart("carNum",carNum)
|
.addFormDataPart("carNum",carNum)
|
||||||
|
.addFormDataPart("isSave",isSave?"0":"1")
|
||||||
.build();
|
.build();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(od.getUrl())
|
.url(od.getUrl())
|
||||||
|
Loading…
Reference in New Issue
Block a user