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如何传参的更多相关文章

  1. Oracle 用Drapper进行like模糊传参查询需要在参数值前后带%符合

    Oracle 用Drapper进行like模糊传参查询需要在参数值前后带%符合   string sqlstr="select * from tblname where name like ...

  2. Angular页面传参的四种方法

    1. 基于ui-router的页面跳转传参 (1)在Angular的app.js中用ui-route定义路由,比如有两个页面, 一个页面(producers.html)放置了多个producers,点 ...

  3. 使用java传参调用exe并且获取程序进度和返回结果的一种方法

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 在某个项目中需要考虑使用java后台调用由C#编写的切图程序( ...

  4. Oracle Sales Cloud:报告和分析(BIEE)小细节2——利用变量和过滤器传参(例如,根据提示展示不同部门的数据)

    在上一篇随笔中,我们建立了部门和子部门的双提示,并将部门和子部门做了关联.那么,本篇随笔我们重点介绍利用建好的双提示进行传参. 在操作之前,我们来看一个报告和分析的具体需求: [1] 两个有关联的提示 ...

  5. js动态绑定click事件时function传参问题

    今天碰到了这样一个问题,我在javascript中动态创建了一个button, 然后我想给改button添加click事件,绑定的function想要传入一个变量参数, 一开始我想直接通过函数传参传进 ...

  6. C#进阶系列——WebApi 接口参数不再困惑:传参详解

    前言:还记得刚使用WebApi那会儿,被它的传参机制折腾了好久,查阅了半天资料.如今,使用WebApi也有段时间了,今天就记录下API接口传参的一些方式方法,算是一个笔记,也希望能帮初学者少走弯路.本 ...

  7. 点击div 跳转并通过URL传参

    点击div前要先给div绑定要传的参数: //给panel绑定自定义属性,方便在跳转时传带参数,键/值对排列 panel.attr("user_age",user_age); pa ...

  8. 纯html页面之间传参

    //页面引入//传参方法,可解析url参数 (function($){ $.getUrlParam = function(name) { var reg = new RegExp("(^|& ...

  9. ★★★Oracle sql 传参特别注意★★★

    最近遇到一个非常烦人的问题,用传参的方式执行sql语句结果老是报 Oracle ORA-01722: 无效数字 一直无法找到原因. 表结构大致如下: table test_station ( tblR ...

随机推荐

  1. Linux命令:ssh-copy-id

    ssh-copy-id帮助 SSH-COPY-ID() BSD General Commands Manual SSH-COPY-ID() NAME ssh-copy-id — use locally ...

  2. 支持向量机通俗导论(理解SVM的三层境界)(ZT)

    支持向量机通俗导论(理解SVM的三层境界) 原文:http://blog.csdn.net/v_JULY_v/article/details/7624837 作者:July .致谢:pluskid.白 ...

  3. java.util.Arrays$ArrayList addAll报错

    执行下面代码时报错: List<String> centerList = WebConstants.SUPPORT_BIG_CENTERS_LIST; // WebConstants.SU ...

  4. Haskell语言学习笔记(88)语言扩展(1)

    ExistentialQuantification {-# LANGUAGE ExistentialQuantification #-} 存在类型专用的语言扩展 Haskell语言学习笔记(73)Ex ...

  5. How to remove live visual tree?

    How to remove live visual tree? How to不显示实时可视化树 Remove the "Go to live visual tree" / &quo ...

  6. C#中的 new Random()

    在C#中,产生随机数常用大方法是 new Random().Next(1,10)等方法. 但是仔细发现会有个问题: 看代码: ; i < ;i++ ) { Console.WriteLine(, ...

  7. [转载]FMS Dev Guide学习笔记(验证客户端二)

    一.开发交互式的媒体应用程序 1.使用unique key a. 在客户端ActionScript中创建一个unique key,如下代码所示,unique key的组成为本地电脑时间和一个随机数连接 ...

  8. 怎么在idea中新建package包,只有directory选项

    http://blog.csdn.net/liyanlei5858/article/details/77320063

  9. 移植ok6410 LCD驱动

    1.本次移植过程选择 linux-2.6.28 lcd驱动为参考移植到 linux-2.6.34 ok6410 开发板上. 2.移植过程 主要以给内核增加驱动的思想,在/driver/video/ 下 ...

  10. linux下各权限的细分

    PS:有时候你发现用root权限都不能修改某个文件,大部分原因是曾经用chattr命令锁定该文件了.chattr命令的作用很大,其中一些功能是由Linux内核版本来支持的,不过现在生产绝大部分跑的li ...