Runnable如何传参
private class TimerUpdateTask implements Runnable{
private boolean isUnion = false;
public TimerUpdateTask(boolean isUnion){
this.isUnion = isUnion ;
}
@Override
public void run() {
String printMsg = "";
String mSerialNumber = out_trade_no;
final String guideInfo = guideinfo;
if (this.isUnion) {
UnionPayDialog.dismissUnionDialog();
PayResultDialog.showPayResultDialog(getContext(), true, mUnionPayResult.getOrderNum(), mUnionPayResult.getConfirmNum(), ALLPrize + "", "", "003136");
printMsg = PrintMsgAndDialogUtils.setPrintMsg(myApplication, 3, mCardNo, mPatientName, "门诊缴费",
"", patientInfo, ALLPrize + "",
mSerialNumber,choosedBean.get(0).getOrderID(),invoiceNo);
LogSaverUtils.saveTradePrintLog(mUnionPayResult.getConfirmNum(), printMsg + "\n" + guideInfo + "\n\n\n\n\n");
LogSaverUtils.sendAndSaveUnionTradeLog(myApplication, getContext(), "1", mUnionPayResult, "门诊缴费", secondTrackData, field55, cardSN, patientInfo, mPatientID, mPatientName, TransMoneyUtils.transMoney(ALLPrize+""));
} else {
QRCodePayDialog.dismissQRCodeDialog();
// PayResultDialog.showPayResultDialog(getContext(), true, transaction_id, out_trade_no, ALLPrize + "", "", "003136");
PayResultDialog.showPayResultDialog(getContext(), true, out_trade_no, out_trade_no, ALLPrize + "", "", "003136");
LogSaverUtils.saveQRTradeLog(out_trade_no, "支付成功,确认缴费成功" + LogSaverUtils.getQRSaveLog(out_trade_no, mPatientName, ALLPrize + ""));
printMsg = PrintMsgAndDialogUtils.setPrintMsg(myApplication, isWeixinPay ? 2 : 1, mCardNo,
mPatientName, "门诊缴费", "", patientInfo, ALLPrize + "",
mSerialNumber,choosedBean.get(0).getOrderID(),invoiceNo);
LogSaverUtils.saveTradePrintLog(out_trade_no, printMsg + "\n" + guideInfo + "\n\n\n\n\n"); QRCodePayDialog.dismissQRCodeDialog();
// PayResultDialog.showPayResultDialog(getContext(), true, transaction_id, out_trade_no, ALLPrize + "", "", "003136");
PayResultDialog.showPayResultDialog(getContext(), true, out_trade_no, out_trade_no, ALLPrize + "", "", "003136");
LogSaverUtils.saveQRTradeLog(out_trade_no, "支付成功,确认缴费成功" + LogSaverUtils.getQRSaveLog(out_trade_no, mPatientName, ALLPrize + ""));
printMsg = PrintMsgAndDialogUtils.setPrintMsg(myApplication, isWeixinPay ? 2 : 1, mCardNo,
mPatientName, "门诊缴费", "", patientInfo, ALLPrize + "",
mSerialNumber,choosedBean.get(0).getOrderID(),invoiceNo);
LogSaverUtils.saveTradePrintLog(out_trade_no, printMsg + "\n" + guideInfo + "\n\n\n\n\n");
}
if (prescription.getResultInfo().size() > 0) {
mPrescriptionAdapter.removePosition(choosedBean.get(0));
info_dptnam.setText("-");
info_docname.setText("-");
info_money.setText("-");
}
final String finalPrintMsg = printMsg;
PayResultDialog.setPrintClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
PayResultDialog.dismissPayResultDialog();
PrintMsgAndDialogUtils.showPrintDialog(getContext());
if (UrlConf.shouji) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
PrintMsgAndDialogUtils.printChangeFinishView();
}
}, 3000);
} else {
Bitmap qrBitmap = null;
try {
qrBitmap = QRCodeUtil.CreateOneDCode(mPatientID, 400, 200);
} catch (WriterException e) {
e.printStackTrace();
}
PrinterUtils.getInstances(getContext()).startPrint(finalPrintMsg, guideinfo + "",qrBitmap);
PrinterUtils.getInstances(getContext()).setPrintFinishListener(new PrintFinishListener() {
@Override
public void onPrintSuccess() {
PrintMsgAndDialogUtils.printChangeFinishView();
}
@Override
public void onPrintFailed() {
}
});
}
}
});
}
}
timerUpdateHandler = new Handler();
TimerUpdateTask timerUpdateTask = new TimerUpdateTask(isUnion);
timerUpdateHandler.postDelayed(timerUpdateTask,5000);
Runnable如何传参的更多相关文章
- Oracle 用Drapper进行like模糊传参查询需要在参数值前后带%符合
Oracle 用Drapper进行like模糊传参查询需要在参数值前后带%符合 string sqlstr="select * from tblname where name like ...
- Angular页面传参的四种方法
1. 基于ui-router的页面跳转传参 (1)在Angular的app.js中用ui-route定义路由,比如有两个页面, 一个页面(producers.html)放置了多个producers,点 ...
- 使用java传参调用exe并且获取程序进度和返回结果的一种方法
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 在某个项目中需要考虑使用java后台调用由C#编写的切图程序( ...
- Oracle Sales Cloud:报告和分析(BIEE)小细节2——利用变量和过滤器传参(例如,根据提示展示不同部门的数据)
在上一篇随笔中,我们建立了部门和子部门的双提示,并将部门和子部门做了关联.那么,本篇随笔我们重点介绍利用建好的双提示进行传参. 在操作之前,我们来看一个报告和分析的具体需求: [1] 两个有关联的提示 ...
- js动态绑定click事件时function传参问题
今天碰到了这样一个问题,我在javascript中动态创建了一个button, 然后我想给改button添加click事件,绑定的function想要传入一个变量参数, 一开始我想直接通过函数传参传进 ...
- C#进阶系列——WebApi 接口参数不再困惑:传参详解
前言:还记得刚使用WebApi那会儿,被它的传参机制折腾了好久,查阅了半天资料.如今,使用WebApi也有段时间了,今天就记录下API接口传参的一些方式方法,算是一个笔记,也希望能帮初学者少走弯路.本 ...
- 点击div 跳转并通过URL传参
点击div前要先给div绑定要传的参数: //给panel绑定自定义属性,方便在跳转时传带参数,键/值对排列 panel.attr("user_age",user_age); pa ...
- 纯html页面之间传参
//页面引入//传参方法,可解析url参数 (function($){ $.getUrlParam = function(name) { var reg = new RegExp("(^|& ...
- ★★★Oracle sql 传参特别注意★★★
最近遇到一个非常烦人的问题,用传参的方式执行sql语句结果老是报 Oracle ORA-01722: 无效数字 一直无法找到原因. 表结构大致如下: table test_station ( tblR ...
随机推荐
- 简洁的实现ls-l命令
现在我们来简洁的实现命令:了解一下相关知识: 我们使用掩码可以很明确的得出文件的每一种信息.关于掩码,上图中的S_IRUSR等均为掩码.我们来看看函数getpwuid,原型:struct passwd ...
- Visual Studio配置C/C++-PostgreSQL(9.6.3)开发环境(ZT)
https://www.2cto.com/database/201707/658910.html 开发环境 Visual Studio 2017[15.2(26430.16)] PostgreSQL ...
- shiro中的授权
- struts原理图
n the diagram, an initial request goes to the Servlet container (such as Jetty or Resin) which is pa ...
- 使用openshit在ubuntu14.04下一键部署openstack(juno版本)
一.基本介绍 本实验是在vmware workstation上虚拟机ubuntu14.04(64bit,desktop)上部署openstack(Juno版本).采用的工具是openshit.open ...
- git flow分支管理
阅读目录 两种核心分支 三种临时分支 Git Flow流程示例代码 Git Flow工具 分支命名规范 总结 git flow是Vincent Driessen提出了一个分支管理的策略,非常值得借鉴. ...
- Velocity Obstacle
[Velocity Obstacle] Two circular objects A,B, at time t(0), with velocity V(A),V(B). A represent the ...
- target=_blank攻击
[target=_blank攻击] 在<a>标签中加入 rel="noopener noreferrer" 来避免. 参考:https://mathiasbynens. ...
- Typechecking With PropTypes
[Typechecking With PropTypes] 1.props类型检查 React has some built-in typechecking abilities. To run typ ...
- putty加了密钥ssh不能登陆,PuTTY:server refused our key问题的解决(转)
直接上方法:禁用系统的selinux功能,命令#setenforce0,但重启系统,selinux仍然启用.根治方法:更改SElinux的配置文件/etc/selinux/config,修改SELIN ...