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
0fa7e499
Commit
0fa7e499
authored
Jan 07, 2022
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Support wsg 改价功能
Version 2.2022.1.18
parent
fb254ed8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
12 deletions
+38
-12
fmTakeout/Control/flowControl.cpp
+3
-1
fmTakeout/DTools/printCupStickPosDB.cpp
+5
-5
fmTakeout/Model/couponsObject.cpp
+16
-0
fmTakeout/Model/singleProductObject.h
+7
-0
fmTakeout/fmTakeout.rc
+5
-5
fmTakeout/preDefine.h
+2
-1
No files found.
fmTakeout/Control/flowControl.cpp
View file @
0fa7e499
...
...
@@ -3166,10 +3166,12 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
QJsonObject
tCoupProductObj
;
tCoupProductObj
.
insert
(
"couponSeq"
,
QString
::
number
(
i
+
1
)
);
tCoupProductObj
.
insert
(
"consume_num"
,
coupon
->
skus
[
tempSkuSeq
]
->
qty
);
tCoupProductObj
.
insert
(
"pid"
,
coupon
->
skus
[
tempSkuSeq
]
->
code
);
// tCoupProductObj.insert("pid", coupon->skus[tempSkuSeq]->code); // 支持 WSG券改价模式入机;
tCoupProductObj
.
insert
(
"pid"
,
coupon
->
skus
[
tempSkuSeq
]
->
chgPrcFlgCode
);
//需要考虑 门店券 蛋糕的Combo头开始会限定后续蛋糕子项的价格后面的价格是否会都是0;
if
(
coupon
->
skus
[
tempSkuSeq
]
->
isCoupon
)
{
tCoupProductObj
.
insert
(
"original_price"
,
coupon
->
skus
[
tempSkuSeq
]
->
price
);
}
else
{
tCoupProductObj
.
insert
(
"original_price"
,
0
);
}
...
...
fmTakeout/DTools/printCupStickPosDB.cpp
View file @
0fa7e499
...
...
@@ -210,7 +210,7 @@ bool PrintCupStickPosDB::insertCouponProd(OrderObject* orderObj, const QString&
query
.
addBindValue
(
i
+
1
);
// --主商品序号;
query
.
addBindValue
(
coupon
->
skus
[
0
]
->
code
);
// --主商品 SKU
query
.
addBindValue
(
coupon
->
skus
[
0
]
->
name
);
// --主商品名称
query
.
addBindValue
(
0
);
// --主商品 改价标志
query
.
addBindValue
(
coupon
->
skus
[
0
]
->
changePriceFlag
);
// --主商品 改价标志
query
.
addBindValue
(
coupon
->
skus
[
0
]
->
nickname
);
// --主商品昵称
query
.
addBindValue
(
coupon
->
skus
[
0
]
->
enProductName
);
// --主商品英文名
if
(
OrderObject
::
Refunded
==
orderObj
->
orderStatus
)
{
...
...
@@ -246,10 +246,10 @@ bool PrintCupStickPosDB::insertCouponProd(OrderObject* orderObj, const QString&
" coupon_showGiver, coupon_giver, coupon_wishes) "
"VALUES(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16, %17, %18, %19, %20, "
" %21, %22, %23, %24, %25, %26, %27) 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
(
coupon
->
skus
[
0
]
->
code
).
arg
(
coupon
->
skus
[
0
]
->
name
).
arg
(
0
).
arg
(
coupon
->
skus
[
0
]
->
nickname
).
arg
(
coupon
->
skus
[
0
]
->
enProductN
ame
)
.
arg
(
coupon
->
skus
[
0
]
->
qty
).
arg
(
coupon
->
skus
[
0
]
->
price
)
.
arg
(
i
+
1
).
arg
(
coupon
->
code
).
arg
(
coupon
->
couponName
).
arg
(
1
).
arg
(
coupon
->
consumeFactAmount
).
arg
(
coupon
->
consumeDiscountAmount
)
.
arg
(
orderObj
->
id
).
arg
(
orderObj
->
orderStatus
).
arg
(
qdaTi
.
addSecs
(
60
*
60
*
8
).
toString
(
"yyyy-MM-dd hh:mm:ss"
))
.
arg
(
i
+
1
).
arg
(
coupon
->
skus
[
0
]
->
code
).
arg
(
coupon
->
skus
[
0
]
->
name
).
arg
(
coupon
->
skus
[
0
]
->
changePriceFlag
).
arg
(
coupon
->
skus
[
0
]
->
nickn
ame
)
.
arg
(
coupon
->
skus
[
0
]
->
enProductName
).
arg
(
coupon
->
skus
[
0
]
->
qty
).
arg
(
coupon
->
skus
[
0
]
->
price
)
.
arg
(
i
+
1
).
arg
(
coupon
->
code
).
arg
(
coupon
->
couponName
).
arg
(
1
).
arg
(
coupon
->
consumeFactAmount
).
arg
(
coupon
->
consumeDiscountAmount
)
.
arg
(
coupon
->
discount
).
arg
(
coupon
->
discountName
).
arg
(
coupon
->
storeChannel
).
arg
(
coupon
->
skus
[
0
]
->
isCoupon
)
.
arg
(
coupon
->
payMethodId
).
arg
(
coupon
->
payMethodName
).
arg
(
coupon
->
isShowGiver
).
arg
(
coupon
->
giverName
).
arg
(
coupon
->
blessingWords
);
...
...
fmTakeout/Model/couponsObject.cpp
View file @
0fa7e499
...
...
@@ -75,6 +75,14 @@ void CouponsObject::FetchDataFromJson(const QJsonObject &json)
qDeleteAll
(
itemsDiscount
);
itemsDiscount
.
clear
();
// 组装改价标识Code;使用 QTextStream 流操作;
// 目前Pos-Key最长9位,Simphony-sku程序容量长度28(右对齐,左补空格),第14位存储 改价标识(从右至左第15位);
QString
tempChgPrcFlgCode
;
QTextStream
ss
(
&
tempChgPrcFlgCode
);
ss
.
setFieldWidth
(
14
);
ss
.
setFieldAlignment
(
QTextStream
::
AlignRight
);
ss
.
setPadChar
(
' '
);
QJsonArray
singleProductsArray
=
json
[
JSON_COUPONPRODUCTS
].
toArray
();
foreach
(
QJsonValue
singleProduct
,
singleProductsArray
)
{
...
...
@@ -84,7 +92,15 @@ void CouponsObject::FetchDataFromJson(const QJsonObject &json)
item
->
code
=
""
;
item
->
qty
=
0
;
item
->
price
=
0
;
item
->
changePriceFlag
=
0
;
item
->
chgPrcFlgCode
=
QString
(
""
);
item
->
FetchDataFromJson
(
singleProduct
.
toObject
());
// 券数据赋值后, 组装改价标识Code;便于传递给POS;
ss
<<
item
->
code
;
item
->
chgPrcFlgCode
.
append
(
QString
::
number
(
item
->
changePriceFlag
)
);
item
->
chgPrcFlgCode
.
append
(
tempChgPrcFlgCode
);
// 清空缓存数据,防止重叠脏数据;
tempChgPrcFlgCode
=
QString
(
""
);
this
->
skus
.
append
(
item
);
}
...
...
fmTakeout/Model/singleProductObject.h
View file @
0fa7e499
...
...
@@ -16,6 +16,7 @@ class SingleProductObject : public QObject
Q_PROPERTY
(
bool
isCoupon
READ
getIsCoupon
WRITE
setIsCoupon
)
Q_PROPERTY
(
QString
nickname
READ
getNickname
WRITE
setNickname
)
Q_PROPERTY
(
QString
enProductName
READ
getEnProductName
WRITE
setEnProductName
)
Q_PROPERTY
(
int
changePriceFlag
READ
getChangePriceFlag
WRITE
setChangePriceFlag
)
public
:
explicit
SingleProductObject
(
QObject
*
parent
=
0
)
:
QObject
(
parent
){}
...
...
@@ -29,6 +30,9 @@ public:
bool
isCoupon
;
//此单品是否是券;
QString
nickname
;
//券商品昵称
QString
enProductName
;
//券商品英文名
int
changePriceFlag
;
// 改价标识
QString
chgPrcFlgCode
;
// 组合改价标识的sku;
protected
:
inline
QString
getCode
(){
return
code
;
}
...
...
@@ -52,6 +56,9 @@ protected:
inline
QString
getEnProductName
(){
return
enProductName
;
}
inline
void
setEnProductName
(
const
QString
&
v
){
enProductName
=
v
;
}
inline
int
getChangePriceFlag
(){
return
changePriceFlag
;
}
inline
void
setChangePriceFlag
(
const
int
&
v
){
changePriceFlag
=
v
;
}
};
#endif // SINGLEPRODUCTOBJECT_H
fmTakeout/fmTakeout.rc
View file @
0fa7e499
...
...
@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
#endif
VS_VERSION_INFO VERSIONINFO
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
FILEVERSION 2,202
1,12,20
PRODUCTVERSION 2,202
1,12,20
FILEVERSION 2,202
2,1,18
PRODUCTVERSION 2,202
2,1,18
//*************************************************************************//
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
...
...
@@ -27,12 +27,12 @@ VS_VERSION_INFO VERSIONINFO
VALUE "CompanyName", "ShangHai.Freemud Co., Ltd."
VALUE "FileDescription", "Delivery Order Plugin Application"
VALUE "InternalName", "fmTakeout.exe"
VALUE "LegalCopyright", "Copyright (C)2014-202
1
"
VALUE "LegalCopyright", "Copyright (C)2014-202
2
"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "Delivery Order Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "2.202
1.12.20
"
VALUE "FileVersion", "2.202
1.12.20
"
VALUE "ProductVersion", "2.202
2.1.18
"
VALUE "FileVersion", "2.202
2.1.18
"
//*************************************************************************//
END
END
...
...
fmTakeout/preDefine.h
View file @
0fa7e499
...
...
@@ -40,7 +40,8 @@
//#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.20"
//#define APP_VERSION "2.2021.12.20"
#define APP_VERSION "2.2022.1.18"
//修正版本号时,切记修正 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