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 ...
随机推荐
- 建立一个php 基础类
在些PHP文件的时候,一般首先都是要先写一下基础类: 主要包括以下几个方面: 1.服务器的链接:包括主机,用户名,密码 2.数据库的选择:要操作哪个数据库 3.字符集的设置:设置什么样的编码 4.查询 ...
- HTML Tables
Great job! In this lesson, you learned how to create a table, add data to it, and section the table ...
- 尚硅谷redis学习7-持久化AOF
AOF比RDB优点在于数据的实时性高,经过设置后最多只会损失一秒钟的数据,而RDB最多可能损失上次备份到此次DOWM机间的数据 原理 配置文件 设置同步频率 重启redis,测试,可以看到数据在关机重 ...
- Java重写equals方法(重点讲解)
为什么equals()方法要重写? 判断两个对象在逻辑上是否相等,如根据类的成员变量来判断两个类的实例是否相等,而继承Object中的equals方法只能判断两个引用变量是否是同一个对象.这样我们往往 ...
- linux 文件系统之superblock
为了实际测试这个pagecache和对裸盘操作的区别,我一不小心敲错命令,将一个磁盘的super_block给抹掉了,全是0, dd if =/dev/zero of=/dev/sda2 bs=409 ...
- linux 再多的running也挡不住锁
再续<linux 3.10 一次softlock排查>,看运行态进程数量之多: crash> mach MACHINE TYPE: x86_64 MEMORY SIZE: GB CP ...
- Spring事务管理——回滚(rollback-for)控制
探讨Spring事务控制中,异常触发事务回滚原理.文章进行了6种情况下的Spring事务是否回滚. 以下代码都是基于Spring与Mybatis整合,使用Spring声明式事务配置事务方法. 1.不捕 ...
- Spring/SpringBoot定义统一异常错误码返回
配置 大致说下流程, 首先我们自定义一个自己的异常类CustomException,继承RuntimeException.再写一个异常管理类ExceptionManager,用来抛出自定义的异常. 然 ...
- Glide4 高效加载图片的配置【转】
原文: Glide4 高效加载图片的配置 https://www.jianshu.com/p/a079713f280f
- 收藏点webservice接口
商业和贸易: 1.股票行情数据 WEB 服务(支持香港.深圳.上海基金.债券和股票:支持多股票同时查询) Endpoint: http://webservice.webxml.com.cn/WebSe ...