Bladeren bron

feat: 更换ETC修改

master
huting 2 jaren geleden
bovenliggende
commit
33254fdb82

+ 2
- 1
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/MyRetrofit.java Bestand weergeven

@@ -50,7 +50,8 @@ public class MyRetrofit {
*/
// private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/";
// private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; //接口地址
private final String BaseUrl = "http://192.168.101.145:6001/ifzt/api/";
private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; //VPN访问请求地址

private final String FileUrl = "http://222.85.144.89:19003/ifzt/api/"; //文件服务
private final String appId = "admin001";
private final String IFCODE = "";

+ 8
- 1
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/DevicePendingActivity.java Bestand weergeven

@@ -122,7 +122,7 @@ public class DevicePendingActivity extends AppActivity {
return;
}

showDialog("申请中...");
showDialog("信息查询中...");
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setVehicleId(binding.inputView.getNumber() + "_" + licensePlateColor);
RequestParameters parameters = new RequestParameters(IFCode.IFCODE171, new Gson().toJson(bean));
@@ -130,6 +130,7 @@ public class DevicePendingActivity extends AppActivity {
.enqueue(new Converter<Result>(getContext(), "请稍后...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
showHintDialog(bizContent);
}

@@ -146,6 +147,7 @@ public class DevicePendingActivity extends AppActivity {
* @param bizContent
*/
private void cardReportTheLoss(ResultBean.BizContent bizContent){
showDialog("申请中...");
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(bizContent.getCardId()); //卡号
bean.setObuId(bizContent.getObuId()); //签号
@@ -155,6 +157,11 @@ public class DevicePendingActivity extends AppActivity {
}
bean.setProvider(String.valueOf(provider));
bean.setReason(FunHelper.getText(binding.etReason));
bean.setAgentId("52010106004");
bean.setChannelId("5201010200601130001");
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId());
RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE81, new Gson().toJson(bean));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() {
@Override

+ 7
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/EquipmentLossReportActivity.java Bestand weergeven

@@ -127,6 +127,7 @@ public class EquipmentLossReportActivity extends AppActivity {
.enqueue(new Converter<Result>(getContext(), "请稍后...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
showHintDialog(bizContent);
}

@@ -143,11 +144,17 @@ public class EquipmentLossReportActivity extends AppActivity {
* @param bizContent
*/
private void cardReportTheLoss(ResultBean.BizContent bizContent){
showDialog("申请中...");
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(bizContent.getCardId()); //卡号
bean.setObuId(bizContent.getObuId()); //签号
bean.setOrderId(bizContent.getOrderId()); //订单id
bean.setOperation(String.valueOf(opeartion)); //1-卡挂失, 2-牵挂失, 3-卡签挂失, 4-卡解挂 ,5-签解挂
bean.setAgentId("52010106004");
bean.setChannelId("5201010200601130001");
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId());
RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE82, new Gson().toJson(bean));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() {
@Override

+ 14
- 7
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/ReplaceEtcStep4Activity.java Bestand weergeven

@@ -5,6 +5,7 @@ import android.view.View;

import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.LogUtils;
import com.google.gson.Gson;
import com.huntersun.vkyes.etcopencard.R;
import com.huntersun.vkyes.etcopencard.databinding.ActivityReplaceEtcStep4Binding;
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit;
@@ -199,7 +200,7 @@ public class ReplaceEtcStep4Activity extends AppActivity {
private void gotoNextPage(String id){
Bundle bundle = new Bundle();
bundle.putString("json",json);
bundle.putString("id",id);
bundle.putString("applyJson",applyData == null ? "" : new Gson().toJson(applyData));
jumpToPage(ReplaceEtcStep5Activity.class,bundle);
finish();
}
@@ -216,9 +217,14 @@ public class ReplaceEtcStep4Activity extends AppActivity {
@Override
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
if (cancel){
if (cancel){//取消申请
cancelApply();
}else{
return;
}

if (haveApplyInfo && applyData.status.equals("APPLY")){//申请中
gotoNextPage(applyData.getId());
}else{//申请
applyExchange();
}
}
@@ -306,15 +312,15 @@ public class ReplaceEtcStep4Activity extends AppActivity {
binding.obu.setChecked(false);
binding.cardobu.setChecked(false);
if (view == binding.choiceCard || view == binding.card) {
if (applyType.equals(EX_OBU)) return; //只支持OBU不能选择
if (FunHelper.isEmpty(data.getCardId())) return; //只支持OBU不能选择
binding.card.setChecked(true);
applyType = EX_CARD;
} else if (view == binding.choiceOBU || view == binding.obu) {
if (applyType.equals(EX_CARD)) return; //只支持CARD不能选择
if (FunHelper.isEmpty(data.getObuId())) return; //只支持CARD不能选择
binding.obu.setChecked(true);
applyType = EX_OBU;
} else if (view == binding.choiceCardObu || view == binding.cardobu) {
if (!applyType.equals(EX_CARD_OBU)) return; //只支持一项的不能选择
if (FunHelper.isEmpty(data.getCardId()) || FunHelper.isEmpty(data.getObuId())) return; //只支持一项的不能选择
binding.cardobu.setChecked(true);
applyType = EX_CARD_OBU;
}
@@ -372,7 +378,8 @@ public class ReplaceEtcStep4Activity extends AppActivity {
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
if (!FunHelper.isEmpty(bizContent.list)){
applyData = (ResultBean.BizContent) bizContent.list.get(0);
//永远获取最新一条
applyData = (ResultBean.BizContent) bizContent.list.get(bizContent.list.size() - 1);
}
setDataToView();
}

+ 9
- 5
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/ReplaceEtcStep5Activity.java Bestand weergeven

@@ -33,9 +33,10 @@ import retrofit2.Response;
public class ReplaceEtcStep5Activity extends AppActivity {
private ActivityReplaceEtcStep5Binding binding;

private String json;
//订单数据
private ResultBean.BizContent data;
private String id; //上个接口返回的id
//申请单信息
private ResultBean.BizContent applyData;

//邮寄方式 0-不邮寄 1-邮寄
private int sendStatus = 0;
@@ -50,11 +51,14 @@ public class ReplaceEtcStep5Activity extends AppActivity {

@Override
protected void initView() {
json = getIntent().getStringExtra("json");
id = getIntent().getStringExtra("id");
String json = getIntent().getStringExtra("json");
String applyJson = getIntent().getStringExtra("applyJson");
if (!FunHelper.isEmpty(json)){
data = JSON.parseObject(json, ResultBean.BizContent.class);
}
if (!FunHelper.isEmpty(applyJson)){
applyData = JSON.parseObject(applyJson, ResultBean.BizContent.class);;
}

binding.LLReason.setOnClickListener(this::initClick);
binding.LLLogisticCompany.setOnClickListener(this::initClick);
@@ -141,7 +145,7 @@ public class ReplaceEtcStep5Activity extends AppActivity {

private void submit(){
Map<String, String> params = new HashMap<>();
params.put("id", id);
params.put("id", applyData.getId());
params.put("configId", "6a9a54bc01f6443faea7ffeb8b5b19f6");
params.put("sendStatus", String.valueOf(receiveMethod)); //对于业务员端来说这个字段和收货方式字段是相反的
params.put("receiveMethod", String.valueOf(sendStatus)); //对于业务员端来说这个字段和邮寄方式字段是相反的

Laden…
Annuleren
Opslaan