Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bft_takeout
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
guanghui.cui
bft_takeout
Commits
2fe411ec
Commit
2fe411ec
authored
Nov 03, 2017
by
guanghui.cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新pos打印计数
parent
f64982da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
fmTakeaway/Util/wbillcontrol.cpp
+18
-0
fmTakeaway/Util/wbillcontrol.h
+3
-0
No files found.
fmTakeaway/Util/wbillcontrol.cpp
View file @
2fe411ec
...
@@ -388,7 +388,21 @@ void WBillControl::PrintLable(const OrderObject *obj,const QString posOrderId)
...
@@ -388,7 +388,21 @@ void WBillControl::PrintLable(const OrderObject *obj,const QString posOrderId)
printCook
(
obj
,
pid
,
num
,
posOrderId
);
printCook
(
obj
,
pid
,
num
,
posOrderId
);
}
}
}
}
updatePosPrintCount
(
posOrderId
);
}
void
WBillControl
::
updatePosPrintCount
(
const
QString
&
posOrderId
)
{
QJsonObject
rObj
;
rObj
.
insert
(
"fm_cmd"
,
"update_count"
);
rObj
.
insert
(
"order_id"
,
posOrderId
);
qDebug
()
<<
"更新Pos打印计数"
<<
rObj
;
QJsonDocument
doc
(
rObj
);
QByteArray
strArray
=
doc
.
toJson
(
QJsonDocument
::
Compact
);
QLOG_INFO
()
<<
"------ json string:"
<<
strArray
;
sendToPrintServer
(
strArray
);
}
}
//厨房单打印
//厨房单打印
...
@@ -398,6 +412,8 @@ void WBillControl::printCook(const OrderObject *obj,const QString& menuId,int nu
...
@@ -398,6 +412,8 @@ void WBillControl::printCook(const OrderObject *obj,const QString& menuId,int nu
if
(
menu
.
strMenuId
==
menuId
){
if
(
menu
.
strMenuId
==
menuId
){
//print
//print
QJsonObject
rObj
;
QJsonObject
rObj
;
rObj
.
insert
(
"fm_cmd"
,
"print_lable"
);
rObj
.
insert
(
"order_id"
,
posOrderId
);
//不是打印跳转
//不是打印跳转
if
(
!
bJump
){
if
(
!
bJump
){
...
@@ -487,6 +503,8 @@ void WBillControl::printCook(const OrderObject *obj,const QString& menuId,int nu
...
@@ -487,6 +503,8 @@ void WBillControl::printCook(const OrderObject *obj,const QString& menuId,int nu
QLOG_INFO
()
<<
"打印失败,开始跳转打印"
;
QLOG_INFO
()
<<
"打印失败,开始跳转打印"
;
if
(
!
bJump
){
if
(
!
bJump
){
QJsonObject
rObjNew
;
QJsonObject
rObjNew
;
rObjNew
.
insert
(
"fm_cmd"
,
"print_lable"
);
rObjNew
.
insert
(
"order_id"
,
posOrderId
);
rObjNew
.
insert
(
"device"
,
menu
.
strOrderDevice
.
toStdString
().
data
());
rObjNew
.
insert
(
"device"
,
menu
.
strOrderDevice
.
toStdString
().
data
());
rObjNew
.
insert
(
"baud"
,
menu
.
iOrderBaud
);
rObjNew
.
insert
(
"baud"
,
menu
.
iOrderBaud
);
//rObjNew.insert("device", "/dev/ttyS1");
//rObjNew.insert("device", "/dev/ttyS1");
...
...
fmTakeaway/Util/wbillcontrol.h
View file @
2fe411ec
...
@@ -115,6 +115,9 @@ private:
...
@@ -115,6 +115,9 @@ private:
//收银账单打印
//收银账单打印
void
printBill
(
const
OrderObject
*
obj
,
const
QString
&
posOrderId
);
void
printBill
(
const
OrderObject
*
obj
,
const
QString
&
posOrderId
);
//更新pos打印计数
void
updatePosPrintCount
(
const
QString
&
posOrderId
);
//厨房小票信息发送到monitor
//厨房小票信息发送到monitor
bool
sendToPrintServer
(
QByteArray
&
JsonPrint
);
bool
sendToPrintServer
(
QByteArray
&
JsonPrint
);
...
...
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