Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmTakeaway
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
shangshang.dai
FmTakeaway
Commits
803c91e8
Commit
803c91e8
authored
Apr 23, 2018
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add: 1新增退款小票打印且避免重复打印
parent
b8e4a336
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletions
+19
-1
fmTakeaway/Control/flowControl.cpp
+2
-1
fmTakeaway/DTools/orderstatus.cpp
+15
-0
fmTakeaway/DTools/orderstatus.h
+2
-0
No files found.
fmTakeaway/Control/flowControl.cpp
View file @
803c91e8
...
@@ -250,11 +250,12 @@ bool FlowControl::_PullOrder()
...
@@ -250,11 +250,12 @@ bool FlowControl::_PullOrder()
}
}
}
}
if
(
orderObject
->
status
==
20
||
orderObject
->
status
==
21
)
if
(
(
orderObject
->
status
==
20
||
orderObject
->
status
==
21
)
&&
Orderstatus
::
getInstance
().
isprinted_20
(
orderId
)
)
{
{
if
(
FmPrinter
::
GetInstance
().
DoPrint
(
ConfigManger
::
GetInstance
().
GetPrinterName
(),
orderObject
))
if
(
FmPrinter
::
GetInstance
().
DoPrint
(
ConfigManger
::
GetInstance
().
GetPrinterName
(),
orderObject
))
{
{
QLOG_INFO
()
<<
QString
(
"print sucessful"
);
QLOG_INFO
()
<<
QString
(
"print sucessful"
);
Orderstatus
::
getInstance
().
printupdate
(
orderId
,
2
);
}
else
}
else
{
{
emit
showAlert
(
AlertForm
::
ERROR
,
QString
(
"打印冲突,请稍后手动打印或重启收银程序"
));
emit
showAlert
(
AlertForm
::
ERROR
,
QString
(
"打印冲突,请稍后手动打印或重启收银程序"
));
...
...
fmTakeaway/DTools/orderstatus.cpp
View file @
803c91e8
...
@@ -83,6 +83,21 @@ bool Orderstatus::isprint(const QString &orderId)
...
@@ -83,6 +83,21 @@ bool Orderstatus::isprint(const QString &orderId)
}
}
}
}
bool
Orderstatus
::
isprinted_20
(
const
QString
&
orderId
)
{
QSqlQuery
query
;
query
.
prepare
(
QString
(
"select isprint from status where orderId=%1"
).
arg
(
orderId
));
if
(
!
query
.
exec
())
{
QLOG_ERROR
()
<<
query
.
lastError
().
text
();
}
while
(
query
.
next
())
{
return
query
.
value
(
0
).
toInt
()
==
2
;
}
return
false
;
}
bool
Orderstatus
::
isorderexit
(
const
QString
&
orderId
)
bool
Orderstatus
::
isorderexit
(
const
QString
&
orderId
)
{
{
QSqlQuery
query
;
QSqlQuery
query
;
...
...
fmTakeaway/DTools/orderstatus.h
View file @
803c91e8
...
@@ -16,6 +16,8 @@ public:
...
@@ -16,6 +16,8 @@ public:
bool
printupdate
(
const
QString
&
orderId
,
const
int
&
printstatus
);
bool
printupdate
(
const
QString
&
orderId
,
const
int
&
printstatus
);
//bool statusdelete(const QString&);
//bool statusdelete(const QString&);
bool
isprint
(
const
QString
&
orderId
);
bool
isprint
(
const
QString
&
orderId
);
// 检测退款是否打印过
bool
isprinted_20
(
const
QString
&
orderId
);
bool
isorderexit
(
const
QString
&
orderId
);
bool
isorderexit
(
const
QString
&
orderId
);
private
:
private
:
...
...
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