Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
fmp_vip
Commits
b0654efa
Commit
b0654efa
authored
Jul 25, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 结算接口中计算代金券金额,根据其他金额算先进金额。
parent
c155641f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
task/taskfinal.cpp
+3
-2
No files found.
task/taskfinal.cpp
View file @
b0654efa
...
@@ -29,7 +29,7 @@ void TaskFinal::packageServerReq()
...
@@ -29,7 +29,7 @@ void TaskFinal::packageServerReq()
QJsonArray
coupons
=
getPosJsonValue
(
PosProps
.
Coupons
).
toArray
();
QJsonArray
coupons
=
getPosJsonValue
(
PosProps
.
Coupons
).
toArray
();
// 储值金、积分、第三方、代金券
// 储值金、积分、第三方、代金券
int
codeAmount
=
0
,
scoreAmount
=
0
,
cashAmount
=
0
,
thirdAmount
=
0
;
int
codeAmount
=
0
,
scoreAmount
=
0
,
cashAmount
=
0
,
couponAmount
=
0
,
thirdAmount
=
0
;
trans
[
"third_pay_type"
]
=
4
;
trans
[
"third_pay_type"
]
=
4
;
foreach
(
auto
pay_v
,
getPosJsonValue
(
PosProps
.
Pay_ids
).
toArray
())
foreach
(
auto
pay_v
,
getPosJsonValue
(
PosProps
.
Pay_ids
).
toArray
())
{
{
...
@@ -41,6 +41,7 @@ void TaskFinal::packageServerReq()
...
@@ -41,6 +41,7 @@ void TaskFinal::packageServerReq()
scoreAmount
=
pay_ob
[
PosProps
.
Pay_amount
].
toInt
();
scoreAmount
=
pay_ob
[
PosProps
.
Pay_amount
].
toInt
();
}
else
if
(
type
==
"20003"
)
{
// 代金券
}
else
if
(
type
==
"20003"
)
{
// 代金券
coupons
.
append
(
pay_ob
[
PosProps
.
Coupon_code
].
toString
());
coupons
.
append
(
pay_ob
[
PosProps
.
Coupon_code
].
toString
());
couponAmount
+=
pay_ob
[
PosProps
.
Pay_amount
].
toInt
();
}
else
if
(
type
==
"10001"
||
type
==
"10004"
)
{
}
else
if
(
type
==
"10001"
||
type
==
"10004"
)
{
thirdAmount
=
pay_ob
[
PosProps
.
Pay_amount
].
toInt
();
thirdAmount
=
pay_ob
[
PosProps
.
Pay_amount
].
toInt
();
trans
[
"third_pay_trans_id"
]
=
pay_ob
[
PosProps
.
Pay_transId
];
trans
[
"third_pay_trans_id"
]
=
pay_ob
[
PosProps
.
Pay_transId
];
...
@@ -54,7 +55,7 @@ void TaskFinal::packageServerReq()
...
@@ -54,7 +55,7 @@ void TaskFinal::packageServerReq()
}
}
trans
[
ServerProps
(
PosProps
.
Coupons
)]
=
coupons
;
trans
[
ServerProps
(
PosProps
.
Coupons
)]
=
coupons
;
cashAmount
=
getPosJsonValue
(
PosProps
.
PaidAmount
).
toInt
()
-
codeAmount
-
scoreAmount
-
thirdAmount
;
cashAmount
=
getPosJsonValue
(
PosProps
.
PaidAmount
).
toInt
()
-
codeAmount
-
scoreAmount
-
couponAmount
-
thirdAmount
;
trans
[
ServerProps
(
PosProps
.
CodeAmount
)]
=
codeAmount
;
trans
[
ServerProps
(
PosProps
.
CodeAmount
)]
=
codeAmount
;
trans
[
ServerProps
(
PosProps
.
ScoreAmount
)]
=
scoreAmount
;
trans
[
ServerProps
(
PosProps
.
ScoreAmount
)]
=
scoreAmount
;
trans
[
ServerProps
(
PosProps
.
CashAmount
)]
=
cashAmount
;
trans
[
ServerProps
(
PosProps
.
CashAmount
)]
=
cashAmount
;
...
...
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