@@ -81,7 +81,6 @@ | |||
android:allowBackup="false" | |||
android:icon="@mipmap/logo" | |||
android:label="${app_name}" | |||
android:networkSecurityConfig="@xml/network_security_config" | |||
android:requestLegacyExternalStorage="true" | |||
android:resizeableActivity="true" | |||
android:roundIcon="@mipmap/logo" |
@@ -70,7 +70,7 @@ public class EnumBean { | |||
public static EnumBean[] ORDER_STEP = { | |||
Add("1", "完成填写基本信息"), | |||
Add("2", "完成个人/单位信息上传"), | |||
Add("3", "已支付,待签约"), | |||
Add("3", "待签约"), | |||
Add("4", "完成车辆信息上传,待支付"), | |||
Add("5", "完成签约"), | |||
Add("6", "待审核"), |
@@ -164,29 +164,39 @@ public class OrderUtils { | |||
case Constants.ORDER_STATUS_BASE://完成填写基本信息 | |||
case Constants.ORDER_STATUS_ALREADYJGQY_CODE://完成加购。待支付 | |||
case Constants.ORDER_STATUS_NO_AUDIT://审核不通过 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnUserInfoUpload.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnUserInfoUpload.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_INFO://完成个人/单位信息上传 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnCarInfoUpload.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnCarInfoUpload.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_CAR://完成车辆信息上传 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnConfirmInfo.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnConfirmInfo.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_PAY://已支付,待签约 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnSign.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnSign.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_ALREADY_CODE://生成二维码。待支付 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnPay.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnPay.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_AUDIT://待审核 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
@@ -196,18 +206,22 @@ public class OrderUtils { | |||
btnAudit.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_DELIVERY://待发货 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
if ("TRUE".equals(orderData.whetherToMail)) { | |||
btnEditAddr.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
if ("TRUE".equals(orderData.whetherToMail)) { | |||
btnEditAddr.setVisibility(View.VISIBLE); | |||
} | |||
btnDeliver.setVisibility(View.VISIBLE); | |||
} | |||
btnDeliver.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_TAKE_DELIVERY://待收货 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnLogistics.setVisibility(View.VISIBLE); | |||
btnReturnGoods.setVisibility(View.VISIBLE); | |||
btnReceiveGoods.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnLogistics.setVisibility(View.VISIBLE); | |||
btnReturnGoods.setVisibility(View.VISIBLE); | |||
btnReceiveGoods.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_ACTIVE://待激活 | |||
try { | |||
@@ -229,12 +243,16 @@ public class OrderUtils { | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_FINISH://已结束 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnAgainActive.setVisibility(View.VISIBLE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnAgainActive.setVisibility(View.VISIBLE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_RETURN_GOODS://退货中 | |||
LLBtns.setVisibility(View.GONE); | |||
btnReceiveGoods.setVisibility(View.GONE); | |||
if (!"TYMY9901".equals(orderData.deviceType)) { | |||
LLBtns.setVisibility(View.GONE); | |||
btnReceiveGoods.setVisibility(View.GONE); | |||
} | |||
break; | |||
case Constants.ORDER_STATUS_EX_GOODS://换货中 | |||
break; | |||
@@ -263,12 +281,12 @@ public class OrderUtils { | |||
*/ | |||
private void initBtnClick() { | |||
//身份证信息上传 | |||
if (null!=btnUserInfoUpload){ | |||
if (null != btnUserInfoUpload) { | |||
btnUserInfoUpload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("vehiclePlate", orderData.getVehiclePlate()); //车牌号 | |||
intent.putExtra("vehiclePlateColor", orderData.getVehiclePlateColor() + ""); //车牌颜色 | |||
@@ -291,13 +309,13 @@ public class OrderUtils { | |||
} | |||
}); | |||
} | |||
if (null!=btnCarInfoUpload){ | |||
if (null != btnCarInfoUpload) { | |||
//车辆信息上传 | |||
btnCarInfoUpload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("vehiclePlate", orderData.getVehiclePlate()); //车牌号 | |||
intent.putExtra("vehiclePlateColor", orderData.getVehiclePlateColor() + ""); //车牌颜色 | |||
@@ -320,7 +338,7 @@ public class OrderUtils { | |||
} | |||
}); | |||
} | |||
if (null!=btnConfirmInfo){ | |||
if (null != btnConfirmInfo) { | |||
//信息确认 | |||
btnConfirmInfo.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@@ -334,7 +352,7 @@ public class OrderUtils { | |||
// productBean.setFee(orderData.product.fee); | |||
// productBean.setIsValueCard(orderData.getIsValueCard()); | |||
// } | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("type", orderData.getType()); | |||
intent.putExtra("orderId", orderData.getOrderId()); | |||
@@ -359,12 +377,12 @@ public class OrderUtils { | |||
} | |||
}); | |||
} | |||
if (null!=btnSign){ | |||
if (null != btnSign) { | |||
//签约 | |||
btnSign.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId", orderData.getOrderId()); | |||
intent.setClass(context, ContractActivity.class); | |||
@@ -378,13 +396,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnPay){ | |||
if (null != btnPay) { | |||
//支付 | |||
btnPay.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
ResultBean.BizContent productBean = new ResultBean.BizContent(); | |||
productBean.setId(orderData.productId); | |||
productBean.setName(orderData.getProductName()); | |||
@@ -422,13 +440,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnFinish){ | |||
if (null != btnFinish) { | |||
//结束订单 | |||
btnFinish.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
new ConfirmDialog.Builder(context).setMsg("确定是否结束订单?", R.mipmap.icon_finish_order).onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
@@ -453,13 +471,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnLogistics){ | |||
if (null != btnLogistics) { | |||
//查看物流 | |||
btnLogistics.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(OrderLogisticsActivity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -468,13 +486,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnReturnGoods){ | |||
if (null != btnReturnGoods) { | |||
//退货 | |||
btnReturnGoods.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(ApplyReturnGoodsStep1Activity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -483,13 +501,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnExGoods){ | |||
if (null != btnExGoods) { | |||
//换货 | |||
btnExGoods.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(ApplyExGoodsStep1Activity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -498,13 +516,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnCancelOrder){ | |||
if (null != btnCancelOrder) { | |||
//取消订单 | |||
btnCancelOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(CancelOrderStep1Activity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -513,13 +531,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnEditAddr){ | |||
if (null != btnEditAddr) { | |||
//修改地址 | |||
btnEditAddr.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(EditOrderAddrActivity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -528,13 +546,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnAudit){ | |||
if (null != btnAudit) { | |||
//审核 | |||
btnAudit.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("id", orderData.getId()); | |||
intent.setClass(context, AuditingStep1Activity.class); | |||
@@ -547,13 +565,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnDeliver){ | |||
if (null != btnDeliver) { | |||
//发货 | |||
btnDeliver.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(FormDeliveryActivity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -562,48 +580,55 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnActive){ | |||
if (null != btnActive) { | |||
//激活 | |||
btnActive.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
Log.e("过户激活","0"+"isTransfer~"+orderData.getIsTransfer()+"transfer~"+orderData.transfer); | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (orderData.transfer==0) {//是否是过户激活 0是原流程 1是使用过户激活 | |||
Log.e("过户激活", "0" + "isTransfer~" + orderData.getIsTransfer() + "transfer~" + orderData.transfer); | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
if (orderData.transfer == 0) {//是否是过户激活 0是原流程 1是使用过户激活 | |||
if (isFromList) { | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("id", orderData.getId() + ""); | |||
MyRetrofit.newInstance(context, IFCode.IFCODE9, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
if (null!=bizContent){ | |||
if (bizContent.getCardId().startsWith("99019052")){ | |||
if (null != bizContent) { | |||
if ("TYMY9901".equals(bizContent.deviceType)) { | |||
Intent intent = new Intent(context, YDObuActivationUploadActivity.class); | |||
intent.putExtra("bizContent",JSON.toJSONString(bizContent)); | |||
intent.putExtra("phone",bizContent.getCustomerTel()); | |||
intent.putExtra("bizContent", JSON.toJSONString(bizContent)); | |||
intent.putExtra("phone", bizContent.getCustomerTel()); | |||
context.startActivity(intent); | |||
}else { | |||
} else { | |||
releaseActivation(bizContent); | |||
} | |||
}else { | |||
} else { | |||
showErrorMsg("未查询到该订单"); | |||
} | |||
} | |||
}); | |||
} else { | |||
releaseActivation(orderData); | |||
if ("TYMY9901".equals(orderData.deviceType)) { | |||
Intent intent = new Intent(context, YDObuActivationUploadActivity.class); | |||
intent.putExtra("bizContent", JSON.toJSONString(orderData)); | |||
intent.putExtra("phone", orderData.getCustomerTel()); | |||
context.startActivity(intent); | |||
} else{ | |||
releaseActivation(orderData); | |||
} | |||
} | |||
} else if (orderData.transfer==1){//过户激活 | |||
Log.e("过户激活","1"); | |||
} else if (orderData.transfer == 1) {//过户激活 | |||
Log.e("过户激活", "1"); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("id", orderData.getId() + ""); | |||
MyRetrofit.newInstance(context, IFCode.IFCODE9, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
if (null!=bizContent){ | |||
if (null != bizContent) { | |||
changeUserActivation(bizContent); | |||
}else { | |||
} else { | |||
showErrorMsg("未查询到该订单"); | |||
} | |||
} | |||
@@ -617,7 +642,7 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnAgainActive){ | |||
if (null != btnAgainActive) { | |||
//再次唤起 | |||
btnAgainActive.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@@ -644,13 +669,13 @@ public class OrderUtils { | |||
}); | |||
} | |||
if (null!=btnReceiveGoods){ | |||
if (null != btnReceiveGoods) { | |||
//确认完成 | |||
btnReceiveGoods.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
if (MyShared.getInstance().get("isCoordinateInRange","-1").equals("1")) { | |||
if (MyShared.getInstance().get("isCoordinateInRange", "-1").equals("1")) { | |||
startActivity(ConfirmReceiveGoodsStep1Activity.class); | |||
} else { | |||
ObserverManager.getService().notifyObserver(ObserverManager.UPDATEPOSITION, null); | |||
@@ -669,7 +694,7 @@ public class OrderUtils { | |||
MyRetrofit.newInstance(context, IFCode.IFCODE_TOOTHERAPPLY, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Log.e("过户激活","2"+JSON.toJSONString(bizContent)); | |||
Log.e("过户激活", "2" + JSON.toJSONString(bizContent)); | |||
applyUpgrade(orderDataDetail); | |||
} | |||
@@ -694,13 +719,13 @@ public class OrderUtils { | |||
MyRetrofit.newInstance(IFCode.IFCODE896, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Log.e("过户激活","3"+JSON.toJSONString(bizContent)); | |||
toWriteCardCommand(bizContent,orderDataDetail); | |||
Log.e("过户激活", "3" + JSON.toJSONString(bizContent)); | |||
toWriteCardCommand(bizContent, orderDataDetail); | |||
} | |||
@Override | |||
public void onError(Response<Result> resp) { | |||
if (null!=resp){ | |||
if (null != resp) { | |||
showErrorMsg(resp.body().errorMsg); | |||
} | |||
// else { | |||
@@ -714,11 +739,11 @@ public class OrderUtils { | |||
* 写卡 -> 确认变更卡信息 | |||
*/ | |||
private void toWriteCardCommand(ResultBean.BizContent bizContent, ResultBean.BizContent orderDataDetail) { | |||
Log.e("过户激活","4"); | |||
BluetoothWriteCardWriteTab.writeCommandToCardWithCode51(context,false, bizContent.getCommand(), orderData.getCardId(), 2, bizContent.getCosRecordId(), new BluetoothWriteCardWriteTab.Callback() { | |||
Log.e("过户激活", "4"); | |||
BluetoothWriteCardWriteTab.writeCommandToCardWithCode51(context, false, bizContent.getCommand(), orderData.getCardId(), 2, bizContent.getCosRecordId(), new BluetoothWriteCardWriteTab.Callback() { | |||
@Override | |||
public void success(ResultBean.BizContent result) { | |||
writeObuUpgrade(orderDataDetail); | |||
writeObuUpgrade(orderDataDetail); | |||
// Map<String, String> params = new HashMap<>(); | |||
// params.put("cardId", orderData.getCardId()); | |||
// params.put("orderId", orderData.getOrderId()); | |||
@@ -778,9 +803,9 @@ public class OrderUtils { | |||
/** | |||
* 过户激活确认 | |||
*/ | |||
private void changeUserActivationSure(ResultBean.BizContent orderDataDetail){ | |||
HashMap<String,String> params = new HashMap<>(); | |||
params.put("orderId",orderData.getOrderId()); | |||
private void changeUserActivationSure(ResultBean.BizContent orderDataDetail) { | |||
HashMap<String, String> params = new HashMap<>(); | |||
params.put("orderId", orderData.getOrderId()); | |||
MyRetrofit.newInstance(context, IFCode.IFCODE_TOOTHERAPPLYSURE, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
@@ -826,9 +851,9 @@ public class OrderUtils { | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
public void BluetoothLinkIsSuccessful(BoxManagers boxManagers) { | |||
HashMap<String,String> params = new HashMap<>(); | |||
params.put("orderId",bizContent1.getOrderId()); | |||
MyRetrofit.newInstance(context,IFCode.IFCODE_CANCLE_BY_ORDER, params, new MyRetrofit.ReturnResult() { | |||
HashMap<String, String> params = new HashMap<>(); | |||
params.put("orderId", bizContent1.getOrderId()); | |||
MyRetrofit.newInstance(context, IFCode.IFCODE_CANCLE_BY_ORDER, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
boolean cardId = TextUtils.isEmpty(bizContent1.getCardId()); | |||
@@ -1218,8 +1243,8 @@ public class OrderUtils { | |||
public static void startActivityTwo(Activity context, ResultBean.BizContent orderData, Class<?> activityClass) { | |||
Bundle bundle = new Bundle(); | |||
Log.e("vehiclePlateColorooooo",orderData.getVehiclePlateColor()); | |||
Log.e("vehiclePlateooooooo",orderData.getVehiclePlate()); | |||
Log.e("vehiclePlateColorooooo", orderData.getVehiclePlateColor()); | |||
Log.e("vehiclePlateooooooo", orderData.getVehiclePlate()); | |||
bundle.putString("id", FunHelper.isEmpty(orderData.getId()) ? "" : orderData.getId()); | |||
bundle.putString("orderId", FunHelper.isEmpty(orderData.getOrderId()) ? "" : orderData.getOrderId()); | |||
bundle.putString("vehiclePlate", FunHelper.isEmpty(orderData.getVehiclePlate()) ? "" : orderData.getVehiclePlate()); | |||
@@ -1231,7 +1256,7 @@ public class OrderUtils { | |||
bundle.putString("obuId", FunHelper.isEmpty(orderData.getObuId()) ? "" : orderData.getObuId()); | |||
bundle.putString("type", FunHelper.isEmpty(orderData.getTowing()) ? "" : orderData.getTowing()); | |||
bundle.putString("isValueCard", FunHelper.isEmpty(orderData.getIsValueCard()) ? "" : orderData.getIsValueCard()); | |||
bundle.putString("content",JSONObject.toJSONString(orderData)); | |||
bundle.putString("content", JSONObject.toJSONString(orderData)); | |||
Intent intent = new Intent(); | |||
intent.setClass(context, activityClass); | |||
intent.putExtras(bundle); |
@@ -171,6 +171,7 @@ public class YDObuActivationBLESearchActivity extends AppActivity { | |||
@Override | |||
public void onSuccess() { | |||
mDialog.dismiss(); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
Intent intent = new Intent(YDObuActivationBLESearchActivity.this, YDPlatformNewlySuccessActivity.class); | |||
intent.putExtra("type",1); | |||
startActivity(intent); |
@@ -150,7 +150,11 @@ public class YDPlatformLoginActivity extends AppActivity { | |||
intent.putExtra("type", getIntent().getStringExtra("type"));//1客车 2货车 | |||
intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2单位 | |||
// intent.putExtra("productId", getIntent().getStringExtra("productId")); | |||
intent.putExtra("productId","520101000000000000002"); | |||
if ("1".equals(getIntent().getStringExtra("type"))){//写死的产品,上线需要改掉 | |||
intent.putExtra("productId","520101000000000000002"); | |||
}else if ("2".equals(getIntent().getStringExtra("type"))){ | |||
intent.putExtra("productId","520101110000060000016"); | |||
} | |||
startActivity(intent); | |||
} else{ | |||
finish(); |
@@ -44,6 +44,11 @@ public class YDPlatformNewlyStep1Activity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
binding.btnUploadImg.setOnClickListener(nextPageListener); | |||
binding.image1.setOnClickListener(this::onImage); | |||
binding.image2.setOnClickListener(this::onImage); | |||
binding.image3.setOnClickListener(this::onImage); | |||
binding.image4.setOnClickListener(this::onImage); | |||
binding.image5.setOnClickListener(this::onImage); | |||
} | |||
@Override | |||
@@ -119,7 +124,7 @@ public class YDPlatformNewlyStep1Activity extends AppActivity { | |||
return; | |||
} | |||
Intent intent = new Intent(); | |||
intent.setClass(YDPlatformNewlyStep1Activity.this, YDPlatformNewlyStep6Activity.class); | |||
intent.setClass(YDPlatformNewlyStep1Activity.this, YDPlatformNewlyStep4Activity.class); | |||
intent.putExtra("userType",getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type",getIntent().getStringExtra("type"));//1客车 2货车 | |||
intent.putExtra("plateNum",getIntent().getStringExtra("plateNum")); |
@@ -55,6 +55,7 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
private String imageIdNe = "";//身份证识别反面ID | |||
private String imageIdBusiness = "";//识别营业执照ID | |||
private String wtsImage = "";//委托书 | |||
private String hasAccount = "0"; | |||
@Override | |||
protected View getLayoutView() { | |||
@@ -64,13 +65,21 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
hasAccount = getIntent().getStringExtra("hasAccount"); | |||
if ("1".equals(getIntent().getStringExtra("userType"))) {//个人 | |||
binding.layout1.setVisibility(View.VISIBLE); | |||
binding.layout3.setVisibility(View.GONE); | |||
} else {//单位 | |||
binding.text11.setText("本部"); | |||
binding.layout1.setVisibility(View.GONE); | |||
binding.layout3.setVisibility(View.VISIBLE); | |||
if ("1".equals(hasAccount)) { | |||
setTitle("经办人开户"); | |||
binding.layout1.setVisibility(View.VISIBLE); | |||
binding.layout3.setVisibility(View.GONE); | |||
} else { | |||
setTitle("单位信息上传"); | |||
binding.text11.setText("本部"); | |||
binding.layout1.setVisibility(View.GONE); | |||
binding.layout3.setVisibility(View.VISIBLE); | |||
} | |||
} | |||
initClick(); | |||
} | |||
@@ -109,8 +118,8 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
String type = ""; | |||
file1 = FileUtil.getSaveFile(getApplication()).getAbsolutePath(); | |||
type = CameraActivity.CONTENT_TYPE_GENERAL; | |||
HashMap<String,String> params = new HashMap<>(); | |||
params.put("vehicleId",getIntent().getStringExtra("vehicleId")); | |||
HashMap<String, String> params = new HashMap<>(); | |||
params.put("vehicleId", getIntent().getStringExtra("vehicleId")); | |||
params.put("filename", YdCode.YDCODE_OCR_BUSINESS_LICENSE); | |||
FileUtils.getInstance(this).uploadOcrBusinessLicenseNewYD(true, type, file1, params, new FileUtils.OnOcrUploadCallback2() { | |||
@Override | |||
@@ -132,7 +141,15 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
type = CameraActivity.CONTENT_TYPE_ID_CARD_BACK; | |||
} | |||
HashMap<String, String> params = new HashMap<>(); | |||
params.put("type", "1"); | |||
if ("2".equals(getIntent().getStringExtra("userType"))) { | |||
if ("1".equals(hasAccount)) { | |||
params.put("type", "1"); | |||
} else { | |||
params.put("type", "3"); | |||
} | |||
} else { | |||
params.put("type", "1"); | |||
} | |||
params.put("side", str); | |||
params.put("filename", YdCode.YDCODE_OCR_IDCARD); | |||
String finalStr = str; | |||
@@ -158,19 +175,19 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
try { | |||
ResultBean.BizContent encryptedData = JSON.parseObject(bizContent.encryptedData, ResultBean.BizContent.class); | |||
Log.e("log","打印标题-------------:" + encryptedData.toString() ); | |||
Log.e("log", "打印标题-------------:" + encryptedData.toString()); | |||
binding.text10.setText(encryptedData.getName()); | |||
binding.text12.setText(encryptedData.getId()); | |||
binding.text17.setText(encryptedData.getAddress()); | |||
// isSky(binding.text10.getText().toString(), "公司名称", binding.text10) || | |||
// isSky(binding.text12.getText().toString(), "公司证件号码", binding.text12) || | |||
// isSky(binding.text11.getText().toString(), "部门名称", binding.text11) || | |||
// isSky(binding.text16.getText().toString(), "经办人姓名", binding.text16) || | |||
// isSky(binding.text14.getText().toString(), "经办人身份证号", binding.text14) || | |||
// isSky(binding.text13.getText().toString(), "经办人电话", binding.text13) | |||
}catch (Exception e){ | |||
Log.e("log","打印标题:" + e.getMessage() ); | |||
} catch (Exception e) { | |||
Log.e("log", "打印标题:" + e.getMessage()); | |||
} | |||
} | |||
@@ -203,23 +220,68 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
encryptedData.put("address", binding.text4.getText().toString());//地址 | |||
params.put("encryptedData", JSON.toJSONString(encryptedData)); | |||
params.put("productId", getIntent().getStringExtra("productId"));//产品ID | |||
params.put("filename",YdCode.YDCODE_PERSON_OPEN); | |||
params.put("filename", YdCode.YDCODE_PERSON_OPEN); | |||
MyRetrofit.ydNewInstance(YDPlatformNewlyStep3Activity.this, "", params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
MyShared.getInstance().put(MyShared.YDACCOUNTID,bizContent.accountId); | |||
MyShared.getInstance().put(MyShared.YDACCOUNTID, bizContent.accountId); | |||
Intent intent = new Intent(YDPlatformNewlyStep3Activity.this, YDPlatformNewlyStep4Activity.class); | |||
intent.putExtra("productId",getIntent().getStringExtra("productId")); | |||
intent.putExtra("vehicleId",getIntent().getStringExtra("vehicleId")); | |||
intent.putExtra("plateNum",getIntent().getStringExtra("plateNum")); | |||
intent.putExtra("plateColor",getIntent().getStringExtra("plateColor")); | |||
intent.putExtra("userType",getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type",getIntent().getStringExtra("type"));//1客车 2货车 | |||
intent.putExtra("productId", getIntent().getStringExtra("productId")); | |||
intent.putExtra("vehicleId", getIntent().getStringExtra("vehicleId")); | |||
intent.putExtra("plateNum", getIntent().getStringExtra("plateNum")); | |||
intent.putExtra("plateColor", getIntent().getStringExtra("plateColor")); | |||
intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type", getIntent().getStringExtra("type"));//1客车 2货车 | |||
startActivity(intent); | |||
finish(); | |||
} | |||
}); | |||
} else {//企业203 | |||
if ("1".equals(hasAccount)) { | |||
if (isSky(binding.text1.getText().toString(), "姓名", binding.text1) || | |||
isSky(binding.text3.getText().toString(), "证件号码", binding.text3) || | |||
isSky(binding.text4.getText().toString(), "地址", binding.text4)) { | |||
return; | |||
} | |||
if ("".equals(imageIdPo)) { | |||
toast("请上传身份证正面"); | |||
return; | |||
} | |||
if ("".equals(imageIdNe)) { | |||
toast("请上传身份证反面"); | |||
return; | |||
} | |||
HashMap<String, String> encryptedData = new HashMap<>(); | |||
HashMap<String, String> params = new HashMap<>(); | |||
encryptedData.put("id", binding.text3.getText().toString().trim());//证件号码 | |||
encryptedData.put("name", binding.text1.getText().toString());//姓名 | |||
encryptedData.put("userIdType", "101");//证件类型 | |||
encryptedData.put("imageIdSide1", imageIdPo);//身份证识别正面ID | |||
encryptedData.put("imageIdSide2", imageIdNe);//身份证识别反面id | |||
encryptedData.put("address", binding.text4.getText().toString());//地址 | |||
params.put("encryptedData", JSON.toJSONString(encryptedData)); | |||
params.put("productId", getIntent().getStringExtra("productId"));//产品ID | |||
params.put("filename", YdCode.YDCODE_PERSON_OPEN); | |||
MyRetrofit.ydNewInstance(YDPlatformNewlyStep3Activity.this, "", params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
MyShared.getInstance().put(MyShared.YDACCOUNTID, bizContent.accountId); | |||
Intent intent = new Intent(YDPlatformNewlyStep3Activity.this, YDPlatformNewlyStep3Activity.class); | |||
intent.putExtra("productId", getIntent().getStringExtra("productId")); | |||
intent.putExtra("vehicleId", getIntent().getStringExtra("vehicleId")); | |||
intent.putExtra("plateNum", getIntent().getStringExtra("plateNum")); | |||
intent.putExtra("plateColor", getIntent().getStringExtra("plateColor")); | |||
intent.putExtra("hasAccount", "0"); | |||
intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type", getIntent().getStringExtra("type"));//1客车 2货车 | |||
startActivity(intent); | |||
finish(); | |||
} | |||
}); | |||
return; | |||
} | |||
if (isSky(binding.text10.getText().toString(), "公司名称", binding.text10) || | |||
isSky(binding.text12.getText().toString(), "公司证件号码", binding.text12) || | |||
isSky(binding.text11.getText().toString(), "部门名称", binding.text11) || | |||
@@ -236,11 +298,11 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
toast("请上传经办人身份证反面"); | |||
return; | |||
} | |||
if ("".equals(imageIdBusiness)){ | |||
if ("".equals(imageIdBusiness)) { | |||
toast("请上传营业执照"); | |||
return; | |||
} | |||
if ("".equals(wtsImage)){ | |||
if ("".equals(wtsImage)) { | |||
toast("请上传委托书"); | |||
return; | |||
} | |||
@@ -260,18 +322,23 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
encryptedData.put("agentNegativeImageIdSide2", imageIdNe);//经办人证件识别Id反面面 | |||
encryptedData.put("authorizationImage", QRCode.imageToBase64(wtsImage));//委托书base64 | |||
params.put("encryptedData", JSON.toJSONString(encryptedData)); | |||
params.put("filename",YdCode.YDCODE_COMPANY_OPEN); | |||
params.put("filename", YdCode.YDCODE_COMPANY_OPEN); | |||
MyRetrofit.ydNewInstance(YDPlatformNewlyStep3Activity.this, "", params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
MyShared.getInstance().put(MyShared.YDACCOUNTID,bizContent.accountId); | |||
Intent intent = new Intent(YDPlatformNewlyStep3Activity.this, YDPlatformNewlyStep4Activity.class); | |||
intent.putExtra("productId",getIntent().getStringExtra("productId")); | |||
intent.putExtra("vehicleId",getIntent().getStringExtra("vehicleId")); | |||
intent.putExtra("plateNum",getIntent().getStringExtra("plateNum")); | |||
intent.putExtra("plateColor",getIntent().getStringExtra("plateColor")); | |||
intent.putExtra("userType",getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type",getIntent().getStringExtra("type"));//1客车 2货车 | |||
MyShared.getInstance().put(MyShared.YDACCOUNTID, bizContent.accountId); | |||
Intent intent = new Intent(); | |||
if ("2".equals(getIntent().getStringExtra("type"))) {//货车 | |||
intent.setClass(YDPlatformNewlyStep3Activity.this, YDPlatformNewlyStep1Activity.class); | |||
} else {//客车 | |||
intent.setClass(YDPlatformNewlyStep3Activity.this, YDPlatformNewlyStep4Activity.class); | |||
} | |||
intent.putExtra("productId", getIntent().getStringExtra("productId")); | |||
intent.putExtra("vehicleId", getIntent().getStringExtra("vehicleId")); | |||
intent.putExtra("plateNum", getIntent().getStringExtra("plateNum")); | |||
intent.putExtra("plateColor", getIntent().getStringExtra("plateColor")); | |||
intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type", getIntent().getStringExtra("type"));//1客车 2货车 | |||
startActivity(intent); | |||
finish(); | |||
} | |||
@@ -299,6 +366,7 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
} else if (view == binding.image6) { | |||
binding.text14.setText(encryptedData.cardNum); | |||
binding.text16.setText(encryptedData.realName); | |||
binding.text18.setText(encryptedData.address); | |||
} | |||
} else { | |||
imageIdNe = bizContent.imageId; | |||
@@ -309,7 +377,7 @@ public class YDPlatformNewlyStep3Activity extends AppActivity { | |||
} | |||
} | |||
}catch (Exception e){ | |||
} catch (Exception e) { | |||
Log.e("OCR识别身份证", e.getMessage()); | |||
} | |||
} |
@@ -59,7 +59,7 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
private PopupKeyboard mPopupKeyboard; | |||
private int isXT = 0; | |||
private int isQY = 0;//0不是牵引车 1是牵引车 | |||
// private int isQY = 0;//0不是牵引车 1是牵引车 | |||
private String file1; | |||
// private String vehHeadPic = "";//车头照 | |||
@@ -88,7 +88,7 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
binding.layout4.setVisibility(View.VISIBLE); | |||
binding.layout1.setVisibility(View.VISIBLE); | |||
binding.layout2.setVisibility(View.VISIBLE); | |||
binding.layoutQy.setVisibility(View.VISIBLE); | |||
// binding.layoutQy.setVisibility(View.VISIBLE); | |||
} else { | |||
binding.layout90.setVisibility(View.GONE); | |||
//客车不显示核载质量与车轴,反之货车必填 | |||
@@ -97,11 +97,11 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
binding.layout1.setVisibility(View.GONE); | |||
binding.layout2.setVisibility(View.GONE); | |||
binding.layout5.setVisibility(View.GONE); | |||
binding.layoutQy.setVisibility(View.GONE); | |||
// binding.layoutQy.setVisibility(View.GONE); | |||
binding.text18.setText("4"); | |||
} | |||
initPopupKey(); | |||
initRadioView(); | |||
// initRadioView(); | |||
initClick(); | |||
} | |||
@@ -155,20 +155,23 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
} | |||
private void initRadioView() { | |||
binding.radioGroup.setOnCheckedChangeListener((radioGroup, i) -> {//是否牵引车 | |||
switch (i) { | |||
case R.id.rb_1: | |||
isQY = 1; | |||
binding.layout5.setVisibility(View.VISIBLE); | |||
break; | |||
case R.id.rb_2: | |||
isQY = 0; | |||
binding.layout5.setVisibility(View.GONE); | |||
break; | |||
} | |||
}); | |||
} | |||
// private void initRadioView() { | |||
// binding.radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { | |||
// @Override | |||
// public void onCheckedChanged(RadioGroup radioGroup, int i) {//是否牵引车 | |||
// switch (i) { | |||
// case R.id.rb_1: | |||
// isQY = 1; | |||
// binding.layout5.setVisibility(View.VISIBLE); | |||
// break; | |||
// case R.id.rb_2: | |||
// isQY = 0; | |||
// binding.layout5.setVisibility(View.GONE); | |||
// break; | |||
// } | |||
// } | |||
// }); | |||
// } | |||
@SuppressLint({"NewApi", "LogNotTimber"}) | |||
@SingleClick | |||
@@ -239,15 +242,15 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
} | |||
if (!TextUtils.isEmpty(encryptedData.getVehicleType())) { | |||
binding.text2.setText(encryptedData.getVehicleType()); //车辆类型 | |||
if (encryptedData.getVehicleType().contains("牵引车")) { | |||
binding.radioGroup.check(R.id.rb_1); | |||
isQY = 1; | |||
binding.rb2.setEnabled(false); | |||
binding.text15.setText(""); | |||
textValue = "-1"; | |||
} else { | |||
binding.rb2.setEnabled(true); | |||
} | |||
// if (encryptedData.getVehicleType().contains("牵引车")) { | |||
// binding.radioGroup.check(R.id.rb_1); | |||
// isQY = 1; | |||
// binding.rb2.setEnabled(false); | |||
// binding.text15.setText(""); | |||
// textValue = "-1"; | |||
// } else { | |||
// binding.rb2.setEnabled(true); | |||
// } | |||
} | |||
if (!TextUtils.isEmpty(encryptedData.getName())) { | |||
binding.text3.setText(encryptedData.getName()); //所有人 | |||
@@ -340,11 +343,11 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
) { | |||
return; | |||
} | |||
if (isQY == 1) { | |||
if (isSky(binding.text12.getText() + "", "准牵引总质量", binding.text12)) { | |||
return; | |||
} | |||
} | |||
// if (isQY == 1) { | |||
// if (isSky(binding.text12.getText() + "", "准牵引总质量", binding.text12)) { | |||
// return; | |||
// } | |||
// } | |||
if ("-1".equals(textValue)) { | |||
toast("请选择车辆用户类型"); | |||
return; | |||
@@ -364,7 +367,8 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
encryptedData.put("useCharacter", useCharacter); | |||
encryptedData.put("vehicleType", binding.text2.getText().toString()); | |||
encryptedData.put("userType", "1".equals(getIntent().getStringExtra("type")) ? "0" : textValue); | |||
encryptedData.put("vehicleClassify", "1".equals(getIntent().getStringExtra("type")) ? "0" : (isQY == 1 ? "2" : "1")); | |||
// encryptedData.put("vehicleClassify", "1".equals(getIntent().getStringExtra("type")) ? "0" : (isQY == 1 ? "2" : "1")); | |||
encryptedData.put("vehicleClassify", "1".equals(getIntent().getStringExtra("type")) ? "0" : "1"); | |||
encryptedData.put("approvedCount", binding.text4.getText().toString()); | |||
encryptedData.put("outsideDimensions", binding.etLong.getText().toString() + "×" + binding.etWidth.getText().toString() + "×" + binding.etHeight.getText().toString()); | |||
encryptedData.put("vehicleModel", binding.text8.getText().toString()); | |||
@@ -378,9 +382,10 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
encryptedData.put("totalMass", binding.text5.getText().toString()); | |||
encryptedData.put("maintenanceMass", binding.text6.getText().toString()); | |||
encryptedData.put("permittedWeight", binding.text11.getText().toString()); | |||
if (isQY == 1) { | |||
encryptedData.put("permittedTowWeight", binding.text12.getText().toString()); | |||
} | |||
// if (isQY == 1) { | |||
// encryptedData.put("permittedTowWeight", binding.text12.getText().toString()); | |||
// } | |||
encryptedData.put("permittedTowWeight", binding.text12.getText().toString()); | |||
encryptedData.put("wheelCount", binding.text18.getText().toString()); | |||
encryptedData.put("axleCount", binding.text13.getText().toString()); | |||
} | |||
@@ -397,11 +402,8 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
if ("1".equals(linkedTreeMap.get("result").toString())) {//认证通过 | |||
Intent intent = new Intent(); | |||
if ("1".equals(linkedTreeMap.get("ownerCheck").toString())) {//车主一致 | |||
if ("2".equals(getIntent().getStringExtra("type"))) {//货车上传图片资料 | |||
intent.setClass(YDPlatformNewlyStep4Activity.this, YDPlatformNewlyStep1Activity.class); | |||
} else {//签约页面 | |||
//签约页面 | |||
intent.setClass(YDPlatformNewlyStep4Activity.this, YDPlatformNewlyStep6Activity.class); | |||
} | |||
} else {//车主不一致 | |||
// intent.setClass(YDPlatformNewlyStep4Activity.this, YDPlatformNewlyStep5Activity.class); | |||
// 消息对话框 | |||
@@ -485,15 +487,15 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
}) | |||
.show(); | |||
} else if (view == binding.text15) {//选取车辆用户类型 | |||
if (isQY == 1) { | |||
EnumListDialog.showEnumListSingleDialog(this, EnumBean.CAR_USER_TYPE_QY, new EnumListDialog.OnResultCallback() { | |||
@Override | |||
public void onResultCallback(String code, String name) { | |||
binding.text15.setText(name); | |||
textValue = code; | |||
} | |||
}); | |||
} else { | |||
// if (isQY == 1) { | |||
// EnumListDialog.showEnumListSingleDialog(this, EnumBean.CAR_USER_TYPE_QY, new EnumListDialog.OnResultCallback() { | |||
// @Override | |||
// public void onResultCallback(String code, String name) { | |||
// binding.text15.setText(name); | |||
// textValue = code; | |||
// } | |||
// }); | |||
// } else { | |||
EnumListDialog.showEnumListSingleDialog(this, EnumBean.CAR_USER_TYPE, new EnumListDialog.OnResultCallback() { | |||
@Override | |||
public void onResultCallback(String code, String name) { | |||
@@ -501,7 +503,7 @@ public class YDPlatformNewlyStep4Activity extends AppActivity { | |||
textValue = code; | |||
} | |||
}); | |||
} | |||
// } | |||
} | |||
} | |||
} |
@@ -51,6 +51,13 @@ public class YDPlatformNewlyStep5Activity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
userType = getIntent().getStringExtra("userType"); | |||
if ("1".equals(userType)){ | |||
binding.layout3.setVisibility(View.GONE); | |||
binding.layout1.setVisibility(View.VISIBLE); | |||
}else { | |||
binding.layout1.setVisibility(View.GONE); | |||
binding.layout3.setVisibility(View.VISIBLE); | |||
} | |||
initClick(); | |||
} | |||
@@ -72,8 +79,11 @@ public class YDPlatformNewlyStep5Activity extends AppActivity { | |||
if (view == binding.image3) {//营业执照91 | |||
String type = ""; | |||
file1 = FileUtil.getSaveFile(getApplication()).getAbsolutePath(); | |||
type = CameraActivity.CONTENT_TYPE_PASSPORT; | |||
FileUtils.getInstance(this).uploadOcrBusinessLicenseNewYD(true, type, file1, null, new FileUtils.OnOcrUploadCallback2() { | |||
type = CameraActivity.CONTENT_TYPE_GENERAL; | |||
HashMap<String, String> params = new HashMap<>(); | |||
params.put("vehicleId", getIntent().getStringExtra("vehicleId")); | |||
params.put("filename", YdCode.YDCODE_OCR_BUSINESS_LICENSE); | |||
FileUtils.getInstance(this).uploadOcrBusinessLicenseNewYD(true, type, file1, params, new FileUtils.OnOcrUploadCallback2() { | |||
@Override | |||
public void onSuccess(ResultBean.BizContent bizContent, File file) { | |||
Glide.with(YDPlatformNewlyStep5Activity.this).load(file).into(binding.image3); | |||
@@ -180,11 +190,8 @@ public class YDPlatformNewlyStep5Activity extends AppActivity { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Intent intent = new Intent(); | |||
if ("2".equals(getIntent().getStringExtra("type"))) {//货车上传图片资料 | |||
intent.setClass(YDPlatformNewlyStep5Activity.this, YDPlatformNewlyStep1Activity.class); | |||
} else {//签约页面 | |||
intent.setClass(YDPlatformNewlyStep5Activity.this, YDPlatformNewlyStep6Activity.class); | |||
} | |||
//签约页面 | |||
intent.setClass(YDPlatformNewlyStep5Activity.this, YDPlatformNewlyStep6Activity.class); | |||
intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2企业 | |||
intent.putExtra("type", getIntent().getStringExtra("type"));//1客车 2货车 | |||
intent.putExtra("plateNum",getIntent().getStringExtra("plateNum")); |
@@ -19,6 +19,7 @@ import com.huntersun.vkyes.etcopencard.src.ui.dialog.AddressDialog; | |||
* @Author: lujin | |||
* @CreateDate: 2024/6/24 18:02 | |||
*/ | |||
@Deprecated | |||
public class YDPlatformNewlyStep7Activity extends AppActivity { | |||
private ActivityYdplatformNewlyStep7Binding binding; |
@@ -66,28 +66,28 @@ public class TokenFailureInterceptor implements Interceptor { | |||
LinkedTreeMap<String, Object> linkedTreeMap = JSONObject.parseObject(stringBody, LinkedTreeMap.class); | |||
// LinkedTreeMap<String, Object> linkedTreeMap2 = JSONObject.parseObject(linkedTreeMap.get("data") + "", LinkedTreeMap.class); | |||
if (linkedTreeMap != null && "50000".equals(linkedTreeMap.get("statusCode") + "")) {//token失效处理 | |||
HashMap<String,String> params = new HashMap<>(); | |||
params.put("filename", YdCode.YDCODE_LOGIN); | |||
params.put("account","14268812305"); | |||
params.put("password", MD5Utils.ToMD5("14268812305S@8iWfr3")); | |||
MyRetrofit.ydNewInstance(true,"", params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | |||
MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||
} | |||
}); | |||
// Map<String, String> params = new HashMap<>(); | |||
// MyRetrofit.newInstance(IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||
// HashMap<String,String> params = new HashMap<>(); | |||
// params.put("filename", YdCode.YDCODE_LOGIN); | |||
// params.put("account","14268812305"); | |||
// params.put("password", MD5Utils.ToMD5("14268812305S@8iWfr3")); | |||
// MyRetrofit.ydNewInstance(true,"", params, new MyRetrofit.ReturnResult() { | |||
// @Override | |||
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
// LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | |||
// Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||
// MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||
// } | |||
// @Override | |||
// public void onError() {} | |||
// }); | |||
Map<String, String> params = new HashMap<>(); | |||
MyRetrofit.newInstance(IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | |||
Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||
MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||
} | |||
@Override | |||
public void onError() {} | |||
}); | |||
}else if (linkedTreeMap != null && "4000".equals(linkedTreeMap.get("statusCode") + "")){ | |||
Intent intent = new Intent(context, YDPlatformLoginActivity.class); |
@@ -621,7 +621,7 @@ public class FileUtils { | |||
@Override | |||
public void onCompressResult(File file) { | |||
finalParams.put("imageStr",QRCode.imageToBase64withNoQZ(file.getPath())); | |||
MyRetrofit.ydNewInstance(mContext, true, "", finalParams, new MyRetrofit.ReturnResult() { | |||
MyRetrofit.ydNewInstance(mContext, "", finalParams, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Log.e("log",bizContent + "打印标题:" + resultBean.toString() ); |
@@ -397,14 +397,14 @@ public final class LoginActivity extends AppActivity implements KeyboardWatcher. | |||
MyShared.getInstance().put(MyShared.STAFFID, bizContent.getStaffId()); | |||
// Map<String, String> params = new HashMap<>(); | |||
// MyRetrofit.newInstance(this,IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||
// @Override | |||
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
// LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class);;; | |||
// | |||
// Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||
// MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||
Map<String, String> params = new HashMap<>(); | |||
MyRetrofit.newInstance(this,IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class);;; | |||
Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||
MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||
// 跳转到首页 | |||
if ("1".equals(bizContent.realNameAuthentication)){ | |||
new MessageDialog.Builder(getActivity()) | |||
@@ -440,11 +440,11 @@ public final class LoginActivity extends AppActivity implements KeyboardWatcher. | |||
MainActivity.start(getContext()); | |||
finish(); | |||
} | |||
// } | |||
// | |||
// @Override | |||
// public void onError() {} | |||
// }); | |||
} | |||
@Override | |||
public void onError() {} | |||
}); | |||
} | |||
/* |
@@ -850,6 +850,40 @@ | |||
</LinearLayout> | |||
<View | |||
style="@style/VerticalLineStyle" | |||
android:layout_width="wrap_content" | |||
android:layout_height="1dp" | |||
android:layout_marginHorizontal="@dimen/dp_10" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="#FFFFFF" | |||
android:gravity="center_vertical" | |||
android:minHeight="@dimen/dp_45"> | |||
<TextView | |||
android:layout_width="@dimen/dp_110" | |||
android:layout_height="match_parent" | |||
android:drawableLeft="@mipmap/must" | |||
android:gravity="center_vertical" | |||
android:text="经办人地址" | |||
android:textSize="@dimen/sp_14" | |||
tools:ignore="UseCompatTextViewDrawableXml" /> | |||
<com.hjq.widget.view.ClearEditText | |||
style="@style/EditTextStyle" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/white" | |||
android:drawablePadding="@dimen/dp_15" | |||
android:id="@+id/text18" | |||
android:hint="请输入经办人地址" | |||
android:minHeight="@dimen/dp_45" | |||
android:paddingHorizontal="@dimen/dp_20" /> | |||
</LinearLayout> | |||
<View | |||
style="@style/VerticalLineStyle" | |||
android:layout_width="wrap_content" |
@@ -662,56 +662,56 @@ | |||
android:text="kg" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/layout_qy" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="#FFFFFF" | |||
android:visibility="gone" | |||
android:orientation="vertical" | |||
tools:visibility="visible"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_45" | |||
android:gravity="center_vertical" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="@dimen/dp_110" | |||
android:layout_height="match_parent" | |||
android:drawableLeft="@mipmap/must" | |||
android:gravity="center_vertical" | |||
android:text="是否牵引车" | |||
android:textSize="@dimen/sp_14" | |||
tools:ignore="UseCompatTextViewDrawableXml" /> | |||
<RadioGroup | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:paddingRight="@dimen/dp_20" | |||
android:id="@+id/radioGroup" | |||
android:gravity="right" | |||
android:checkedButton="@+id/rb_2" | |||
android:orientation="horizontal"> | |||
<RadioButton | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:id="@+id/rb_1" | |||
android:text="是"/> | |||
<RadioButton | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_20" | |||
android:id="@+id/rb_2" | |||
android:text="否"/> | |||
</RadioGroup> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<!-- <LinearLayout--> | |||
<!-- android:id="@+id/layout_qy"--> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:background="#FFFFFF"--> | |||
<!-- android:visibility="gone"--> | |||
<!-- android:orientation="vertical"--> | |||
<!-- tools:visibility="visible">--> | |||
<!-- <LinearLayout--> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="@dimen/dp_45"--> | |||
<!-- android:gravity="center_vertical"--> | |||
<!-- android:orientation="horizontal">--> | |||
<!-- <TextView--> | |||
<!-- android:layout_width="@dimen/dp_110"--> | |||
<!-- android:layout_height="match_parent"--> | |||
<!-- android:drawableLeft="@mipmap/must"--> | |||
<!-- android:gravity="center_vertical"--> | |||
<!-- android:text="是否牵引车"--> | |||
<!-- android:textSize="@dimen/sp_14"--> | |||
<!-- tools:ignore="UseCompatTextViewDrawableXml" />--> | |||
<!-- <RadioGroup--> | |||
<!-- android:layout_width="wrap_content"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:layout_weight="1"--> | |||
<!-- android:paddingRight="@dimen/dp_20"--> | |||
<!-- android:id="@+id/radioGroup"--> | |||
<!-- android:gravity="right"--> | |||
<!-- android:checkedButton="@+id/rb_2"--> | |||
<!-- android:orientation="horizontal">--> | |||
<!-- <RadioButton--> | |||
<!-- android:layout_width="wrap_content"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:id="@+id/rb_1"--> | |||
<!-- android:text="是"/>--> | |||
<!-- <RadioButton--> | |||
<!-- android:layout_width="wrap_content"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:layout_marginLeft="@dimen/dp_20"--> | |||
<!-- android:id="@+id/rb_2"--> | |||
<!-- android:text="否"/>--> | |||
<!-- </RadioGroup>--> | |||
<!-- </LinearLayout>--> | |||
<!-- </LinearLayout>--> | |||
<LinearLayout | |||
android:id="@+id/layout5" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_45" | |||
android:background="#FFFFFF" | |||
android:visibility="gone" | |||
android:visibility="visible" | |||
tools:visibility="visible"> | |||
<TextView |