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
161b5df4
Commit
161b5df4
authored
Nov 21, 2022
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support o2o-fulfillment auto insert option
Version: 2.2022.11.30
parent
0d527a29
Pipeline
#42053
canceled with stage
in 0 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
15 deletions
+16
-15
fmTakeout/Control/flowControl.cpp
+9
-9
fmTakeout/Model/orderObject.cpp
+2
-2
fmTakeout/Model/orderObject.h
+4
-4
fmTakeout/preDefine.h
+1
-0
No files found.
fmTakeout/Control/flowControl.cpp
View file @
161b5df4
...
@@ -939,12 +939,12 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject)
...
@@ -939,12 +939,12 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject)
QLOG_INFO
()
<<
QString
(
"[<<<<---PrintSumBillPosDB.getInstance().syncOrderDataToDB orderId:%1 syncOrderRet:%2--->>>>]"
).
arg
(
orderObject
->
id
).
arg
(
syncOrderRet
);
QLOG_INFO
()
<<
QString
(
"[<<<<---PrintSumBillPosDB.getInstance().syncOrderDataToDB orderId:%1 syncOrderRet:%2--->>>>]"
).
arg
(
orderObject
->
id
).
arg
(
syncOrderRet
);
// 更新订单的重打方式【支持补打方式】;
// 更新订单的重打方式【支持补打方式】;
if
(
orderObject
->
options
.
length
()
&&
orderObject
->
o
ptions
.
contains
(
JSON_PRINT_OPT
)
)
{
if
(
orderObject
->
pluginOptions
.
length
()
&&
orderObject
->
pluginO
ptions
.
contains
(
JSON_PRINT_OPT
)
)
{
QJsonObject
printOptions
=
orderObject
->
o
ptions
[
JSON_PRINT_OPT
].
toObject
();
QJsonObject
printOptions
=
orderObject
->
pluginO
ptions
[
JSON_PRINT_OPT
].
toObject
();
bool
reprintOrderRet
=
PrintMsgQueueDB
::
getInstance
().
resetPrintMsgStatus
(
orderObject
,
printOptions
);
bool
reprintOrderRet
=
PrintMsgQueueDB
::
getInstance
().
resetPrintMsgStatus
(
orderObject
,
printOptions
);
QLOG_INFO
()
<<
QString
(
"[<<<<---PrintMsgQueueDB.getInstance().resetPrintMsgStatus orderId:%1 reprintOrderRet:%2, printOpt= --->>>>]"
)
QLOG_INFO
()
<<
QString
(
"[<<<<---PrintMsgQueueDB.getInstance().resetPrintMsgStatus orderId:%1 reprintOrderRet:%2, printOpt= --->>>>]"
)
.
arg
(
orderObject
->
id
).
arg
(
reprintOrderRet
?
1
:
0
)
<<
printOptions
;
.
arg
(
orderObject
->
id
).
arg
(
reprintOrderRet
?
1
:
0
)
<<
printOptions
;
orderObject
->
o
ptions
=
QJsonObject
();
// 补打完成后,必须清空补打选项设置; 否则订单状态后续变化将会出现重复打印;
orderObject
->
pluginO
ptions
=
QJsonObject
();
// 补打完成后,必须清空补打选项设置; 否则订单状态后续变化将会出现重复打印;
}
}
}
}
...
@@ -975,12 +975,12 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject)
...
@@ -975,12 +975,12 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject)
}
}
// 更新订单的重打方式【支持补打方式】;
// 更新订单的重打方式【支持补打方式】;
if
(
orderObject
->
options
.
length
()
&&
orderObject
->
o
ptions
.
contains
(
JSON_PRINT_OPT
)
)
{
if
(
orderObject
->
pluginOptions
.
length
()
&&
orderObject
->
pluginO
ptions
.
contains
(
JSON_PRINT_OPT
)
)
{
QJsonObject
printOptions
=
orderObject
->
o
ptions
[
JSON_PRINT_OPT
].
toObject
();
QJsonObject
printOptions
=
orderObject
->
pluginO
ptions
[
JSON_PRINT_OPT
].
toObject
();
int
reprintOrderRet
=
PrintMsgQueueDB
::
getInstance
().
resetPrintMsgStatus
(
orderObject
,
printOptions
);
int
reprintOrderRet
=
PrintMsgQueueDB
::
getInstance
().
resetPrintMsgStatus
(
orderObject
,
printOptions
);
QLOG_INFO
()
<<
QString
(
"[<<<<---PrintMsgQueueDB.getInstance().resetPrintMsgStatus orderId:%1 reprintOrderRet:%2, printOpt= --->>>>]"
)
QLOG_INFO
()
<<
QString
(
"[<<<<---PrintMsgQueueDB.getInstance().resetPrintMsgStatus orderId:%1 reprintOrderRet:%2, printOpt= --->>>>]"
)
.
arg
(
orderObject
->
id
).
arg
(
reprintOrderRet
)
<<
printOptions
;
.
arg
(
orderObject
->
id
).
arg
(
reprintOrderRet
)
<<
printOptions
;
orderObject
->
o
ptions
=
QJsonObject
();
// 补打完成后,必须清空补打选项设置; 否则订单状态后续变化将会出现重复打印;
orderObject
->
pluginO
ptions
=
QJsonObject
();
// 补打完成后,必须清空补打选项设置; 否则订单状态后续变化将会出现重复打印;
}
}
}
}
...
@@ -1500,8 +1500,8 @@ bool FlowControl::_PullOrderDetail(const QString& orderId, const QString& channe
...
@@ -1500,8 +1500,8 @@ bool FlowControl::_PullOrderDetail(const QString& orderId, const QString& channe
if
(
!
order
.
contains
(
JSON_SKIP_PRINT
)
)
{
if
(
!
order
.
contains
(
JSON_SKIP_PRINT
)
)
{
order
.
insert
(
JSON_SKIP_PRINT
,
skipPrint
);
order
.
insert
(
JSON_SKIP_PRINT
,
skipPrint
);
}
}
if
(
!
order
.
contains
(
JSON_PUSH_OPTIONS
)
)
{
if
(
!
order
.
contains
(
JSON_PUSH_
PLUGIN_
OPTIONS
)
)
{
order
.
insert
(
JSON_PUSH_OPTIONS
,
pushOptins
);
order
.
insert
(
JSON_PUSH_
PLUGIN_
OPTIONS
,
pushOptins
);
}
}
_OrderAnalysis
(
order
);
_OrderAnalysis
(
order
);
}
}
...
@@ -4176,7 +4176,7 @@ void FlowControl::onProcessRetryInputOrder(const QString &orderId)
...
@@ -4176,7 +4176,7 @@ void FlowControl::onProcessRetryInputOrder(const QString &orderId)
orderPull
->
pullErrorCount
=
0
;
orderPull
->
pullErrorCount
=
0
;
orderPull
->
callBackUrl
=
TempOrderObject
->
callBackUrl
;
orderPull
->
callBackUrl
=
TempOrderObject
->
callBackUrl
;
orderPull
->
skipPrint
=
TempOrderObject
->
skipPrint
;
orderPull
->
skipPrint
=
TempOrderObject
->
skipPrint
;
orderPull
->
pushOptions
=
TempOrderObject
->
o
ptions
;
orderPull
->
pushOptions
=
TempOrderObject
->
pluginO
ptions
;
m_orderPullList
.
append
(
orderPull
);
m_orderPullList
.
append
(
orderPull
);
m_PullOrderDataMutex
.
unlock
();
m_PullOrderDataMutex
.
unlock
();
}
}
...
...
fmTakeout/Model/orderObject.cpp
View file @
161b5df4
...
@@ -193,8 +193,8 @@ void OrderObject::FromJson(const QJsonObject &json)
...
@@ -193,8 +193,8 @@ void OrderObject::FromJson(const QJsonObject &json)
}
}
// 更新 QJsonObject Value;
// 更新 QJsonObject Value;
if
(
json
.
contains
(
JSON_PUSH_OPTIONS
)
)
{
if
(
json
.
contains
(
JSON_PUSH_
PLUGIN_
OPTIONS
)
)
{
options
=
json
[
JSON_PUSH
_OPTIONS
].
toObject
();
pluginOptions
=
json
[
JSON_PUSH_PLUGIN
_OPTIONS
].
toObject
();
}
}
// 转换并存储 星巴克支付方式相关信息;
// 转换并存储 星巴克支付方式相关信息;
...
...
fmTakeout/Model/orderObject.h
View file @
161b5df4
...
@@ -113,7 +113,7 @@ class OrderObject : public QObject
...
@@ -113,7 +113,7 @@ class OrderObject : public QObject
Q_PROPERTY
(
QString
privacyPhone
READ
getPrivacyPhone
WRITE
setPrivacyPhone
)
Q_PROPERTY
(
QString
privacyPhone
READ
getPrivacyPhone
WRITE
setPrivacyPhone
)
Q_PROPERTY
(
QString
callBackUrl
READ
getCallBackUrl
WRITE
setCallBackUrl
)
Q_PROPERTY
(
QString
callBackUrl
READ
getCallBackUrl
WRITE
setCallBackUrl
)
Q_PROPERTY
(
bool
skipPrint
READ
getSkipPrint
WRITE
setSkipPrint
)
Q_PROPERTY
(
bool
skipPrint
READ
getSkipPrint
WRITE
setSkipPrint
)
Q_PROPERTY
(
QJsonObject
options
READ
getOptions
WRITE
set
Options
)
Q_PROPERTY
(
QJsonObject
pluginOptions
READ
getPluginOptions
WRITE
setPlugin
Options
)
public
:
public
:
OrderObject
(
QObject
*
parent
=
0
)
OrderObject
(
QObject
*
parent
=
0
)
...
@@ -266,7 +266,7 @@ public:
...
@@ -266,7 +266,7 @@ public:
QString
callBackUrl
;
// 为 Fulfillment Service 后多个OMS, 用于获取订单详情, 和汇报订单入机情况: 拉取订单详情成功时手动添加到订单json报文体中为了入机汇报接口;
QString
callBackUrl
;
// 为 Fulfillment Service 后多个OMS, 用于获取订单详情, 和汇报订单入机情况: 拉取订单详情成功时手动添加到订单json报文体中为了入机汇报接口;
bool
skipPrint
;
// 上游推送的订单 是否跳过打印;
bool
skipPrint
;
// 上游推送的订单 是否跳过打印;
//上游推送插件简要消息中包含的 key->options 特殊属性值: 将此属性值存储订单对象内存中
//上游推送插件简要消息中包含的 key->options 特殊属性值: 将此属性值存储订单对象内存中
QJsonObject
o
ptions
;
QJsonObject
pluginO
ptions
;
int
forwardPosStatus
;
// 正向单入机状态: 0:未知 1: 成功 2:失败;
int
forwardPosStatus
;
// 正向单入机状态: 0:未知 1: 成功 2:失败;
int
negativePosStatus
;
// 负向单同上;
int
negativePosStatus
;
// 负向单同上;
...
@@ -581,8 +581,8 @@ public:
...
@@ -581,8 +581,8 @@ public:
inline
bool
getSkipPrint
()
const
{
return
skipPrint
;}
inline
bool
getSkipPrint
()
const
{
return
skipPrint
;}
inline
void
setSkipPrint
(
const
bool
&
v
){
skipPrint
=
v
;}
inline
void
setSkipPrint
(
const
bool
&
v
){
skipPrint
=
v
;}
inline
QJsonObject
get
Options
()
const
{
return
o
ptions
;}
inline
QJsonObject
get
PluginOptions
()
const
{
return
pluginO
ptions
;}
inline
void
set
Options
(
const
QJsonObject
&
v
){
o
ptions
=
v
;}
inline
void
set
PluginOptions
(
const
QJsonObject
&
v
){
pluginO
ptions
=
v
;}
};
};
...
...
fmTakeout/preDefine.h
View file @
161b5df4
...
@@ -169,6 +169,7 @@
...
@@ -169,6 +169,7 @@
#define JSON_CALL_BACK_URL "callBackUrl"
#define JSON_CALL_BACK_URL "callBackUrl"
#define JSON_SKIP_PRINT "skipPrint"
#define JSON_SKIP_PRINT "skipPrint"
#define JSON_PUSH_OPTIONS "options"
#define JSON_PUSH_OPTIONS "options"
#define JSON_PUSH_PLUGIN_OPTIONS "pluginOptions"
#define JSON_PRINT_OPT "printOpt"
#define JSON_PRINT_OPT "printOpt"
#define JSON_PRINT_OPT_ALL "all"
#define JSON_PRINT_OPT_ALL "all"
#define JSON_PRINT_OPT_SUM "summary"
#define JSON_PRINT_OPT_SUM "summary"
...
...
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