Преглед на файлове

'2023年3月15日09:30:07'

master
wq преди 2 години
родител
ревизия
4dbe6cbb4a

+ 10
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/bean/ResultBean.java Целия файл

@@ -246,6 +246,16 @@ public class ResultBean<T> {
private String gender;
private String identityId;
private String command;
private String commandType;

public String getCommandType() {
return commandType;
}

public void setCommandType(String commandType) {
this.commandType = commandType;
}

private String cosRecordId;
private String cosResponse;
private String applyOrderNo;

+ 57
- 50
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/TopDefrayActivity.java Целия файл

@@ -140,7 +140,7 @@ public class TopDefrayActivity extends AppActivity implements StatusAction {
RequestParameters parameters = new RequestParameters(IFCode.IFCODE815, new Gson().toJson(bean));
//储值卡充值-圈存
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters)
.enqueue(new Converter<Result>() {
.enqueue(new Converter<Result>(getContext(), "储值卡充值确认中...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent content) {

@@ -166,57 +166,10 @@ public class TopDefrayActivity extends AppActivity implements StatusAction {

RequestParameters parameters = new RequestParameters(IFCode.IFCODE69, new Gson().toJson(bean2));
//圈存检测V3
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>() {
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>(getContext(), "圈存检测中...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent2) {
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(cardId); //卡号
bean.setFee(amountOfMoney); //充值金额
bean.setPreBalance((long) (BoxManagers.mCardInfoBean.getMoney() * 100)); //交易前卡额
bean.setTradeType("14"); //交易类型
bean.setCommand(bizContent2.getCommand()); //指令

bean.setCosResponse(EquipmentAndTools.WriteCard(bizContent2.getCommand()) + ""); //初始化结果(透传)
//bean.setPassId(""); //通行ID
bean.setConsumeId(""); //对公账户消费流水编号
bean.setOrderId(orderNum); //消费订单编号

bean.setAgentId("52010106004");
bean.setChannelId("5201010200601130001");
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId()); //人
RequestParameters parameters = new RequestParameters(IFCode.IFCODE70, new Gson().toJson(bean));
//圈存申请
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>() {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCommand(bizContent.getCommand()); //指令
bean.setCosResponse(EquipmentAndTools.WriteCard(bizContent.getCommand()) + ""); //初始化结果(透传)
bean.setRechargeId(bizContent.getRechargeId()); //充值流水号
bean.setPaidAmount(amountOfMoney); //实收金额
bean.setGiftAmount("0"); //赠送金额

bean.setAgentId("52010106004");
bean.setChannelId("5201010200601130001");
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId()); //人
RequestParameters parameters = new RequestParameters(IFCode.IFCODE72, new Gson().toJson(bean));
//圈存确认
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>() {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
// new Utils().showMessDialog(getActivity(), bizContent.getTradeStateDesc(), dialog -> {
// finish();
// });
toast("圈存成功!");
finish();
}
});
}
});
entrapment(bizContent2);
}
});
}
@@ -257,6 +210,60 @@ public class TopDefrayActivity extends AppActivity implements StatusAction {
});
}

public void entrapment(ResultBean.BizContent bizContent2) {
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(cardId); //卡号
bean.setFee(amountOfMoney); //充值金额
bean.setPreBalance((long) (BoxManagers.mCardInfoBean.getMoney() * 100)); //交易前卡额
bean.setTradeType("14"); //交易类型
bean.setCommand(bizContent2.getCommand()); //指令

bean.setCosResponse(EquipmentAndTools.WriteCard(bizContent2.getCommand()) + ""); //初始化结果(透传)
//bean.setPassId(""); //通行ID
bean.setConsumeId(""); //对公账户消费流水编号
bean.setOrderId(orderNum); //消费订单编号

bean.setAgentId("52010106004");
bean.setChannelId("5201010200601130001");
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId()); //人
RequestParameters parameters = new RequestParameters(IFCode.IFCODE70, new Gson().toJson(bean));
//圈存申请
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>(getContext(), "圈存申请中...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setPaidAmount(100L); //实收金额
bean.setGiftAmount("0"); //赠送金额
bean.setCommand(bizContent.getCommand()); //指令
bean.setCosResponse(EquipmentAndTools.WriteCard(bizContent.getCommand()) + ""); //初始化结果(透传)
bean.setRechargeId(bizContent.getRechargeId()); //充值流水号
bean.setPaidAmount(amountOfMoney); //实收金额
bean.setGiftAmount("0"); //赠送金额

bean.setAgentId("52010106004");
bean.setChannelId("5201010200601130001");
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId()); //人
if ("1".equals(bizContent.getCommandType())) {
entrapment(bizContent);
return;
}
RequestParameters parameters = new RequestParameters(IFCode.IFCODE72, new Gson().toJson(bean));
//圈存确认
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>(getContext(), "圈存确认中...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
toast("圈存成功!");
finish();
}
});
}
});
}

