Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmPOS
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
fmPOS
Commits
3faf4339
Commit
3faf4339
authored
Dec 27, 2018
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配时间戳,修改一处显示问题
parent
c51d56e9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
8 deletions
+33
-8
fmp_redeem/consumokdialog.ui
+3
-0
fmp_redeem/fmp_redeem.cpp
+6
-6
fmp_redeem/redeemdetail.cpp
+12
-1
fmp_redeem/version.h
+1
-1
release/bins/server_url.ini
+11
-0
No files found.
fmp_redeem/consumokdialog.ui
View file @
3faf4339
...
...
@@ -178,6 +178,9 @@
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
</widget>
<widget
class=
"QLabel"
name=
"labChannel"
>
<property
name=
"geometry"
>
...
...
fmp_redeem/fmp_redeem.cpp
View file @
3faf4339
...
...
@@ -304,11 +304,11 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
{
channel
=
fullChannel
.
left
(
index
);
}
double
realAmount
=
codeInfo
[
"
amount
"
].
toInt
()
/
100.0
;
// 面值
if
(
coupon
.
trimmed
().
length
()
==
9
||
coupon
.
trimmed
().
length
()
==
15
)
//非码券
{
realAmount
=
codeInfo
[
"originalPrice"
].
toInt
()
/
100.0
;
// 面值
}
double
realAmount
=
codeInfo
[
"
originalPrice
"
].
toInt
()
/
100.0
;
// 面值
//
if(coupon.trimmed().length() == 9 || coupon.trimmed().length() == 15) //非码券
//
{
//
realAmount = codeInfo["originalPrice"].toInt()/100.0; // 面值
//
}
double
amount
=
codeInfo
[
"paid"
].
toInt
()
/
100.0
;
//实付
QString
time_name
=
QString
::
fromLocal8Bit
(
"有效期至: "
).
append
(
QDate
::
fromString
(
vdata
,
"yyyyMMdd"
).
toString
(
"yyyy-MM-dd"
));
...
...
@@ -320,7 +320,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
_redeem_json
[
"ver"
]
=
2
;
_redeem_json
[
"clientReqCount"
]
=
(
++
_clientReqCount
%=
10000000
);
_redeem_json
[
"reqtype"
]
=
71
;
// _redeem_json["partnerId"] = _partner_id;
// _redeem_json["partnerId"] = _partner_id;
_redeem_json
[
"store_id"
]
=
_store_id
;
_redeem_json
[
"station_id"
]
=
_station_id
;
_redeem_json
[
"trans_id"
]
=
QString
::
number
(
QDateTime
::
currentDateTimeUtc
().
toTime_t
());
...
...
fmp_redeem/redeemdetail.cpp
View file @
3faf4339
...
...
@@ -16,6 +16,7 @@
#include <QNetworkRequest>
#include <QJsonArray>
#include <QtConcurrent>
#include <QDateTime>
extern
bool
isRedeeming
;
RedeemDetail
::
RedeemDetail
(
int
partnerId
,
QString
storeId
,
QString
url
,
QWidget
*
parent
)
:
...
...
@@ -239,7 +240,17 @@ void RedeemDetail::ShowRedeemRecord(QJsonObject obj)
QString
channel
=
tmp
[
"channel"
].
toString
();
double
faceAmount
=
tmp
[
"amount"
].
toInt
()
/
100.0
;
double
realAmount
=
tmp
[
"realAmount"
].
toInt
()
/
100.0
;
QString
redeemDate
=
tmp
[
"redeemDate"
].
toString
();
QString
redeemDate
;
if
(
tmp
[
"redeemDate"
].
isString
())
{
redeemDate
=
tmp
[
"redeemDate"
].
toString
();
}
else
//时间戳
{
qint64
ms
=
tmp
[
"redeemDate"
].
toDouble
();
QDateTime
time
=
QDateTime
::
fromMSecsSinceEpoch
(
ms
);
redeemDate
=
time
.
toString
(
"yyyy-MM-dd HH:mm:ss"
);
}
totalMoney
+=
realAmount
;
...
...
fmp_redeem/version.h
View file @
3faf4339
...
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 9
1
#define VER_BUILD 9
2
//! Convert version numbers to string
#define _STR(S) #S
...
...
release/bins/server_url.ini
0 → 100644
View file @
3faf4339
[Home]
PartnerId
=
1739
[Pay]
Server
=
"http://115.159.119.32:27935/api?partner=yhdw"
Timeout
=
60
[Coupon]
Server
=
http://115.159.142.32/api
RedeemLog
=
http://115.159.119.32:27935/getRedeemLog
\ No newline at end of file
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