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
3a07af36
Commit
3a07af36
authored
Oct 08, 2016
by
ss.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
无修改
parent
cf78f901
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
fmPlugin/fmPlugin.cpp
+7
-7
No files found.
fmPlugin/fmPlugin.cpp
View file @
3a07af36
...
@@ -119,12 +119,12 @@ bool FmPlugin::DoOrderEntry(const OrderObject *orderObject, const QString &cashi
...
@@ -119,12 +119,12 @@ bool FmPlugin::DoOrderEntry(const OrderObject *orderObject, const QString &cashi
int
custid
=
-
1
;
int
custid
=
-
1
;
_InsertInto_p_t_fmwm_custinfo
(
custid
);
_InsertInto_p_t_fmwm_custinfo
(
custid
);
// 开启事务
// 开启事务
if
(
!
m_db
.
transaction
())
//
if(!m_db.transaction())
{
//
{
error
=
m_db
.
lastError
().
text
();
//
error = m_db.lastError().text();
m_db
.
close
();
//
m_db.close();
return
false
;
//
return false;
}
//
}
// 插入三张临时表后执行存储过程有一个失败则回滚
// 插入三张临时表后执行存储过程有一个失败则回滚
if
(
_InsertInto_d_t_food_fmbill0
(
cashierId
,
cashierName
,
shiftId
,
shiftName
,
custid
))
if
(
_InsertInto_d_t_food_fmbill0
(
cashierId
,
cashierName
,
shiftId
,
shiftName
,
custid
))
{
{
...
@@ -145,7 +145,7 @@ bool FmPlugin::DoOrderEntry(const OrderObject *orderObject, const QString &cashi
...
@@ -145,7 +145,7 @@ bool FmPlugin::DoOrderEntry(const OrderObject *orderObject, const QString &cashi
}
}
// 回滚
// 回滚
error
=
m_lastError
;
error
=
m_lastError
;
m_db
.
rollback
();
//
m_db.rollback();
m_db
.
close
();
m_db
.
close
();
return
false
;
return
false
;
}
}
...
...
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