@Override
public StatusLayout getStatusLayout() {
return binding.hlStatusHint;

+ 13
- 5
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/TopEntrapmentActivity.java Целия файл

@@ -137,7 +137,7 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo
调用圈存检测->圈存修复->圈存确认
*/
private void doRecharge() {
toast("马上执行充值" + moneyInfo.payMoney);
// toast("马上执行充值" + moneyInfo.payMoney);
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean();
bean.setCardId(cardId); //卡号(传入)
bean.setFee((long) (Double.parseDouble(moneyInfo.payMoney) * 100L)); //充值金额
@@ -236,7 +236,8 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo
//充值申请
SendTheVerificationCodeBean beans = new SendTheVerificationCodeBean();
beans.setCardId(cardId); //卡号
beans.setRechargeMoney((long) (Double.parseDouble(moneyInfo.payMoney) * 100)); //充值金额
// beans.setRechargeMoney((long) (Double.parseDouble(moneyInfo.payMoney) * 100)); //充值金额
beans.setRechargeMoney((long) (Double.parseDouble(moneyInfo.payMoney))); //充值金额
RequestParameters parameters = new RequestParameters(IFCode.IFCODE810, new Gson().toJson(beans));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters)
.enqueue(new Converter<Result>(getActivity(), "充值申请中...") {
@@ -247,7 +248,8 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo
intent.putExtra("cardId", cardId); //卡号
intent.putExtra("command", command); //卡号
intent.putExtra("orderNum", bizContent.getOrderNum()); //充值单编号
intent.putExtra("fee", (Double.parseDouble(moneyInfo.payMoney) * 100) + ""); //充值单编号
// intent.putExtra("fee", (Double.parseDouble(moneyInfo.payMoney) * 100) + ""); //充值单编号
intent.putExtra("fee", "1"); //充值单编号
intent.setClass(getActivity(), TopDefrayActivity.class);
startActivity(intent);
}
@@ -349,12 +351,18 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo
bean.setChannelType("1");
bean.setTerminalId("999999999999");
bean.setStaffId(bean.getOpId()); //人

RequestParameters parameters = new RequestParameters(IFCode.IFCODE70, new Gson().toJson(bean));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters)
.enqueue(new Converter<Result>(getActivity(), "圈存申请中...") {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
callback.result(bizContent);
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) {
if ("1".equals(bizContent1.getCommandType())) {
EquipmentAndTools.WriteCard(bizContent.getCommand());
depositApplication(callback, bizContent1);
return;
}
callback.result(bizContent1);
}
});
}

+ 1
- 1
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/mail/InfoTabActivity.java Целия файл

@@ -182,7 +182,7 @@ public class InfoTabActivity extends AppActivity {
}
byte[] asd = UtilTool.hexStringToByteArray(data);
try {
str = new String(asd, "UTF-8");
str = new String(asd, "GBK");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}

+ 1
- 1
app/src/main/res/layout/login_activity.xml Целия файл

@@ -102,7 +102,7 @@
android:imeOptions="actionDone"
android:maxLength="20"
android:singleLine="true"
android:text="6517@Qwer" />
android:text="Huting123*" />

</LinearLayout>


Loading…
Отказ
Запис