Explorar el Código

feat: 更换ETC修改

master
huting hace 2 años
padre
commit
33254fdb82

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

*/ */
// private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/"; // 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://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 FileUrl = "http://222.85.144.89:19003/ifzt/api/"; //文件服务
private final String appId = "admin001"; private final String appId = "admin001";
private final String IFCODE = ""; private final String IFCODE = "";

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

return; return;
} }


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


* @param bizContent * @param bizContent
*/ */
private void cardReportTheLoss(ResultBean.BizContent bizContent){ private void cardReportTheLoss(ResultBean.BizContent bizContent){
showDialog("申请中...");
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(bizContent.getCardId()); //卡号 bean.setCardId(bizContent.getCardId()); //卡号
bean.setObuId(bizContent.getObuId()); //签号 bean.setObuId(bizContent.getObuId()); //签号
} }
bean.setProvider(String.valueOf(provider)); bean.setProvider(String.valueOf(provider));
bean.setReason(FunHelper.getText(binding.etReason)); 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)); RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE81, new Gson().toJson(bean));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() { new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() {
@Override @Override

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

.enqueue(new Converter<Result>(getContext(), "请稍后...") { .enqueue(new Converter<Result>(getContext(), "请稍后...") {
@Override @Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
showHintDialog(bizContent); showHintDialog(bizContent);
} }


* @param bizContent * @param bizContent
*/ */
private void cardReportTheLoss(ResultBean.BizContent bizContent){ private void cardReportTheLoss(ResultBean.BizContent bizContent){
showDialog("申请中...");
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(bizContent.getCardId()); //卡号 bean.setCardId(bizContent.getCardId()); //卡号
bean.setObuId(bizContent.getObuId()); //签号 bean.setObuId(bizContent.getObuId()); //签号
bean.setOrderId(bizContent.getOrderId()); //订单id bean.setOrderId(bizContent.getOrderId()); //订单id
bean.setOperation(String.valueOf(opeartion)); //1-卡挂失, 2-牵挂失, 3-卡签挂失, 4-卡解挂 ,5-签解挂 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)); RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE82, new Gson().toJson(bean));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() { new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() {
@Override @Override

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



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

if (haveApplyInfo && applyData.status.equals("APPLY")){//申请中
gotoNextPage(applyData.getId());
}else{//申请
applyExchange(); applyExchange();
} }
} }
binding.obu.setChecked(false); binding.obu.setChecked(false);
binding.cardobu.setChecked(false); binding.cardobu.setChecked(false);
if (view == binding.choiceCard || view == binding.card) { 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); binding.card.setChecked(true);
applyType = EX_CARD; applyType = EX_CARD;
} else if (view == binding.choiceOBU || view == binding.obu) { } 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); binding.obu.setChecked(true);
applyType = EX_OBU; applyType = EX_OBU;
} else if (view == binding.choiceCardObu || view == binding.cardobu) { } 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); binding.cardobu.setChecked(true);
applyType = EX_CARD_OBU; applyType = EX_CARD_OBU;
} }
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog(); hideDialog();
if (!FunHelper.isEmpty(bizContent.list)){ if (!FunHelper.isEmpty(bizContent.list)){
applyData = (ResultBean.BizContent) bizContent.list.get(0);
//永远获取最新一条
applyData = (ResultBean.BizContent) bizContent.list.get(bizContent.list.size() - 1);
} }
setDataToView(); setDataToView();
} }

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

public class ReplaceEtcStep5Activity extends AppActivity { public class ReplaceEtcStep5Activity extends AppActivity {
private ActivityReplaceEtcStep5Binding binding; private ActivityReplaceEtcStep5Binding binding;


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


//邮寄方式 0-不邮寄 1-邮寄 //邮寄方式 0-不邮寄 1-邮寄
private int sendStatus = 0; private int sendStatus = 0;


@Override @Override
protected void initView() { 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)){ if (!FunHelper.isEmpty(json)){
data = JSON.parseObject(json, ResultBean.BizContent.class); data = JSON.parseObject(json, ResultBean.BizContent.class);
} }
if (!FunHelper.isEmpty(applyJson)){
applyData = JSON.parseObject(applyJson, ResultBean.BizContent.class);;
}


binding.LLReason.setOnClickListener(this::initClick); binding.LLReason.setOnClickListener(this::initClick);
binding.LLLogisticCompany.setOnClickListener(this::initClick); binding.LLLogisticCompany.setOnClickListener(this::initClick);


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

Cargando…
Cancelar
Guardar