|
|
@@ -320,67 +320,67 @@ public class LogoutEtcStep2Activity extends AppActivity { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 写卡->确认注销 |
|
|
|
*/ |
|
|
|
private void toWriteCommand(ResultBean.BizContent bizContent){ |
|
|
|
BluetoothWriteCardWriteTab.writeCommandToCardWithCode51( |
|
|
|
this, true,bizContent.getCommand(), curBizContent.getCardId(), |
|
|
|
9, bizContent.getCosRecordId(), new BluetoothWriteCardWriteTab.Callback() { |
|
|
|
public void success(int Plk) { |
|
|
|
confirmLogoutEtc(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 注销ETC |
|
|
|
*/ |
|
|
|
private void doLogoutEtc(){ |
|
|
|
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); |
|
|
|
bean.setOrderId(curBizContent.getOrderId()); |
|
|
|
bean.setSensitiveOrderId(curBizContent.getOrderId()); |
|
|
|
bean.setCardId(curBizContent.getCardId()); |
|
|
|
bean.setObuId(curBizContent.getObuId()); |
|
|
|
bean.setServiceType(String.valueOf(curType)); //注销类型 1-卡注销,2-签注销,3-卡签注销 |
|
|
|
bean.setHasCard(hasCard); //是否有卡 0-无,1-有 |
|
|
|
bean.setHasObu(hasOBU); //是否有Obu 0-无,1-有 |
|
|
|
bean.setCosProvider((curType == 3 && isDamage == 2) ? "1" : "0"); //是否需要写卡指令(有卡有签且签正常需要写卡) 0-不需要 1-需要 |
|
|
|
bean.setReasonCancellation(FunHelper.isEmpty(FunHelper.getText(binding.tvReason)) ? FunHelper.getText(binding.etReason) : FunHelper.getText(binding.tvReason)); //注销原因 |
|
|
|
bean.setAgentId(MyShared.getInstance().get(MyShared.AGENCYID,"").toString()); |
|
|
|
bean.setChannelId(MyShared.getInstance().get(MyShared.CHANNELID,"").toString()); |
|
|
|
bean.setChannelType("1"); |
|
|
|
bean.setStaffId((String) MyShared.getInstance().get(MyShared.OPENID, "")); |
|
|
|
bean.setTerminalId("999999999999"); |
|
|
|
MyRetrofit.newInstance(IFCode.IFCODE146, bean, new MyRetrofit.ReturnResult() { |
|
|
|
@Override |
|
|
|
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { |
|
|
|
hideDialog(); |
|
|
|
if (curType == 3 && isDamage == 2){//需要写卡 |
|
|
|
toWriteCommand(bizContent); |
|
|
|
}else{//不需要写卡 |
|
|
|
confirmLogoutEtc(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onError(Response<Result> resp) { |
|
|
|
MyRetrofit.ReturnResult.super.onError(resp); |
|
|
|
hideDialog(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 确认注销ETC |
|
|
|
*/ |
|
|
|
private void confirmLogoutEtc(){ |
|
|
|
Bundle bundle = new Bundle(); |
|
|
|
bundle.putString("from","0"); |
|
|
|
jumpToPage(CommonDealSuccessActivity.class,bundle); |
|
|
|
finish(); |
|
|
|
} |
|
|
|
// /** |
|
|
|
// * 写卡->确认注销 |
|
|
|
// */ |
|
|
|
// private void toWriteCommand(ResultBean.BizContent bizContent){ |
|
|
|
// BluetoothWriteCardWriteTab.writeCommandToCardWithCode51( |
|
|
|
// this, true,bizContent.getCommand(), curBizContent.getCardId(), |
|
|
|
// 9, bizContent.getCosRecordId(), new BluetoothWriteCardWriteTab.Callback() { |
|
|
|
// public void success(int Plk) { |
|
|
|
// confirmLogoutEtc(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// /** |
|
|
|
// * 注销ETC |
|
|
|
// */ |
|
|
|
// private void doLogoutEtc(){ |
|
|
|
// SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); |
|
|
|
// bean.setOrderId(curBizContent.getOrderId()); |
|
|
|
// bean.setSensitiveOrderId(curBizContent.getOrderId()); |
|
|
|
// bean.setCardId(curBizContent.getCardId()); |
|
|
|
// bean.setObuId(curBizContent.getObuId()); |
|
|
|
// bean.setServiceType(String.valueOf(curType)); //注销类型 1-卡注销,2-签注销,3-卡签注销 |
|
|
|
// bean.setHasCard(hasCard); //是否有卡 0-无,1-有 |
|
|
|
// bean.setHasObu(hasOBU); //是否有Obu 0-无,1-有 |
|
|
|
// bean.setCosProvider((curType == 3 && isDamage == 2) ? "1" : "0"); //是否需要写卡指令(有卡有签且签正常需要写卡) 0-不需要 1-需要 |
|
|
|
// bean.setReasonCancellation(FunHelper.isEmpty(FunHelper.getText(binding.tvReason)) ? FunHelper.getText(binding.etReason) : FunHelper.getText(binding.tvReason)); //注销原因 |
|
|
|
// bean.setAgentId(MyShared.getInstance().get(MyShared.AGENCYID,"").toString()); |
|
|
|
// bean.setChannelId(MyShared.getInstance().get(MyShared.CHANNELID,"").toString()); |
|
|
|
// bean.setChannelType("1"); |
|
|
|
// bean.setStaffId((String) MyShared.getInstance().get(MyShared.OPENID, "")); |
|
|
|
// bean.setTerminalId("999999999999"); |
|
|
|
// MyRetrofit.newInstance(IFCode.IFCODE146, bean, new MyRetrofit.ReturnResult() { |
|
|
|
// @Override |
|
|
|
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { |
|
|
|
// hideDialog(); |
|
|
|
// if (curType == 3 && isDamage == 2){//需要写卡 |
|
|
|
// toWriteCommand(bizContent); |
|
|
|
// }else{//不需要写卡 |
|
|
|
// confirmLogoutEtc(); |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// @Override |
|
|
|
// public void onError(Response<Result> resp) { |
|
|
|
// MyRetrofit.ReturnResult.super.onError(resp); |
|
|
|
// hideDialog(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
|
|
|
|
// /** |
|
|
|
// * 确认注销ETC |
|
|
|
// */ |
|
|
|
// private void confirmLogoutEtc(){ |
|
|
|
// Bundle bundle = new Bundle(); |
|
|
|
// bundle.putString("from","0"); |
|
|
|
// jumpToPage(CommonDealSuccessActivity.class,bundle); |
|
|
|
// finish(); |
|
|
|
// } |
|
|
|
|
|
|
|
/** |
|
|
|
* 选择上传剪裁图片 |