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. idea安装下载

    https://blog.csdn.net/qq_41983010/article/details/82562975

  2. cin.tie与sync_with_stdio加速输入输出

    在LeetCode上练习习题的时候每次AC之后都会去看别人的代码,几乎每次都能遇到cin.tie与sync_with_stdio.类似这样: static auto x = [](){ std::io ...

  3. TypeScript set get

    private _id:number; public get id():number{ return this._id; } public set id(value:number){ this._id ...

  4. Eclipse编译Android项目时出现的问题:Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead.

    Consle: Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Andro ...

  5. CMake Error at cmake/OpenCVUtils.cmake

    CMake Error at cmake/OpenCVUtils.cmake:1047 (message): Failed to download . Status= Call Stack (most ...

  6. canvas刮奖

    (function (global, factory) { typeof module === 'object' && typeof module.exports === 'objec ...

  7. php json中文被转义

    php 5.4 json_encode($str, JSON_UNESCAPED_UNICODE); 5.4版本以下 方法一function encode_json($str){ $code = js ...

  8. 微信小程序开发攻略

    首先,需要明确的一点是,小程序开发就是前端开发的一个小分支. 其次,小程序开发框架是一个精简版的React ,并且开发比较简单 . 第一步 获取AppId 小程序注册入口http://https:// ...

  9. GraphicsTier

    [GraphicsTier] 1.enum GraphicsTier 2.enum ShaderQuality 3.enum BuildTargetGroup 4.EditorGraphicsSett ...

  10. jps,jstack

    当java程序发生死循环的时候可以结合使用这两个命令查看死循环发生的位置.