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
07733e07
Commit
07733e07
authored
Jul 17, 2020
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new feature: 1、存储全链路 订单类型 服务类型, 2、存储券商品对象中的 商品昵称
parent
a428c627
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
17 deletions
+36
-17
fmTakeout/Control/flowControl.cpp
+2
-0
fmTakeout/DTools/pmsOrdersData.cpp
+14
-10
fmTakeout/Model/couponsObject.h
+0
-2
fmTakeout/Model/orderObject.h
+10
-0
fmTakeout/Model/singleProductObject.h
+4
-0
fmTakeout/fmTakeout.rc
+4
-4
fmTakeout/preDefine.h
+2
-1
No files found.
fmTakeout/Control/flowControl.cpp
View file @
07733e07
...
...
@@ -426,6 +426,8 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject)
orderObject
->
negativePosStatus
=
0
;
orderObject
->
businessType
=
"0"
;
orderObject
->
inAdvanceTakemeal
=
0
;
orderObject
->
globalServiceType
=
0
;
orderObject
->
globalOrderType
=
0
;
orderObject
->
FromJson
(
jsonObject
);
orderObject
->
pushOrderType
=
0
;
...
...
fmTakeout/DTools/pmsOrdersData.cpp
View file @
07733e07
...
...
@@ -203,13 +203,13 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef)
"address_detail, consignee_name ,first_name,last_name,consignee_phone, delivery_price,delivery_discount,delivery_time, order_estimation,make_finish_time,"
"is_package, last_pay_time, address_latitude, address_longitude, oms_msrno, consumer_birthday, cancel_reason, confirm_time,customer_id,customer_gender,"
"way_bill_id,store_id,store_name,store_address,store_street, pos_id, lang, ext_info, rider_phone, rider_name, "
"displateform_fee, make_status, make_source, make_device_id,reserve_type, appointed_time,appointed_remind_template,sub_store_id) "
"displateform_fee, make_status, make_source, make_device_id,reserve_type, appointed_time,appointed_remind_template,sub_store_id
,global_order_type,global_service_type
) "
"VALUES(?, ?, ?, ?, ?,?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?,"
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?)"
);
"?, ?, ?, ?, ?, ?, ?, ?
, ?, ?
)"
);
query
.
addBindValue
(
orderObj
->
id
);
// --非码OMS订单号
query
.
addBindValue
(
orderObj
->
id
);
// --非码OMS订单号
...
...
@@ -292,6 +292,8 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef)
query
.
addBindValue
(
orderObj
->
expectDate
);
// --订单预约时间
query
.
addBindValue
(
QString
::
number
(
orderObj
->
inAdvanceTakemeal
)
+
";"
+
orderObj
->
reserveMakeTime
);
// --订单预约提醒模板
query
.
addBindValue
(
orderObj
->
subStoreId
);
// --母子门店的子门店编号;
query
.
addBindValue
(
orderObj
->
globalOrderType
);
// --全链路订单类型
query
.
addBindValue
(
orderObj
->
globalServiceType
);
// --全链路服务类型
if
(
!
query
.
exec
())
{
QLOG_ERROR
()
<<
"[<<<<---PmsOrdersData::insertOrderData:Insert Order Error--->>>>]"
<<
query
.
lastError
().
text
()
...
...
@@ -305,10 +307,10 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef)
"last_pay_time, address_latitude, address_longitude, oms_msrno, consumer_birthday, cancel_reason, "
"confirm_time,customer_id,customer_gender,way_bill_id,store_id,store_name,store_address,store_street, "
"pos_id, lang, ext_info, rider_phone, rider_name, displateform_fee, make_status, make_source, make_device_id,"
" reserve_type, appointed_time,appointed_remind_template,sub_store_id) "
" reserve_type, appointed_time,appointed_remind_template,sub_store_id
,global_order_type,global_service_type
) "
"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, %28, %29, %30, %31, %32, %33, %34, %35, %36, %37, %38, %39, %40,"
"%41, %42, %43, %44, %45, %46, %47, %48, %49, %50, %51, %52, %53, %54,%55,%56,%57,%58)"
)
"%41, %42, %43, %44, %45, %46, %47, %48, %49, %50, %51, %52, %53, %54,%55,%56,%57,%58
,%59,%60
)"
)
.
arg
(
orderObj
->
id
).
arg
(
orderObj
->
id
).
arg
(
orderObj
->
orderStatus
).
arg
(
updateTimeString
).
arg
(
orderObj
->
channel
)
.
arg
(
orderObj
->
orderType
).
arg
(
tempOrderTypeId
)
.
arg
(
orderObj
->
pickupCode
).
arg
(
orderObj
->
totalPrice
*
0.01
).
arg
(
orderObj
->
productPrice
*
0.01
).
arg
(
orderObj
->
orderDiscount
*
0.01
)
...
...
@@ -323,7 +325,7 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef)
.
arg
(
""
).
arg
(
orderObj
->
lang
).
arg
(
orderObj
->
memo
).
arg
(
orderObj
->
riderPhone
).
arg
(
orderObj
->
riderName
)
.
arg
(
orderObj
->
disPlateformFee
*
0.01
).
arg
(
orderObj
->
makeStatus
).
arg
(
orderObj
->
makeSource
).
arg
(
orderObj
->
makeDeviceId
)
.
arg
(
tempBusinessType
).
arg
(
orderObj
->
expectDate
).
arg
(
QString
::
number
(
orderObj
->
inAdvanceTakemeal
)
+
";"
+
orderObj
->
reserveMakeTime
)
.
arg
(
orderObj
->
subStoreId
);
.
arg
(
orderObj
->
subStoreId
)
.
arg
(
orderObj
->
globalOrderType
).
arg
(
orderObj
->
globalServiceType
)
;
}
else
{
QLOG_INFO
()
<<
QString
(
"[<<<<---PmsOrdersData::insertOrderData:Insert OrderId %1 Into PMS Order Success--->>>>]"
).
arg
(
orderObj
->
id
);
...
...
@@ -517,8 +519,8 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const
QSqlQuery
query
(
m_sqlDb
);
query
.
prepare
(
"INSERT INTO order_items(order_id,product_id, product_code, product_name, en_product_name, product_qty, item_total,"
"spec_id, spec_name, en_spec_name, price, promotion_name, promotion_price, promotion_qty, promotion_sku,"
"package_price, default_image, coupon_show_giver, coupon_giver, coupon_wishes) "
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
);
"package_price, default_image, coupon_show_giver, coupon_giver, coupon_wishes
, nick_name
) "
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
, ?
)"
);
query
.
addBindValue
(
OrderId
);
// --非码OMS订单号
query
.
addBindValue
(
""
);
// --主商品ID
query
.
addBindValue
(
coupObjTemp
->
skus
[
0
]
->
code
);
// --券主商品code
...
...
@@ -539,6 +541,7 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const
query
.
addBindValue
(
coupObjTemp
->
isShowGiver
);
// --券主商品-是否显示赠送者;
query
.
addBindValue
(
coupObjTemp
->
giverName
);
// --券主商品-赠送者名;
query
.
addBindValue
(
coupObjTemp
->
blessingWords
);
// --券主商品-赠送祝福词;
query
.
addBindValue
(
coupObjTemp
->
skus
[
0
]
->
nickname
);
// --券主商品-商品昵称
if
(
!
query
.
exec
())
{
QLOG_ERROR
()
<<
QString
(
"[<<<<---PmsOrdersData::insertConponData:Insert OrderId %1 Product code:%2 Failed --->>>>]"
)
...
...
@@ -546,12 +549,13 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const
<<
query
.
lastError
().
text
()
<<
QString
::
number
(
query
.
lastError
().
type
());
QLOG_ERROR
()
<<
QString
(
"INSERT INTO order_items(order_id,order_item_id, product_id, product_name, en_product_name, product_qty,"
" item_total,spec_id, spec_name, en_spec_name, price, promotion_name, promotion_price, promotion_qty,"
" promotion_sku, package_price, default_image, coupon_show_giver, 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)"
)
" promotion_sku, package_price, default_image, coupon_show_giver, coupon_giver, coupon_wishes
, nick_name
) "
"VALUES(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16, %17, %18, %19, %20
, %21
)"
)
.
arg
(
OrderId
).
arg
(
""
).
arg
(
coupObjTemp
->
skus
[
0
]
->
code
).
arg
(
coupObjTemp
->
skus
[
0
]
->
name
)
.
arg
(
""
).
arg
(
coupObjTemp
->
skus
[
0
]
->
qty
).
arg
(
coupObjTemp
->
skus
[
0
]
->
price
).
arg
(
""
).
arg
(
""
)
.
arg
(
""
).
arg
(
coupObjTemp
->
skus
[
0
]
->
price
*
0.01
).
arg
(
coupObjTemp
->
discountName
).
arg
(
coupObjTemp
->
consumeDiscountAmount
*
0.01
)
.
arg
(
1
).
arg
(
coupObjTemp
->
discount
).
arg
(
0
).
arg
(
""
).
arg
(
coupObjTemp
->
isShowGiver
).
arg
(
coupObjTemp
->
giverName
).
arg
(
coupObjTemp
->
blessingWords
);
.
arg
(
1
).
arg
(
coupObjTemp
->
discount
).
arg
(
0
).
arg
(
""
).
arg
(
coupObjTemp
->
isShowGiver
).
arg
(
coupObjTemp
->
giverName
)
.
arg
(
coupObjTemp
->
blessingWords
).
arg
(
coupObjTemp
->
skus
[
0
]
->
nickname
);
}
else
{
ProInIdRef
=
query
.
lastInsertId
().
toString
();
QLOG_INFO
()
<<
QString
(
"[<<<<---PmsOrdersData::insertConponData:Insert OrderId %1 Conpon Success code:%2 increaseId:%3--->>>>]"
)
...
...
fmTakeout/Model/couponsObject.h
View file @
07733e07
...
...
@@ -26,7 +26,6 @@ class CouponsObject : public QObject
Q_PROPERTY
(
QString
giverName
READ
getGiverName
WRITE
setGiverName
)
Q_PROPERTY
(
QString
blessingWords
READ
getBlessingWords
WRITE
setBlessingWords
)
public
:
explicit
CouponsObject
(
QObject
*
parent
=
0
)
:
QObject
(
parent
){}
CouponsObject
(
const
CouponsObject
&
coupons
,
QObject
*
parent
=
0
);
...
...
@@ -49,7 +48,6 @@ public:
QString
giverName
=
""
;
//券赠送者
QString
blessingWords
=
""
;
//券赠送祝福
QList
<
SingleProductObject
*>
skus
;
protected
:
...
...
fmTakeout/Model/orderObject.h
View file @
07733e07
...
...
@@ -95,6 +95,8 @@ class OrderObject : public QObject
Q_PROPERTY
(
QString
reserveMakeTime
READ
getReserveMakeTime
WRITE
setReserveMakeTime
)
Q_PROPERTY
(
int
inAdvanceTakemeal
READ
getInAdvanceTakemeal
WRITE
setInAdvanceTakemeal
)
Q_PROPERTY
(
QString
subStoreId
READ
getSubStoreId
WRITE
setSubStoreId
)
Q_PROPERTY
(
int
globalServiceType
READ
getGlobalServiceType
WRITE
setGlobalServiceType
)
Q_PROPERTY
(
int
globalOrderType
READ
getGlobalOrderType
WRITE
setGlobalOrderType
)
public
:
OrderObject
(
QObject
*
parent
=
0
)
:
QObject
(
parent
){}
...
...
@@ -196,6 +198,8 @@ public:
QString
reserveMakeTime
=
"0000-00-00 00:00:00"
;
// 预约制作时间【新增字段:string】
int
inAdvanceTakemeal
=
0
;
// 预约单提前到店标志【新增字段:int】
QString
subStoreId
=
""
;
// 子门店号 【新增字段:string】
int
globalServiceType
;
// 全链路服务类型: globalServiceType【新增字段:int】
int
globalOrderType
;
// 全链路订单类型: globalOrderType 【新增字段:int】
int
forwardPosStatus
=
0
;
// 正向单入机状态: 0:未知 1: 成功 2:失败;
int
negativePosStatus
=
0
;
// 负向单同上;
...
...
@@ -460,6 +464,12 @@ public:
inline
QString
getSubStoreId
()
const
{
return
subStoreId
;}
inline
void
setSubStoreId
(
const
QString
&
v
){
subStoreId
=
v
;}
inline
int
getGlobalServiceType
()
const
{
return
globalServiceType
;}
inline
void
setGlobalServiceType
(
const
int
&
v
){
globalServiceType
=
v
;}
inline
int
getGlobalOrderType
()
const
{
return
globalOrderType
;}
inline
void
setGlobalOrderType
(
const
int
&
v
){
globalOrderType
=
v
;}
};
#endif // ORDEROBJECT_H
fmTakeout/Model/singleProductObject.h
View file @
07733e07
...
...
@@ -14,6 +14,7 @@ class SingleProductObject : public QObject
Q_PROPERTY
(
int
qty
READ
getQty
WRITE
setQty
)
Q_PROPERTY
(
int
price
READ
getPrice
WRITE
setPrice
)
Q_PROPERTY
(
bool
isCoupon
READ
getIsCoupon
WRITE
setIsCoupon
)
Q_PROPERTY
(
QString
nickname
READ
getNickname
WRITE
setNickname
)
public
:
explicit
SingleProductObject
(
QObject
*
parent
=
0
)
:
QObject
(
parent
){}
...
...
@@ -25,6 +26,7 @@ public:
int
qty
=
0
;
int
price
=
0
;
bool
isCoupon
=
false
;
//此单品是否是券;
QString
nickname
;
//券商品昵称
protected
:
inline
QString
getCode
(){
return
code
;
}
...
...
@@ -42,6 +44,8 @@ protected:
inline
bool
getIsCoupon
(){
return
isCoupon
;
}
inline
void
setIsCoupon
(
const
bool
&
v
){
isCoupon
=
v
;
}
inline
QString
getNickname
(){
return
nickname
;
}
inline
void
setNickname
(
const
QString
&
v
){
nickname
=
v
;
}
};
...
...
fmTakeout/fmTakeout.rc
View file @
07733e07
...
...
@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
#endif
VS_VERSION_INFO VERSIONINFO
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
FILEVERSION 4,2020,
6
,30
PRODUCTVERSION 4,2020,
6
,30
FILEVERSION 4,2020,
7
,30
PRODUCTVERSION 4,2020,
7
,30
//*************************************************************************//
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
...
...
@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "OriginalFilename", "PmsPlugin.exe"
VALUE "ProductName", "PMS Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "4.2020.
6
.30"
VALUE "FileVersion", "4.2020.
6
.30"
VALUE "ProductVersion", "4.2020.
7
.30"
VALUE "FileVersion", "4.2020.
7
.30"
//*************************************************************************//
END
END
...
...
fmTakeout/preDefine.h
View file @
07733e07
...
...
@@ -11,7 +11,8 @@
//#define APP_VERSION "4.2020.520.1"
//#define APP_VERSION "4.2020.526.1"
//#define APP_VERSION "4.2020.6.29"
#define APP_VERSION "4.2020.6.30"
//#define APP_VERSION "4.2020.6.30"
#define APP_VERSION "4.2020.7.30"
//修正版本号时,切记修正 FmTakeout.rc 中的版本号
#define SERVER_PASSWORD "posoperator@freemud.cn"
...
...
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