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
fb254ed8
Commit
fb254ed8
authored
Dec 13, 2021
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 美好咖啡 订单入机后 多录入 Tender, 导致POS弹出报错;
Version: 2.2021.12.20
parent
97c2a3db
Pipeline
#38611
failed with stage
in 0 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
13 deletions
+25
-13
fmTakeout/Control/flowControl.cpp
+4
-2
fmTakeout/DTools/printCupStickPosDB.cpp
+6
-5
fmTakeout/Model/dishesObject.h
+5
-0
fmTakeout/Model/orderObject.cpp
+5
-1
fmTakeout/fmTakeout.rc
+4
-4
fmTakeout/preDefine.h
+1
-1
No files found.
fmTakeout/Control/flowControl.cpp
View file @
fb254ed8
...
...
@@ -3108,8 +3108,9 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
//**********************************整合WSG券信息-begin*****************************************//
// 循环订单的WSG券 列表 [进入循环条件: 存在券列表;];
// 美好咖啡不能在录入额外券 Tender 【单品券 + 配送费券】否则会有额外报错;
/**********************************************************************************/
for
(
int
i
=
0
;
i
<
orderObject
->
coupList
.
count
()
&&
"WSG-MOD"
==
orderObject
->
channel
;
i
++
)
{
for
(
int
i
=
0
;
i
<
orderObject
->
coupList
.
count
()
&&
"WSG-MOD"
==
orderObject
->
channel
;
i
++
)
{
CouponsObject
*
coupon
=
orderObject
->
coupList
.
at
(
i
);
QJsonObject
tCoupObj
;
/**********************************************************/
...
...
@@ -3127,7 +3128,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
}
//先跳过门店售券,现金支付:最后在补录一个现金支付方式;
if
(
!
coupon
->
storeChannel
){
//针对美好咖啡订单 也必须跳过券tender信息;
if
(
!
coupon
->
storeChannel
&&
1
!=
orderObject
->
isGiftitForward
)
{
tCoupObj
.
insert
(
"couponSeq"
,
QString
::
number
(
i
+
1
)
)
;
//券的序号
tCoupObj
.
insert
(
"couponCode"
,
coupon
->
code
);
//准确的券号码;例: 7019380051100056143 目前最长 19位长度;
tCoupObj
.
insert
(
"couponType"
,
coupon
->
couponType
);
...
...
fmTakeout/DTools/printCupStickPosDB.cpp
View file @
fb254ed8
...
...
@@ -483,9 +483,9 @@ bool PrintCupStickPosDB::insertNormalProd(OrderObject* orderObj, const QString&
for
(
int
i
=
0
;
i
<
orderObj
->
proList
.
count
();
i
++
)
{
dishesObject
*
dish
=
orderObj
->
proList
.
at
(
i
);
query
.
prepare
(
"INSERT INTO tb_main_prod_refinfo(chk_num, order_id, order_status, create_datetime, "
" prod_seq, prod_code, prod_name, prod_resv0, prod_resv5, prod_price, prod_qty, prod_optionsCode, prod_discount, prod_discountName,"
" prod_seq, prod_code, prod_name, prod_resv0, prod_resv
4, prod_resv
5, prod_price, prod_qty, prod_optionsCode, prod_discount, prod_discountName,"
" prod_starDiscount, prod_starDiscountName, prod_owner ) "
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) select @@identity "
);
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
, ?
) select @@identity "
);
query
.
addBindValue
(
posCheckNo
.
toInt
());
// --小票号
query
.
addBindValue
(
orderObj
->
id
);
// --订单编号
// query.addBindValue( orderObj->orderStatus ); // --订单状态(int);
...
...
@@ -495,6 +495,7 @@ bool PrintCupStickPosDB::insertNormalProd(OrderObject* orderObj, const QString&
query
.
addBindValue
(
dish
->
code
);
// --主商品SKU
query
.
addBindValue
(
dish
->
name
);
// --主商品名称
query
.
addBindValue
(
dish
->
changePriceFlag
);
// --主商品改价标志
query
.
addBindValue
(
dish
->
supplyChainSku
);
// --主商品 SKU 编码
query
.
addBindValue
(
dish
->
enProductName
);
// --主商品英文名称
if
(
OrderObject
::
Refunded
==
orderObj
->
orderStatus
)
{
query
.
addBindValue
(
0
-
dish
->
price
);
// --退货单主商品价格需为负数;
...
...
@@ -514,11 +515,11 @@ bool PrintCupStickPosDB::insertNormalProd(OrderObject* orderObj, const QString&
if
(
!
query
.
exec
())
{
QLOG_ERROR
()
<<
"[<<<<---SqlServer Database: Insert tb_main_prod_refinfo Error--->>>>]"
<<
query
.
lastError
().
text
()
<<
QString
::
number
(
query
.
lastError
().
type
());
QLOG_ERROR
()
<<
QString
(
"INSERT INTO tb_main_prod_refinfo(chk_num, order_id, order_status, create_datetime, "
" prod_seq, prod_code, prod_name, prod_resv0, prod_resv5, prod_price, prod_qty, prod_optionsCode, prod_discount, prod_discountName,"
" prod_seq, prod_code, prod_name, prod_resv0, prod_resv
4, prod_resv
5, prod_price, prod_qty, prod_optionsCode, prod_discount, prod_discountName,"
" prod_starDiscount, prod_starDiscountName, prod_owner) "
"VALUES(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16, %17) select @@identity "
).
arg
(
posCheckNo
.
toInt
())
"VALUES(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16, %17
, %18
) select @@identity "
).
arg
(
posCheckNo
.
toInt
())
.
arg
(
orderObj
->
id
).
arg
(
orderObj
->
orderStatus
).
arg
(
qdaTi
.
addSecs
(
60
*
60
*
8
).
toString
(
"yyyy-MM-dd hh:mm:ss"
))
.
arg
(
i
+
1
).
arg
(
dish
->
code
).
arg
(
dish
->
name
).
arg
(
dish
->
changePriceFlag
).
arg
(
dish
->
enProductName
).
arg
(
dish
->
price
).
arg
(
dish
->
qty
).
arg
(
dish
->
options
)
.
arg
(
i
+
1
).
arg
(
dish
->
code
).
arg
(
dish
->
name
).
arg
(
dish
->
changePriceFlag
).
arg
(
dish
->
supplyChainSku
).
arg
(
dish
->
enProductName
).
arg
(
dish
->
price
).
arg
(
dish
->
qty
).
arg
(
dish
->
options
)
.
arg
(
dish
->
promotionPrice
*
dish
->
promotionQty
).
arg
(
dish
->
promotionName
).
arg
(
dish
->
starPromotionPrice
*
dish
->
starPromotionQty
)
.
arg
(
dish
->
starPromotionName
).
arg
(
dish
->
userName
+
(
dish
->
wechatName
.
length
()
?
"|#|"
+
dish
->
wechatName
:
""
)
);
...
...
fmTakeout/Model/dishesObject.h
View file @
fb254ed8
...
...
@@ -14,6 +14,7 @@ class dishesObject : public QObject
Q_PROPERTY
(
QString
specId
READ
getspecId
WRITE
setspecId
)
Q_PROPERTY
(
QString
name
READ
getname
WRITE
setname
)
Q_PROPERTY
(
QString
enProductName
READ
getEnProductName
WRITE
setEnProductName
)
Q_PROPERTY
(
QString
supplyChainSku
READ
getSupplyChainSku
WRITE
setSupplyChainSku
)
Q_PROPERTY
(
QString
specName
READ
getspecName
WRITE
setspecName
)
Q_PROPERTY
(
QString
enSpecificationName
READ
getEnSpecificationName
WRITE
setEnSpecificationName
)
Q_PROPERTY
(
QString
defaultImage
READ
getDefaultImage
WRITE
setDefaultImage
)
...
...
@@ -48,6 +49,7 @@ public:
QString
id
;
QString
name
;
QString
enProductName
;
QString
supplyChainSku
;
// EC-MOP 渠道订单商品的SKU
QString
specId
;
QString
specName
;
QString
enSpecificationName
;
...
...
@@ -93,6 +95,9 @@ protected:
inline
QString
getEnProductName
(){
return
enProductName
;
}
inline
void
setEnProductName
(
const
QString
&
v
){
enProductName
=
v
;
}
inline
QString
getSupplyChainSku
(){
return
supplyChainSku
;
}
inline
void
setSupplyChainSku
(
const
QString
&
v
){
supplyChainSku
=
v
;
}
inline
int
getprice
(){
return
price
;
}
inline
void
setprice
(
const
int
&
v
){
price
=
v
;
}
...
...
fmTakeout/Model/orderObject.cpp
View file @
fb254ed8
...
...
@@ -272,7 +272,11 @@ QString OrderObject::getChannelName()
}
}
else
if
(
"WSG-MOD"
==
channel
)
{
// 兼容渠道名称不统一问题
return
QString
::
fromLocal8Bit
(
"微信用星说"
);
if
(
1
==
isGiftitForward
)
{
return
QString
::
fromLocal8Bit
(
"美好咖啡"
);
}
else
{
return
QString
::
fromLocal8Bit
(
"微信用星说"
);
}
}
else
if
(
"ELE"
==
channel
)
{
if
(
7
==
orderType
)
{
...
...
fmTakeout/fmTakeout.rc
View file @
fb254ed8
...
...
@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
#endif
VS_VERSION_INFO VERSIONINFO
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
FILEVERSION 2,2021,12,
1
0
PRODUCTVERSION 2,2021,12,
1
0
FILEVERSION 2,2021,12,
2
0
PRODUCTVERSION 2,2021,12,
2
0
//*************************************************************************//
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
...
...
@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "Delivery Order Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "2.2021.12.
1
0"
VALUE "FileVersion", "2.2021.12.
1
0"
VALUE "ProductVersion", "2.2021.12.
2
0"
VALUE "FileVersion", "2.2021.12.
2
0"
//*************************************************************************//
END
END
...
...
fmTakeout/preDefine.h
View file @
fb254ed8
...
...
@@ -40,7 +40,7 @@
//#define APP_VERSION "2.2021.8.12"
//#define APP_VERSION "2.2021.9.7"
//#define APP_VERSION "2.2021.9.24"
#define APP_VERSION "2.2021.12.
1
0"
#define APP_VERSION "2.2021.12.
2
0"
//修正版本号时,切记修正 FmTakeout.rc 中的版本号
...
...
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