Commit 094baf4e authored by 赵鹏翔's avatar 赵鹏翔

通联支付相关功能调试

parent c4288b9d
......@@ -23,13 +23,13 @@ public class MiYaPayPlantformPayWayEnum {
GONGHANG("K", "工行"),
FEIFAN("L", "飞凡"),
HUARUIYINHANG("M", "华润银行"),
YINLIANQIANBAO("N", "银联钱包"),
JINGDONG2("P", "京东钱包2.0"),
RUNQIANBAO("T", "润钱包"),
YIDONG("U", "移动钱包"),
MINSHENG("S", "民生银行"),
YINLIANSHANGWU("Q", "银联商务"),
TONGLIANZHIFU("ZA", "通联支付");
TONGLIANZHIFU("N", "通联支付");//N实际上是银联钱包,但是匡威平台银联支付走的是通联支付的渠道,app内默认处理成通联支付的形式
// YINLIANQIANBAO("N", "银联钱包");
/**
* 资源id
......
package com.fastcashier.lib_common.function.print
import android.text.TextUtils
import com.fastcashier.lib_common.BuildConfig
import com.fastcashier.lib_common.function.account.AccountService
import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo
import com.fastcashier.lib_common.function.pay.MiYaPayPlantformPayWayEnum
......@@ -60,25 +61,25 @@ object PrintService {
selfCashierAccountInfo: SelfCashierAccountInfo,
serialNumber: String
) {
// if (BuildConfig.DEBUG) {
// printCashier(printer, payServiceResponse, selfCashierAccountInfo, serialNumber)
// } else {
printCashier(
printer,
payServiceResponse,
selfCashierAccountInfo,
serialNumber
)
Timer().schedule(4000) {
printCustomer(
if (BuildConfig.DEBUG) {
printCashier(printer, payServiceResponse, selfCashierAccountInfo, serialNumber)
} else {
printCashier(
printer,
payServiceResponse,
selfCashierAccountInfo,
serialNumber
)
Timer().schedule(4000) {
printCustomer(
printer,
payServiceResponse,
selfCashierAccountInfo,
serialNumber
)
}
}
// }
}
/**
......@@ -125,7 +126,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1]
//打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元")
printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
}
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠
......@@ -142,7 +149,13 @@ object PrintService {
}
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元")
printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
}
printer.printText("持卡人签名:")
......@@ -197,7 +210,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1]
//打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元")
printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
}
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠
......@@ -214,7 +233,13 @@ object PrintService {
}
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元")
printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
}
printer.printText("\n\n")
}
......@@ -270,17 +295,25 @@ object PrintService {
payServiceResponse: PayServiceResponse,
selfCashierAccountInfo: SelfCashierAccountInfo
) {
refundPrintCashier(
printer,
payServiceResponse,
selfCashierAccountInfo
)
Timer().schedule(4000) {
refundPrintCustomer(
if (BuildConfig.DEBUG) {
refundPrintCashier(
printer,
payServiceResponse,
selfCashierAccountInfo
)
} else {
refundPrintCashier(
printer,
payServiceResponse,
selfCashierAccountInfo
)
Timer().schedule(4000) {
refundPrintCustomer(
printer,
payServiceResponse,
selfCashierAccountInfo
)
}
}
}
......@@ -329,7 +362,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1]
//打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元")
printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
}
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠
......@@ -346,7 +385,13 @@ object PrintService {
}
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元")
printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
}
printer.printText("持卡人签名:")
......@@ -402,7 +447,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1]
//打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元")
printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
}
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠
......@@ -419,7 +470,13 @@ object PrintService {
}
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元")
printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
}
printer.printText("\n\n")
}
......@@ -536,7 +593,9 @@ object PrintService {
printer.printText(
Page58MmPrintUtils.printTwoData(
"退款金额",
"" + StringPriceFormatUtils.transStringPriceToDecimalString(statisticBean.refundTotalAmount.toString())
"" + StringPriceFormatUtils.transStringPriceToDecimalString(
statisticBean.refundTotalAmount.toString()
)
)
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment