@@ -168,9 +168,11 @@ public class IFCode { | |||
public static final String IFCODE33 = "33"; //单位信息变更 | |||
public static final String IFCODE34 = "34"; //车辆信息变更 | |||
public static final String IFCODE914 = "914"; //订单产品选择 | |||
public static final String IFCODE914 = "914"; //下单-订单产品选择 | |||
public static final String IFCODE_TRANSFER_APPLY = "47631d58945642afa053e07c306e99e6"; //过户接口 | |||
public static final String IFCODE_TRANSFER_CHECK = "54dafed574f5475ea88b50eed9c58486"; //过户检测接口 | |||
public static final String IFCODE_TRANSFER_CONFIRM = "b1e66d22fb6f400f915458f5c50c7118"; //操作接口 | |||
public static final String IFCODE_ACTIVE_OBUIMG = "4a95e1d90e824ee8a50aa9826617e736"; //设备激活照片上传 | |||
} |
@@ -40,7 +40,7 @@ import retrofit2.Response; | |||
* | |||
* @author admin | |||
*/ | |||
public class DefrayActivity extends AppActivity implements StatusAction { | |||
public class DefrayActivity extends AppActivity {//implements StatusAction | |||
private ActivityDefrayBinding binding; | |||
@@ -68,15 +68,17 @@ public class DefrayActivity extends AppActivity implements StatusAction { | |||
fatherBean.bizContent.setPayConfigId(Constants.PAY_CONFIG_ID); //支付配置编号 | |||
// 15885137270 | |||
Log.e("okhttp", "打印标题:" + new Gson().toJson(fatherBean)); | |||
showLoading(); | |||
//提交车辆信息 | |||
//showLoading(); | |||
showDialog("请稍后..."); | |||
RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE56, new Gson().toJson(fatherBean.bizContent)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>(this) { | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
hideDialog(); | |||
showComplete(); | |||
//showComplete(); | |||
//二维码生成 | |||
Bitmap bitmap = QRCode.createQRCodeBitmap(bizContent1.getCodeUrl(), 800, 800, | |||
"UTF-8", "H", "1", Color.BLACK, Color.WHITE); | |||
@@ -92,7 +94,8 @@ public class DefrayActivity extends AppActivity implements StatusAction { | |||
@Override | |||
public void onError(String err, Response<Result> resp) { | |||
super.onError(err, resp); | |||
showError(layout -> initData()); | |||
//showError(layout -> initData()); | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
@@ -157,8 +160,8 @@ public class DefrayActivity extends AppActivity implements StatusAction { | |||
}); | |||
} | |||
@Override | |||
/*@Override | |||
public StatusLayout getStatusLayout() { | |||
return binding.hlStatusHint; | |||
} | |||
}*/ | |||
} |
@@ -11,7 +11,9 @@ import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothReadUtils; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivateRequester; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivation; | |||
import com.huntersun.vkyes.etcopencard.project.dialog.ConfirmDialog; | |||
import com.huntersun.vkyes.etcopencard.project.tool.Utils; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.PetCardToAccountCardStep4Activity; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
@@ -27,6 +29,8 @@ public class ObuActivationBLESearchActivity extends AppActivity { | |||
private String vehicleId; //车牌编号 | |||
private String orderId; //订单ID | |||
private String cardId; //卡ID | |||
private String obuId; //obuId | |||
//蓝牙链接状态 | |||
private boolean isConnect; | |||
@@ -44,6 +48,8 @@ public class ObuActivationBLESearchActivity extends AppActivity { | |||
vehicleId = getIntent().getStringExtra("vehicleId"); | |||
orderId = getIntent().getStringExtra("orderId"); | |||
cardId = getIntent().getStringExtra("cardId"); | |||
obuId = getIntent().getStringExtra("obuId"); | |||
LiveEventBus.get("closeActiveSearchBluetooth", Boolean.class) .observe(this, s -> { | |||
finish(); | |||
@@ -93,6 +99,18 @@ public class ObuActivationBLESearchActivity extends AppActivity { | |||
BluetoothReadUtils.readCardAndObuInfo(this, new BluetoothReadUtils.INReadResultCallback() { | |||
@Override | |||
public void readResultSuccess(BluetoothReadUtils.CardObuIfoBean cardObuIfoBean) {//读取成功 | |||
if (!FunHelper.isEmpty(cardId) && !cardObuIfoBean.cardId.equals(cardId)){ | |||
new Utils().showMessDialog(ObuActivationBLESearchActivity.this, | |||
"当前连接的卡和订单绑定的卡不一致,请更换成该订单绑定的卡", dialog -> { }); | |||
return; | |||
} | |||
if (!FunHelper.isEmpty(obuId) && !cardObuIfoBean.obuId.equals(obuId)){ | |||
new Utils().showMessDialog(ObuActivationBLESearchActivity.this, | |||
"当前连接的OBU设备和订单绑定的OBU设备不一致,请更换成该订单绑定的OBU设备", dialog -> { }); | |||
return; | |||
} | |||
if (isConnect){ | |||
toActive(); | |||
}else{ |
@@ -21,6 +21,8 @@ public class ObuActivationHintActivity extends AppActivity { | |||
private String orderId; | |||
private String curVehicleId; | |||
private String cardId; | |||
private String obuId; | |||
@Override | |||
protected View getLayoutView() { | |||
@@ -35,6 +37,8 @@ public class ObuActivationHintActivity extends AppActivity { | |||
curVehicleId = getIntent().getStringExtra("vehicleId"); | |||
orderId = getIntent().getStringExtra("orderId"); | |||
cardId = getIntent().getStringExtra("cardId"); | |||
obuId = getIntent().getStringExtra("obuId"); | |||
} | |||
@Override | |||
@@ -48,6 +52,8 @@ public class ObuActivationHintActivity extends AppActivity { | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("vehicleId",curVehicleId); | |||
bundle.putString("orderId",orderId); | |||
bundle.putString("obuId",obuId); | |||
bundle.putString("cardId",cardId); | |||
jumpToPage(ObuActivationUploadActivity.class,bundle); | |||
finish(); | |||
} |
@@ -57,6 +57,8 @@ public class ObuActivationHintCheckOrderActivity extends AppActivity { | |||
public void onClick(View view) { | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("orderId", curBizContent.getOrderId()); | |||
bundle.putString("cardId", curBizContent.getCardId()); | |||
bundle.putString("obuId", curBizContent.getObuId()); | |||
bundle.putString("vehicleId", curVehicleId); | |||
jumpToPage(ObuActivationHintActivity.class, bundle); | |||
finish(); |
@@ -19,7 +19,9 @@ import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivateRequester; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivation; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
import com.huntersun.vkyes.etcopencard.project.tool.QRCode; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.huntersun.vkyes.etcopencard.src.http.glide.GlideApp; | |||
@@ -43,6 +45,8 @@ public class ObuActivationUploadActivity extends AppActivity { | |||
private String vehicleId; //车牌编号 | |||
private String orderId; //订单ID | |||
private String cardId; //卡ID | |||
private String obuId; //签ID | |||
private String ivImg1; | |||
private String ivImg2; | |||
@@ -59,6 +63,8 @@ public class ObuActivationUploadActivity extends AppActivity { | |||
setTitle("激活设备"); | |||
vehicleId = getIntent().getStringExtra("vehicleId"); | |||
orderId = getIntent().getStringExtra("orderId"); | |||
cardId = getIntent().getStringExtra("cardId"); | |||
obuId = getIntent().getStringExtra("obuId"); | |||
binding.btnNext.setOnClickListener(this); | |||
binding.ivImg1.setOnClickListener(this); | |||
@@ -100,20 +106,24 @@ public class ObuActivationUploadActivity extends AppActivity { | |||
* 上传图片信息 | |||
*/ | |||
private void toSubmitData(){ | |||
showDialog("图片上传中..."); | |||
showDialog("信息上传中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("img1", ivImg1); | |||
params.put("img2", ivImg2); | |||
params.put("img3", ivImg3); | |||
params.put("vehicleHeadImgUrl", ivImg1); //车头 | |||
params.put("vehicleBodyImgUrl", ivImg2); //车身45° | |||
params.put("installImgUrl", ivImg3); //安装照 | |||
params.put("orderSource", Constants.SOURCE); | |||
params.put("orderId", orderId); | |||
//TODO 暂时没有这个接口 | |||
/*MyRetrofit.newInstance(IFCode.IFCODE966, params, new MyRetrofit.ReturnResult() { | |||
params.put("openId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
MyRetrofit.newInstance(IFCode.IFCODE_ACTIVE_OBUIMG, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("vehicleId",vehicleId); | |||
bundle.putString("orderId",orderId); | |||
bundle.putString("obuId",obuId); | |||
bundle.putString("cardId",cardId); | |||
jumpToPage(ObuActivationBLESearchActivity.class,bundle); | |||
finish(); | |||
} | |||
@@ -121,13 +131,7 @@ public class ObuActivationUploadActivity extends AppActivity { | |||
public void onError(Response<Result> resp) { | |||
hideDialog(); | |||
} | |||
});*/ | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("vehicleId",vehicleId); | |||
bundle.putString("orderId",orderId); | |||
jumpToPage(ObuActivationBLESearchActivity.class,bundle); | |||
finish(); | |||
}); | |||
} | |||
/** |
@@ -14,12 +14,12 @@ | |||
app:lineVisible="false" | |||
app:titleColor="#FFFFFF" /> | |||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
<!-- <com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
android:id="@+id/hl_status_hint" | |||
android:layout_width="match_parent" | |||
android:layout_height="0dp" | |||
android:layout_weight="1"> | |||
--> | |||
<FrameLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
@@ -91,7 +91,7 @@ | |||
</FrameLayout> | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
<!-- </com.huntersun.vkyes.etcopencard.src.widget.StatusLayout>--> | |||
</LinearLayout> |