Commit 107c9ecc by wuyang.zou

fix bug:完善sbkApp端支付信息

parent b668bd81
......@@ -1362,7 +1362,8 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
rObj.insert("fm_ver", "1.0");
cObj.insert("pay_id", "002");
cObj.insert("pay_str", QString::fromLocal8Bit("非码外卖"));
int tempOrderType,tempOrderPayType;
int tempOrderType,tempOrderPayType,tempSbkAppPayType=0;
QString tempSbkAppPayValue="0";
// 转换成星巴克规定的订单类型;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单;
if(3 == order_p->getOrderType()){
......@@ -1373,6 +1374,20 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
else if("MOD" == order_p->channel){
tempOrderType = 9;
tempOrderPayType = 84;
//星巴克App端支付方式: 1:支付宝; 2:微信; 3:银联; 4:SVC卡;
if(4 == order_p->payWay){
tempSbkAppPayType = 14 ;
tempSbkAppPayValue = order_p->payfmId;
}else if(1 == order_p->payWay){
tempSbkAppPayType = 78;
tempSbkAppPayValue = order_p->id;
}else if(2 == order_p->payWay){
tempSbkAppPayType = 77;
tempSbkAppPayValue = order_p->id;
}else{
tempSbkAppPayType = -1;
tempSbkAppPayValue = "-1";
}
}else if("BAIDU" == order_p->channel){
tempOrderType = 11;
tempOrderPayType = 83;
......@@ -1386,8 +1401,10 @@ bool FlowControl::_ResponseSimphony05Request(const QJsonObject &content, QJsonOb
tempOrderType = 11;
tempOrderPayType = 83;
}
cObj.insert("orderOriginType", 11);
cObj.insert("orderPayType", 83);
cObj.insert("orderOriginType", tempOrderType);
cObj.insert("orderPayType", tempOrderPayType);
cObj.insert("sbkAppPayType", tempSbkAppPayType);
cObj.insert("sbkAppPayValue", tempSbkAppPayValue);
cObj.insert("retSyncOrderPrintInfo",retSyncOrderPrintInfo); //同步POS本地数据库打印信息结果:[1:同步成功;0:同步失败]
cObj.insert("paid_trans_id",orderId);
cObj.insert("pos_sale_id", posCheckNo);
......@@ -1532,7 +1549,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
rObj.insert("fm_ver", "1.0");
cObj.insert("pay_id", "002");
cObj.insert("pay_str", QString::fromLocal8Bit("非码外卖"));
int tempOrderType,tempOrderPayType;
int tempOrderType,tempOrderPayType,tempSbkAppPayType=0;
QString tempSbkAppPayValue="0";
// 转换成星巴克规定的订单类型;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单;
if(3 == orderObject->getOrderType()){
......@@ -1543,6 +1561,20 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
else if("MOD" == orderObject->channel){
tempOrderType = 9;
tempOrderPayType = 84;
//星巴克App端支付方式: 1:支付宝; 2:微信; 3:银联; 4:SVC卡;
if(4 == orderObject->payWay){
tempSbkAppPayType = 14 ;
tempSbkAppPayValue = orderObject->payfmId;
}else if(1 == orderObject->payWay){
tempSbkAppPayType = 78;
tempSbkAppPayValue = orderObject->id;
}else if(2 == orderObject->payWay){
tempSbkAppPayType = 77;
tempSbkAppPayValue = orderObject->id;
}else{
tempSbkAppPayType = -1;
tempSbkAppPayValue = "-1";
}
}else if("BAIDU" == orderObject->channel){
tempOrderType = 11;
tempOrderPayType = 83;
......@@ -1563,6 +1595,8 @@ bool FlowControl::_ResponseSimReqFristOrderData(QJsonObject &data, QString &erro
}
cObj.insert("orderOriginType", tempOrderType);
cObj.insert("orderPayType", tempOrderPayType);
cObj.insert("sbkAppPayType", tempSbkAppPayType);
cObj.insert("sbkAppPayValue", tempSbkAppPayValue);
cObj.insert("pos_sale_id", orderObject->posCheckNo);
cObj.insert("order_status",orderObject->orderStatus);//订单的状态
cObj.insert("pay_ebcode", orderObject->channel);
......
......@@ -11,6 +11,7 @@ class OrderObject : public QObject
Q_PROPERTY (QString id READ getId WRITE setId)
Q_PROPERTY (QString payfmId READ getPayfmId WRITE setPayfmId)
Q_PROPERTY (int orderType READ getOrderType WRITE setOrderType)
Q_PROPERTY (QString orgOrderId READ getOrgOrderId WRITE setOrgOrderId)
Q_PROPERTY (QString waybillId READ getWaybillId WRITE setWaybillId)
......@@ -25,7 +26,7 @@ class OrderObject : public QObject
Q_PROPERTY (QString storeName READ getStoreName WRITE setStoreName)
Q_PROPERTY (QString storeAddress READ getStoreAddress WRITE setStoreAddress)
Q_PROPERTY (QString channel READ getChannel WRITE setChannel)
Q_PROPERTY (QString payWay READ getPayWay WRITE setPayWay)
Q_PROPERTY (int payWay READ getPayWay WRITE setPayWay)
Q_PROPERTY (QString deliveryTime READ getDeliveryTime WRITE setDeliveryTime)
Q_PROPERTY (QString riderName READ getRiderName WRITE setRiderName)
Q_PROPERTY (QString riderPhone READ getRiderPhone WRITE setRiderPhone)
......@@ -85,6 +86,7 @@ public:
QString id; //编号
QString payfmId; //FM唯一码
int orderType; //订单类型: 用来区分是 正常订单(1) 预订单(2) 还是 客诉单:3 (星巴克定义客诉单的类型:12);
QString orgOrderId; //原始订单编号
QString waybillId; //运单号
......@@ -99,7 +101,7 @@ public:
QString storeName;
QString storeAddress;
QString channel; //订单渠道: 1 星巴克APP 2饿了么APP 3 客诉单;
QString payWay;
int payWay;
QString deliveryTime; //配送时间
QString riderName; //骑手名
QString riderPhone; //骑手电话
......@@ -144,6 +146,9 @@ public:
inline QString getId()const{return id;}
inline void setId(const QString& v){id = v;}
inline QString getPayfmId()const{return id;}
inline void setPayfmId(const QString& v){id = v;}
inline int getOrderType()const{return orderType;}
inline void setOrderType(const int& v){orderType = v;}
......@@ -183,8 +188,8 @@ public:
inline QString getChannel()const{return channel;}
inline void setChannel(const QString& v){channel = v;}
inline QString getPayWay()const{return payWay;}
inline void setPayWay(const QString& v){payWay = v;}
inline int getPayWay()const{return payWay;}
inline void setPayWay(const int& v){payWay = v;}
inline QString getDeliveryTime()const{return deliveryTime;}
inline void setDeliveryTime(const QString& v){deliveryTime = v;}
......
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