Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
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
yunpeng.song
takeout_sbk
Commits
107c9ecc
Commit
107c9ecc
authored
Jul 11, 2018
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug:完善sbkApp端支付信息
parent
b668bd81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
8 deletions
+47
-8
fmTakeout/Control/flowControl.cpp
+38
-4
fmTakeout/Model/orderObject.h
+9
-4
No files found.
fmTakeout/Control/flowControl.cpp
View file @
107c9ecc
...
@@ -1362,7 +1362,8 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
...
@@ -1362,7 +1362,8 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
rObj
.
insert
(
"fm_ver"
,
"1.0"
);
rObj
.
insert
(
"fm_ver"
,
"1.0"
);
cObj
.
insert
(
"pay_id"
,
"002"
);
cObj
.
insert
(
"pay_id"
,
"002"
);
cObj
.
insert
(
"pay_str"
,
QString
::
fromLocal8Bit
(
"非码外卖"
));
cObj
.
insert
(
"pay_str"
,
QString
::
fromLocal8Bit
(
"非码外卖"
));
int
tempOrderType
,
tempOrderPayType
;
int
tempOrderType
,
tempOrderPayType
,
tempSbkAppPayType
=
0
;
QString
tempSbkAppPayValue
=
"0"
;
// 转换成星巴克规定的订单类型;
// 转换成星巴克规定的订单类型;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单;
if
(
3
==
order_p
->
getOrderType
()){
if
(
3
==
order_p
->
getOrderType
()){
...
@@ -1373,6 +1374,20 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
...
@@ -1373,6 +1374,20 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
else
if
(
"MOD"
==
order_p
->
channel
){
else
if
(
"MOD"
==
order_p
->
channel
){
tempOrderType
=
9
;
tempOrderType
=
9
;
tempOrderPayType
=
84
;
tempOrderPayType
=
84
;
//星巴克App端支付方式: 1:支付宝; 2:微信; 3:银联; 4:SVC卡;
if
(
4
==
order_p
->
payWay
){
tempSbkAppPayType
=
14
;
tempSbkAppPayValue
=
order_p
->
payfmId
;
}
else
if
(
1
==
order_p
->
payWay
){
tempSbkAppPayType
=
78
;
tempSbkAppPayValue
=
order_p
->
id
;
}
else
if
(
2
==
order_p
->
payWay
){
tempSbkAppPayType
=
77
;
tempSbkAppPayValue
=
order_p
->
id
;
}
else
{
tempSbkAppPayType
=
-
1
;
tempSbkAppPayValue
=
"-1"
;
}
}
else
if
(
"BAIDU"
==
order_p
->
channel
){
}
else
if
(
"BAIDU"
==
order_p
->
channel
){
tempOrderType
=
11
;
tempOrderType
=
11
;
tempOrderPayType
=
83
;
tempOrderPayType
=
83
;
...
@@ -1386,8 +1401,10 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
...
@@ -1386,8 +1401,10 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
tempOrderType
=
11
;
tempOrderType
=
11
;
tempOrderPayType
=
83
;
tempOrderPayType
=
83
;
}
}
cObj
.
insert
(
"orderOriginType"
,
11
);
cObj
.
insert
(
"orderOriginType"
,
tempOrderType
);
cObj
.
insert
(
"orderPayType"
,
83
);
cObj
.
insert
(
"orderPayType"
,
tempOrderPayType
);
cObj
.
insert
(
"sbkAppPayType"
,
tempSbkAppPayType
);
cObj
.
insert
(
"sbkAppPayValue"
,
tempSbkAppPayValue
);
cObj
.
insert
(
"retSyncOrderPrintInfo"
,
retSyncOrderPrintInfo
);
//同步POS本地数据库打印信息结果:[1:同步成功;0:同步失败]
cObj
.
insert
(
"retSyncOrderPrintInfo"
,
retSyncOrderPrintInfo
);
//同步POS本地数据库打印信息结果:[1:同步成功;0:同步失败]
cObj
.
insert
(
"paid_trans_id"
,
orderId
);
cObj
.
insert
(
"paid_trans_id"
,
orderId
);
cObj
.
insert
(
"pos_sale_id"
,
posCheckNo
);
cObj
.
insert
(
"pos_sale_id"
,
posCheckNo
);
...
@@ -1532,7 +1549,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
...
@@ -1532,7 +1549,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
rObj
.
insert
(
"fm_ver"
,
"1.0"
);
rObj
.
insert
(
"fm_ver"
,
"1.0"
);
cObj
.
insert
(
"pay_id"
,
"002"
);
cObj
.
insert
(
"pay_id"
,
"002"
);
cObj
.
insert
(
"pay_str"
,
QString
::
fromLocal8Bit
(
"非码外卖"
));
cObj
.
insert
(
"pay_str"
,
QString
::
fromLocal8Bit
(
"非码外卖"
));
int
tempOrderType
,
tempOrderPayType
;
int
tempOrderType
,
tempOrderPayType
,
tempSbkAppPayType
=
0
;
QString
tempSbkAppPayValue
=
"0"
;
// 转换成星巴克规定的订单类型;
// 转换成星巴克规定的订单类型;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单;
if
(
3
==
orderObject
->
getOrderType
()){
if
(
3
==
orderObject
->
getOrderType
()){
...
@@ -1543,6 +1561,20 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
...
@@ -1543,6 +1561,20 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
else
if
(
"MOD"
==
orderObject
->
channel
){
else
if
(
"MOD"
==
orderObject
->
channel
){
tempOrderType
=
9
;
tempOrderType
=
9
;
tempOrderPayType
=
84
;
tempOrderPayType
=
84
;
//星巴克App端支付方式: 1:支付宝; 2:微信; 3:银联; 4:SVC卡;
if
(
4
==
orderObject
->
payWay
){
tempSbkAppPayType
=
14
;
tempSbkAppPayValue
=
orderObject
->
payfmId
;
}
else
if
(
1
==
orderObject
->
payWay
){
tempSbkAppPayType
=
78
;
tempSbkAppPayValue
=
orderObject
->
id
;
}
else
if
(
2
==
orderObject
->
payWay
){
tempSbkAppPayType
=
77
;
tempSbkAppPayValue
=
orderObject
->
id
;
}
else
{
tempSbkAppPayType
=
-
1
;
tempSbkAppPayValue
=
"-1"
;
}
}
else
if
(
"BAIDU"
==
orderObject
->
channel
){
}
else
if
(
"BAIDU"
==
orderObject
->
channel
){
tempOrderType
=
11
;
tempOrderType
=
11
;
tempOrderPayType
=
83
;
tempOrderPayType
=
83
;
...
@@ -1563,6 +1595,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
...
@@ -1563,6 +1595,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
}
}
cObj
.
insert
(
"orderOriginType"
,
tempOrderType
);
cObj
.
insert
(
"orderOriginType"
,
tempOrderType
);
cObj
.
insert
(
"orderPayType"
,
tempOrderPayType
);
cObj
.
insert
(
"orderPayType"
,
tempOrderPayType
);
cObj
.
insert
(
"sbkAppPayType"
,
tempSbkAppPayType
);
cObj
.
insert
(
"sbkAppPayValue"
,
tempSbkAppPayValue
);
cObj
.
insert
(
"pos_sale_id"
,
orderObject
->
posCheckNo
);
cObj
.
insert
(
"pos_sale_id"
,
orderObject
->
posCheckNo
);
cObj
.
insert
(
"order_status"
,
orderObject
->
orderStatus
);
//订单的状态
cObj
.
insert
(
"order_status"
,
orderObject
->
orderStatus
);
//订单的状态
cObj
.
insert
(
"pay_ebcode"
,
orderObject
->
channel
);
cObj
.
insert
(
"pay_ebcode"
,
orderObject
->
channel
);
...
...
fmTakeout/Model/orderObject.h
View file @
107c9ecc
...
@@ -11,6 +11,7 @@ class OrderObject : public QObject
...
@@ -11,6 +11,7 @@ class OrderObject : public QObject
Q_PROPERTY
(
QString
id
READ
getId
WRITE
setId
)
Q_PROPERTY
(
QString
id
READ
getId
WRITE
setId
)
Q_PROPERTY
(
QString
payfmId
READ
getPayfmId
WRITE
setPayfmId
)
Q_PROPERTY
(
int
orderType
READ
getOrderType
WRITE
setOrderType
)
Q_PROPERTY
(
int
orderType
READ
getOrderType
WRITE
setOrderType
)
Q_PROPERTY
(
QString
orgOrderId
READ
getOrgOrderId
WRITE
setOrgOrderId
)
Q_PROPERTY
(
QString
orgOrderId
READ
getOrgOrderId
WRITE
setOrgOrderId
)
Q_PROPERTY
(
QString
waybillId
READ
getWaybillId
WRITE
setWaybillId
)
Q_PROPERTY
(
QString
waybillId
READ
getWaybillId
WRITE
setWaybillId
)
...
@@ -25,7 +26,7 @@ class OrderObject : public QObject
...
@@ -25,7 +26,7 @@ class OrderObject : public QObject
Q_PROPERTY
(
QString
storeName
READ
getStoreName
WRITE
setStoreName
)
Q_PROPERTY
(
QString
storeName
READ
getStoreName
WRITE
setStoreName
)
Q_PROPERTY
(
QString
storeAddress
READ
getStoreAddress
WRITE
setStoreAddress
)
Q_PROPERTY
(
QString
storeAddress
READ
getStoreAddress
WRITE
setStoreAddress
)
Q_PROPERTY
(
QString
channel
READ
getChannel
WRITE
setChannel
)
Q_PROPERTY
(
QString
channel
READ
getChannel
WRITE
setChannel
)
Q_PROPERTY
(
QString
payWay
READ
getPayWay
WRITE
setPayWay
)
Q_PROPERTY
(
int
payWay
READ
getPayWay
WRITE
setPayWay
)
Q_PROPERTY
(
QString
deliveryTime
READ
getDeliveryTime
WRITE
setDeliveryTime
)
Q_PROPERTY
(
QString
deliveryTime
READ
getDeliveryTime
WRITE
setDeliveryTime
)
Q_PROPERTY
(
QString
riderName
READ
getRiderName
WRITE
setRiderName
)
Q_PROPERTY
(
QString
riderName
READ
getRiderName
WRITE
setRiderName
)
Q_PROPERTY
(
QString
riderPhone
READ
getRiderPhone
WRITE
setRiderPhone
)
Q_PROPERTY
(
QString
riderPhone
READ
getRiderPhone
WRITE
setRiderPhone
)
...
@@ -85,6 +86,7 @@ public:
...
@@ -85,6 +86,7 @@ public:
QString
id
;
//编号
QString
id
;
//编号
QString
payfmId
;
//FM唯一码
int
orderType
;
//订单类型: 用来区分是 正常订单(1) 预订单(2) 还是 客诉单:3 (星巴克定义客诉单的类型:12);
int
orderType
;
//订单类型: 用来区分是 正常订单(1) 预订单(2) 还是 客诉单:3 (星巴克定义客诉单的类型:12);
QString
orgOrderId
;
//原始订单编号
QString
orgOrderId
;
//原始订单编号
QString
waybillId
;
//运单号
QString
waybillId
;
//运单号
...
@@ -99,7 +101,7 @@ public:
...
@@ -99,7 +101,7 @@ public:
QString
storeName
;
QString
storeName
;
QString
storeAddress
;
QString
storeAddress
;
QString
channel
;
//订单渠道: 1 星巴克APP 2饿了么APP 3 客诉单;
QString
channel
;
//订单渠道: 1 星巴克APP 2饿了么APP 3 客诉单;
QString
payWay
;
int
payWay
;
QString
deliveryTime
;
//配送时间
QString
deliveryTime
;
//配送时间
QString
riderName
;
//骑手名
QString
riderName
;
//骑手名
QString
riderPhone
;
//骑手电话
QString
riderPhone
;
//骑手电话
...
@@ -144,6 +146,9 @@ public:
...
@@ -144,6 +146,9 @@ public:
inline
QString
getId
()
const
{
return
id
;}
inline
QString
getId
()
const
{
return
id
;}
inline
void
setId
(
const
QString
&
v
){
id
=
v
;}
inline
void
setId
(
const
QString
&
v
){
id
=
v
;}
inline
QString
getPayfmId
()
const
{
return
id
;}
inline
void
setPayfmId
(
const
QString
&
v
){
id
=
v
;}
inline
int
getOrderType
()
const
{
return
orderType
;}
inline
int
getOrderType
()
const
{
return
orderType
;}
inline
void
setOrderType
(
const
int
&
v
){
orderType
=
v
;}
inline
void
setOrderType
(
const
int
&
v
){
orderType
=
v
;}
...
@@ -183,8 +188,8 @@ public:
...
@@ -183,8 +188,8 @@ public:
inline
QString
getChannel
()
const
{
return
channel
;}
inline
QString
getChannel
()
const
{
return
channel
;}
inline
void
setChannel
(
const
QString
&
v
){
channel
=
v
;}
inline
void
setChannel
(
const
QString
&
v
){
channel
=
v
;}
inline
QString
getPayWay
()
const
{
return
payWay
;}
inline
int
getPayWay
()
const
{
return
payWay
;}
inline
void
setPayWay
(
const
QString
&
v
){
payWay
=
v
;}
inline
void
setPayWay
(
const
int
&
v
){
payWay
=
v
;}
inline
QString
getDeliveryTime
()
const
{
return
deliveryTime
;}
inline
QString
getDeliveryTime
()
const
{
return
deliveryTime
;}
inline
void
setDeliveryTime
(
const
QString
&
v
){
deliveryTime
=
v
;}
inline
void
setDeliveryTime
(
const
QString
&
v
){
deliveryTime
=
v
;}
...
...
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