Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
094baf4e
Commit
094baf4e
authored
Oct 26, 2022
by
赵鹏翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通联支付相关功能调试
parent
c4288b9d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
31 deletions
+90
-31
MiYaPayPlantformPayWayEnum.java
...r/lib_common/function/pay/MiYaPayPlantformPayWayEnum.java
+2
-2
PrintService.kt
...com/fastcashier/lib_common/function/print/PrintService.kt
+88
-29
No files found.
lib_common/src/main/java/com/fastcashier/lib_common/function/pay/MiYaPayPlantformPayWayEnum.java
View file @
094baf4e
...
...
@@ -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
...
...
lib_common/src/main/java/com/fastcashier/lib_common/function/print/PrintService.kt
View file @
094baf4e
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,9 +61,9 @@ object PrintService {
selfCashierAccountInfo
:
SelfCashierAccountInfo
,
serialNumber
:
String
)
{
//
if (BuildConfig.DEBUG) {
//
printCashier(printer, payServiceResponse, selfCashierAccountInfo, serialNumber)
//
} else {
if
(
BuildConfig
.
DEBUG
)
{
printCashier
(
printer
,
payServiceResponse
,
selfCashierAccountInfo
,
serialNumber
)
}
else
{
printCashier
(
printer
,
payServiceResponse
,
...
...
@@ -78,7 +79,7 @@ object PrintService {
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,6 +295,13 @@ object PrintService {
payServiceResponse
:
PayServiceResponse
,
selfCashierAccountInfo
:
SelfCashierAccountInfo
)
{
if
(
BuildConfig
.
DEBUG
)
{
refundPrintCashier
(
printer
,
payServiceResponse
,
selfCashierAccountInfo
)
}
else
{
refundPrintCashier
(
printer
,
payServiceResponse
,
...
...
@@ -283,6 +315,7 @@ object PrintService {
)
}
}
}
/**
* 打印收银员联 - 退款
...
...
@@ -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
()
)
)
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment