Commit 07733e07 by wuyang.zou

new feature: 1、存储全链路 订单类型 服务类型, 2、存储券商品对象中的 商品昵称

parent a428c627
...@@ -426,6 +426,8 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject) ...@@ -426,6 +426,8 @@ void FlowControl::_OrderAnalysis(const QJsonObject& jsonObject)
orderObject->negativePosStatus =0; orderObject->negativePosStatus =0;
orderObject->businessType = "0"; orderObject->businessType = "0";
orderObject->inAdvanceTakemeal = 0; orderObject->inAdvanceTakemeal = 0;
orderObject->globalServiceType = 0;
orderObject->globalOrderType = 0;
orderObject->FromJson(jsonObject); orderObject->FromJson(jsonObject);
orderObject->pushOrderType=0; orderObject->pushOrderType=0;
......
...@@ -203,13 +203,13 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef) ...@@ -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," "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," "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, " "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(?, ?, ?, ?, ?,?, ?, ?, ?, ?, " "VALUES(?, ?, ?, ?, ?,?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?," "?, ?, ?, ?, ?, ?, ?, ?, ?, ?,"
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
"?, ?, ?, ?, ?, ?, ?, ?)"); "?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
query.addBindValue(orderObj->id); // --非码OMS订单号 query.addBindValue(orderObj->id); // --非码OMS订单号
query.addBindValue(orderObj->id); // --非码OMS订单号 query.addBindValue(orderObj->id); // --非码OMS订单号
...@@ -292,6 +292,8 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef) ...@@ -292,6 +292,8 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef)
query.addBindValue(orderObj->expectDate); // --订单预约时间 query.addBindValue(orderObj->expectDate); // --订单预约时间
query.addBindValue( QString::number(orderObj->inAdvanceTakemeal) + ";" + orderObj->reserveMakeTime ); // --订单预约提醒模板 query.addBindValue( QString::number(orderObj->inAdvanceTakemeal) + ";" + orderObj->reserveMakeTime ); // --订单预约提醒模板
query.addBindValue(orderObj->subStoreId); // --母子门店的子门店编号; query.addBindValue(orderObj->subStoreId); // --母子门店的子门店编号;
query.addBindValue( orderObj->globalOrderType ); // --全链路订单类型
query.addBindValue( orderObj->globalServiceType); // --全链路服务类型
if(!query.exec()) { if(!query.exec()) {
QLOG_ERROR()<<"[<<<<---PmsOrdersData::insertOrderData:Insert Order Error--->>>>]"<<query.lastError().text() QLOG_ERROR()<<"[<<<<---PmsOrdersData::insertOrderData:Insert Order Error--->>>>]"<<query.lastError().text()
...@@ -305,10 +307,10 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef) ...@@ -305,10 +307,10 @@ bool PmsOrdersData::insertOrderData(OrderObject* orderObj,QString& pmsOrderRef)
"last_pay_time, address_latitude, address_longitude, oms_msrno, consumer_birthday, cancel_reason, " "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, " "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," "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, " "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," "%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->id).arg(orderObj->id).arg(orderObj->orderStatus).arg(updateTimeString).arg(orderObj->channel)
.arg(orderObj->orderType).arg(tempOrderTypeId) .arg(orderObj->orderType).arg(tempOrderTypeId)
.arg(orderObj->pickupCode).arg(orderObj->totalPrice * 0.01).arg(orderObj->productPrice * 0.01).arg(orderObj->orderDiscount * 0.01) .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) ...@@ -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("").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(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( tempBusinessType ).arg(orderObj->expectDate).arg( QString::number(orderObj->inAdvanceTakemeal) + ";" + orderObj->reserveMakeTime )
.arg(orderObj->subStoreId); .arg(orderObj->subStoreId).arg(orderObj->globalOrderType).arg(orderObj->globalServiceType);
} else { } else {
QLOG_INFO()<<QString("[<<<<---PmsOrdersData::insertOrderData:Insert OrderId %1 Into PMS Order Success--->>>>]").arg(orderObj->id); 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 ...@@ -517,8 +519,8 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const
QSqlQuery query(m_sqlDb); 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," 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," "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) " "package_price, default_image, coupon_show_giver, coupon_giver, coupon_wishes, nick_name) "
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
query.addBindValue(OrderId); // --非码OMS订单号 query.addBindValue(OrderId); // --非码OMS订单号
query.addBindValue(""); // --主商品ID query.addBindValue(""); // --主商品ID
query.addBindValue(coupObjTemp->skus[0]->code); // --券主商品code query.addBindValue(coupObjTemp->skus[0]->code); // --券主商品code
...@@ -539,6 +541,7 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const ...@@ -539,6 +541,7 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const
query.addBindValue(coupObjTemp->isShowGiver); // --券主商品-是否显示赠送者; query.addBindValue(coupObjTemp->isShowGiver); // --券主商品-是否显示赠送者;
query.addBindValue(coupObjTemp->giverName); // --券主商品-赠送者名; query.addBindValue(coupObjTemp->giverName); // --券主商品-赠送者名;
query.addBindValue(coupObjTemp->blessingWords); // --券主商品-赠送祝福词; query.addBindValue(coupObjTemp->blessingWords); // --券主商品-赠送祝福词;
query.addBindValue(coupObjTemp->skus[0]->nickname); // --券主商品-商品昵称
if(!query.exec()) { if(!query.exec()) {
QLOG_ERROR()<<QString("[<<<<---PmsOrdersData::insertConponData:Insert OrderId %1 Product code:%2 Failed --->>>>]") QLOG_ERROR()<<QString("[<<<<---PmsOrdersData::insertConponData:Insert OrderId %1 Product code:%2 Failed --->>>>]")
...@@ -546,12 +549,13 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const ...@@ -546,12 +549,13 @@ bool PmsOrdersData::insertConponData(const QList<CouponsObject*> coupList, const
<<query.lastError().text()<<QString::number(query.lastError().type()); <<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," 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," " 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) " " 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)") "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(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]->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("").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 { } else {
ProInIdRef = query.lastInsertId().toString(); ProInIdRef = query.lastInsertId().toString();
QLOG_INFO()<<QString("[<<<<---PmsOrdersData::insertConponData:Insert OrderId %1 Conpon Success code:%2 increaseId:%3--->>>>]") QLOG_INFO()<<QString("[<<<<---PmsOrdersData::insertConponData:Insert OrderId %1 Conpon Success code:%2 increaseId:%3--->>>>]")
......
...@@ -26,7 +26,6 @@ class CouponsObject : public QObject ...@@ -26,7 +26,6 @@ class CouponsObject : public QObject
Q_PROPERTY (QString giverName READ getGiverName WRITE setGiverName) Q_PROPERTY (QString giverName READ getGiverName WRITE setGiverName)
Q_PROPERTY (QString blessingWords READ getBlessingWords WRITE setBlessingWords) Q_PROPERTY (QString blessingWords READ getBlessingWords WRITE setBlessingWords)
public: public:
explicit CouponsObject(QObject *parent = 0):QObject(parent){} explicit CouponsObject(QObject *parent = 0):QObject(parent){}
CouponsObject(const CouponsObject& coupons,QObject* parent=0); CouponsObject(const CouponsObject& coupons,QObject* parent=0);
...@@ -49,7 +48,6 @@ public: ...@@ -49,7 +48,6 @@ public:
QString giverName = ""; //券赠送者 QString giverName = ""; //券赠送者
QString blessingWords = ""; //券赠送祝福 QString blessingWords = ""; //券赠送祝福
QList<SingleProductObject*> skus; QList<SingleProductObject*> skus;
protected: protected:
......
...@@ -95,6 +95,8 @@ class OrderObject : public QObject ...@@ -95,6 +95,8 @@ class OrderObject : public QObject
Q_PROPERTY (QString reserveMakeTime READ getReserveMakeTime WRITE setReserveMakeTime) Q_PROPERTY (QString reserveMakeTime READ getReserveMakeTime WRITE setReserveMakeTime)
Q_PROPERTY (int inAdvanceTakemeal READ getInAdvanceTakemeal WRITE setInAdvanceTakemeal) Q_PROPERTY (int inAdvanceTakemeal READ getInAdvanceTakemeal WRITE setInAdvanceTakemeal)
Q_PROPERTY (QString subStoreId READ getSubStoreId WRITE setSubStoreId) 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: public:
OrderObject(QObject *parent=0) OrderObject(QObject *parent=0)
:QObject(parent){} :QObject(parent){}
...@@ -196,6 +198,8 @@ public: ...@@ -196,6 +198,8 @@ public:
QString reserveMakeTime = "0000-00-00 00:00:00"; // 预约制作时间【新增字段:string】 QString reserveMakeTime = "0000-00-00 00:00:00"; // 预约制作时间【新增字段:string】
int inAdvanceTakemeal = 0; // 预约单提前到店标志【新增字段:int】 int inAdvanceTakemeal = 0; // 预约单提前到店标志【新增字段:int】
QString subStoreId = ""; // 子门店号 【新增字段:string】 QString subStoreId = ""; // 子门店号 【新增字段:string】
int globalServiceType; // 全链路服务类型: globalServiceType【新增字段:int】
int globalOrderType; // 全链路订单类型: globalOrderType 【新增字段:int】
int forwardPosStatus = 0; // 正向单入机状态: 0:未知 1: 成功 2:失败; int forwardPosStatus = 0; // 正向单入机状态: 0:未知 1: 成功 2:失败;
int negativePosStatus = 0; // 负向单同上; int negativePosStatus = 0; // 负向单同上;
...@@ -460,6 +464,12 @@ public: ...@@ -460,6 +464,12 @@ public:
inline QString getSubStoreId()const{return subStoreId;} inline QString getSubStoreId()const{return subStoreId;}
inline void setSubStoreId(const QString& v){subStoreId = v;} 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 #endif // ORDEROBJECT_H
...@@ -14,6 +14,7 @@ class SingleProductObject : public QObject ...@@ -14,6 +14,7 @@ class SingleProductObject : public QObject
Q_PROPERTY (int qty READ getQty WRITE setQty) Q_PROPERTY (int qty READ getQty WRITE setQty)
Q_PROPERTY (int price READ getPrice WRITE setPrice) Q_PROPERTY (int price READ getPrice WRITE setPrice)
Q_PROPERTY (bool isCoupon READ getIsCoupon WRITE setIsCoupon) Q_PROPERTY (bool isCoupon READ getIsCoupon WRITE setIsCoupon)
Q_PROPERTY (QString nickname READ getNickname WRITE setNickname)
public: public:
explicit SingleProductObject(QObject *parent = 0):QObject(parent){} explicit SingleProductObject(QObject *parent = 0):QObject(parent){}
...@@ -25,6 +26,7 @@ public: ...@@ -25,6 +26,7 @@ public:
int qty = 0; int qty = 0;
int price = 0; int price = 0;
bool isCoupon = false; //此单品是否是券; bool isCoupon = false; //此单品是否是券;
QString nickname; //券商品昵称
protected: protected:
inline QString getCode(){ return code; } inline QString getCode(){ return code; }
...@@ -42,6 +44,8 @@ protected: ...@@ -42,6 +44,8 @@ protected:
inline bool getIsCoupon(){ return isCoupon; } inline bool getIsCoupon(){ return isCoupon; }
inline void setIsCoupon(const bool& v){ isCoupon = v; } inline void setIsCoupon(const bool& v){ isCoupon = v; }
inline QString getNickname(){ return nickname; }
inline void setNickname(const QString& v){ nickname = v; }
}; };
......
...@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico" ...@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
#endif #endif
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***// //***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
FILEVERSION 4,2020,6,30 FILEVERSION 4,2020,7,30
PRODUCTVERSION 4,2020,6,30 PRODUCTVERSION 4,2020,7,30
//*************************************************************************// //*************************************************************************//
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
...@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO ...@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "OriginalFilename", "PmsPlugin.exe" VALUE "OriginalFilename", "PmsPlugin.exe"
VALUE "ProductName", "PMS Plugin" VALUE "ProductName", "PMS Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***// //***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "4.2020.6.30" VALUE "ProductVersion", "4.2020.7.30"
VALUE "FileVersion", "4.2020.6.30" VALUE "FileVersion", "4.2020.7.30"
//*************************************************************************// //*************************************************************************//
END END
END END
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
//#define APP_VERSION "4.2020.520.1" //#define APP_VERSION "4.2020.520.1"
//#define APP_VERSION "4.2020.526.1" //#define APP_VERSION "4.2020.526.1"
//#define APP_VERSION "4.2020.6.29" //#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 中的版本号 //修正版本号时,切记修正 FmTakeout.rc 中的版本号
#define SERVER_PASSWORD "posoperator@freemud.cn" #define SERVER_PASSWORD "posoperator@freemud.cn"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment