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
d44b2416
Commit
d44b2416
authored
Jan 10, 2022
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix support 订单入机卡单 超过 5 分钟告警;
Version: 2.2022.1.18
parent
05bdde09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletions
+49
-1
fmTakeout/Control/flowControl.cpp
+47
-1
fmTakeout/Control/flowControl.h
+2
-0
No files found.
fmTakeout/Control/flowControl.cpp
View file @
d44b2416
...
@@ -44,6 +44,7 @@ FlowControl::~FlowControl()
...
@@ -44,6 +44,7 @@ FlowControl::~FlowControl()
m_storageOrderTimer
->
deleteLater
();
m_storageOrderTimer
->
deleteLater
();
m_delayGetRefundDetailTimer
->
deleteLater
();
m_delayGetRefundDetailTimer
->
deleteLater
();
m_remindCasherBlinkFloatTimer
->
deleteLater
();
m_remindCasherBlinkFloatTimer
->
deleteLater
();
m_blockInputPosWarnningTimer
->
deleteLater
();
loaclHttpServer
->
deleteLater
();
loaclHttpServer
->
deleteLater
();
}
}
...
@@ -94,9 +95,11 @@ FlowControl::FlowControl()
...
@@ -94,9 +95,11 @@ FlowControl::FlowControl()
m_storageOrderTimer
=
new
QTimer
(
this
);
m_storageOrderTimer
=
new
QTimer
(
this
);
m_delayGetRefundDetailTimer
=
new
QTimer
(
this
);
m_delayGetRefundDetailTimer
=
new
QTimer
(
this
);
m_remindCasherBlinkFloatTimer
=
new
QTimer
(
this
);
m_remindCasherBlinkFloatTimer
=
new
QTimer
(
this
);
m_blockInputPosWarnningTimer
=
new
QTimer
(
this
);
connect
(
m_loginTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_ClickToLogin
);
connect
(
m_loginTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_ClickToLogin
);
connect
(
m_notifySimPullTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_ClickToNotifySimPullOrder
);
connect
(
m_notifySimPullTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_ClickToNotifySimPullOrder
);
connect
(
m_blockInputPosWarnningTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_BlockInputPosWarnning
);
connect
(
m_storageOrderTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_StoragePosOrderData
);
connect
(
m_storageOrderTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_StoragePosOrderData
);
connect
(
m_delayGetRefundDetailTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_ScanDelayGetRefundDetailList
);
connect
(
m_delayGetRefundDetailTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_ScanDelayGetRefundDetailList
);
connect
(
m_remindCasherBlinkFloatTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_RemindCasherBlinkFloatForm
);
connect
(
m_remindCasherBlinkFloatTimer
,
&
QTimer
::
timeout
,
this
,
&
FlowControl
::
_RemindCasherBlinkFloatForm
);
...
@@ -324,13 +327,42 @@ void FlowControl::_ClickToNotifySimPullOrder()
...
@@ -324,13 +327,42 @@ void FlowControl::_ClickToNotifySimPullOrder()
{
{
m_notifySimPullTimer
->
start
(
1000
*
7
);
m_notifySimPullTimer
->
start
(
1000
*
7
);
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FM外卖插件通知 Simphony 获取订单数据--->>>>]"
);
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FM外卖插件通知 Simphony 获取订单数据--->>>>]"
);
// 录单防Block告警定时器开始计时( 阀值: 默认8分钟);
if
(
!
m_blockInputPosWarnningTimer
->
isActive
()
)
{
m_blockInputPosWarnningTimer
->
start
(
1000
*
60
*
5
);
}
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---触发按钮点击事件: Block Warnning Pending: %1--->>>>>]"
).
arg
(
m_blockInputPosWarnningTimer
->
remainingTime
()
/
1000
);
//定时器触发的点击事件,不可避免;
//定时器触发的点击事件,不可避免;
_SmartTriggerClickPosBtn
(
true
);
_SmartTriggerClickPosBtn
(
true
);
}
else
{
}
else
{
// 无待入机订单, 故无需运行此告警定时器;
if
(
m_blockInputPosWarnningTimer
->
isActive
()
)
{
m_blockInputPosWarnningTimer
->
stop
();
}
m_notifySimPullTimer
->
start
(
1000
*
20
);
m_notifySimPullTimer
->
start
(
1000
*
20
);
}
}
}
}
void
FlowControl
::
_BlockInputPosWarnning
()
{
int
blockInputSize
=
m_simValidOrdersList
.
size
();
QString
orderId
=
m_simValidOrdersList
.
first
();
QLOG_INFO
()
<<
QString
(
"[<<<<---_BlockInputPosWarnning: m_simValidOrdersList size: %1 And FirstOne: %2 --->>>>>]"
).
arg
(
blockInputSize
).
arg
(
orderId
);
QString
orderChannel
=
m_FmOrdersMap
.
value
(
orderId
)
?
m_FmOrdersMap
.
value
(
orderId
)
->
channel
:
""
;
QString
orderRequestType
=
"3"
;
if
(
m_FmOrdersMap
.
value
(
orderId
)
)
{
m_FmOrdersMap
.
value
(
orderId
)
->
orderStatus
!=
6
?
orderRequestType
=
"3"
:
orderRequestType
=
"6"
;
}
QString
errorStorageOrderMsg
=
QString
(
"BlockInputPosWarnning: StoreId: %1 Cashier: %2 BlockOrderId: %3 BlockSize: %4"
)
.
arg
(
m_storeId
).
arg
(
m_cashierName
).
arg
(
orderId
).
arg
(
blockInputSize
);
_AddOrUpdateReportOmsList
(
orderId
,
orderChannel
,
orderRequestType
,
"2"
,
""
,
errorStorageOrderMsg
,
QString
(
"1109"
)
);
}
void
FlowControl
::
_StoragePosOrderData
()
{
void
FlowControl
::
_StoragePosOrderData
()
{
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---_StoragePosOrderData: m_storagePosOrdersList size: %1 And FirstOne: %2 --->>>>>]"
)
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---_StoragePosOrderData: m_storagePosOrdersList size: %1 And FirstOne: %2 --->>>>>]"
)
.
arg
(
m_storagePosOrdersList
.
size
()
).
arg
(
m_storagePosOrdersList
.
isEmpty
()
?
" "
:
m_storagePosOrdersList
.
first
()
);
.
arg
(
m_storagePosOrdersList
.
size
()
).
arg
(
m_storagePosOrdersList
.
isEmpty
()
?
" "
:
m_storagePosOrdersList
.
first
()
);
...
@@ -2309,6 +2341,10 @@ bool FlowControl::_ResponseSimphony04Request(const QJsonObject &content, QJsonOb
...
@@ -2309,6 +2341,10 @@ bool FlowControl::_ResponseSimphony04Request(const QJsonObject &content, QJsonOb
if
(
m_bFloatFromLockSt
){
if
(
m_bFloatFromLockSt
){
m_bFloatFromLockSt
=
false
;
//更新悬浮框的锁定状态 =false;
m_bFloatFromLockSt
=
false
;
//更新悬浮框的锁定状态 =false;
}
}
// 存在Action4说明POS有反应, 故停止 Block告警定时器;
if
(
m_blockInputPosWarnningTimer
->
isActive
()
)
{
m_blockInputPosWarnningTimer
->
stop
();
}
//为了避免压测插件时,高频的加锁悬浮框 与 高频点击POS机;所以将 及时点击POS机右下角按钮放到上次录单成功后再触发下一次录单事件;
//为了避免压测插件时,高频的加锁悬浮框 与 高频点击POS机;所以将 及时点击POS机右下角按钮放到上次录单成功后再触发下一次录单事件;
_ClickOMSAssignArea
();
_ClickOMSAssignArea
();
return
result
;
return
result
;
...
@@ -2406,11 +2442,16 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
...
@@ -2406,11 +2442,16 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
result
=
false
;
result
=
false
;
error
=
QString
::
fromLocal8Bit
(
"Request Action05: Pragram Error"
);
error
=
QString
::
fromLocal8Bit
(
"Request Action05: Pragram Error"
);
}
}
// 存在Action5说明POS有反应, 故停止 Block告警定时器;
if
(
m_blockInputPosWarnningTimer
->
isActive
()
)
{
m_blockInputPosWarnningTimer
->
stop
();
}
return
result
;
return
result
;
}
}
bool
FlowControl
::
_ResponseSimphony06Request
(
const
QJsonObject
&
content
,
QJsonObject
&
data
,
QString
&
error
)
bool
FlowControl
::
_ResponseSimphony06Request
(
const
QJsonObject
&
content
,
QJsonObject
&
data
,
QString
&
error
)
{
{
QLOG_INFO
()
<<
__FUNCTION__
;
QLOG_INFO
()
<<
__FUNCTION__
;
...
@@ -2462,6 +2503,11 @@ bool FlowControl::_ResponseSimphony06Request(const QJsonObject &content, QJsonOb
...
@@ -2462,6 +2503,11 @@ bool FlowControl::_ResponseSimphony06Request(const QJsonObject &content, QJsonOb
}
}
//*********** 新增一种优化case: 门店店员正在操作POS,从而阻塞插件程序录外卖订单,此时必须解锁悬浮框,从而减少Simphony队列中first出现OMS退单的请求; end ***********//
//*********** 新增一种优化case: 门店店员正在操作POS,从而阻塞插件程序录外卖订单,此时必须解锁悬浮框,从而减少Simphony队列中first出现OMS退单的请求; end ***********//
// 存在Action6说明POS有反应 && 且 不是POS存在CheckNum的情况, 故停止 Block告警定时器;
if
(
m_blockInputPosWarnningTimer
->
isActive
()
)
{
m_blockInputPosWarnningTimer
->
stop
();
}
//**************** 根据订单编号找到 非码订单Map容器中订单的详细信息; begin ****************//
//**************** 根据订单编号找到 非码订单Map容器中订单的详细信息; begin ****************//
OrderObject
*
order_p
=
m_FmOrdersMap
.
value
(
orderId
);
OrderObject
*
order_p
=
m_FmOrdersMap
.
value
(
orderId
);
if
(
!
order_p
)
{
if
(
!
order_p
)
{
...
...
fmTakeout/Control/flowControl.h
View file @
d44b2416
...
@@ -143,6 +143,7 @@ private:
...
@@ -143,6 +143,7 @@ private:
QTimer
*
m_storageOrderTimer
;
QTimer
*
m_storageOrderTimer
;
QTimer
*
m_delayGetRefundDetailTimer
;
QTimer
*
m_delayGetRefundDetailTimer
;
QTimer
*
m_remindCasherBlinkFloatTimer
;
//插件程序收到外卖订单后,需要一致提醒店员[直到此外卖订单被全部录入到POS系统]
QTimer
*
m_remindCasherBlinkFloatTimer
;
//插件程序收到外卖订单后,需要一致提醒店员[直到此外卖订单被全部录入到POS系统]
QTimer
*
m_blockInputPosWarnningTimer
;
//当有订单待入机时, 开始定时器计时, 当有录单有效动作时(不含CheckNum Open) 或 无待入机订单时 停止定时器.
// 网络通信
// 网络通信
BillSocket
*
m_loginSocket
;
BillSocket
*
m_loginSocket
;
BillSocket
*
m_pullOrderSocket
;
BillSocket
*
m_pullOrderSocket
;
...
@@ -411,6 +412,7 @@ private slots:
...
@@ -411,6 +412,7 @@ private slots:
void
_ClickOMSAssignArea
();
void
_ClickOMSAssignArea
();
void
_ClickToLogin
();
void
_ClickToLogin
();
void
_ClickToNotifySimPullOrder
();
void
_ClickToNotifySimPullOrder
();
void
_BlockInputPosWarnning
();
// 功能:将队列 m_storagePosOrdersList 中的订单数据 持久化存储到POS本地数据库;
// 功能:将队列 m_storagePosOrdersList 中的订单数据 持久化存储到POS本地数据库;
void
_StoragePosOrderData
();
void
_StoragePosOrderData
();
...
...
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