Commit 08296728 by wuyang.zou

fix bug:

1、显示预约单 预约时间;
2、预约订单取消,翻新之前记录订单;
3、拼单使用父级订单类型: APP-MOD Wechat-MOD

Version: 2.2020.6.29
parent b863a7c8
Pipeline #22438 failed with stage
in 15 seconds
...@@ -2622,7 +2622,7 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2622,7 +2622,7 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
int tempOrderType,tempOrderPayType,tempSbkAppPayType=0; int tempOrderType,tempOrderPayType,tempSbkAppPayType=0;
QString tempSbkAppPayValue="0"; QString tempSbkAppPayValue="0";
// 转换成星巴克规定的订单类型; // 转换成星巴克规定的订单类型;
//星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单; 4:MOP自测订单; 5:预约订单; 7:当日预约单;8拼单 //星巴克的订单类型:1:新订单; 2:预订单; 3:客诉单; 4:MOP自测订单; 5:预约订单; 7:当日预约单;8拼单(使用父级订单类型)
if(3 == orderObject->getOrderType()) { if(3 == orderObject->getOrderType()) {
tempOrderType = 12; tempOrderType = 12;
tempOrderPayType = -1; tempOrderPayType = -1;
...@@ -2633,8 +2633,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2633,8 +2633,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
else if ( "MOD" == orderObject->channel ) { else if ( "MOD" == orderObject->channel ) {
if ( 7 == orderObject->orderType ) { if ( 7 == orderObject->orderType ) {
tempOrderType = 14; tempOrderType = 14;
} else if ( 8 == orderObject->orderType ) {
tempOrderType = 0; // 还未申请,等待申请
} else { } else {
// platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat ; 5 口碑; // platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat ; 5 口碑;
if ( "4" == orderObject->platformSource ) { if ( "4" == orderObject->platformSource ) {
...@@ -2673,8 +2671,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2673,8 +2671,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
else if ( "WSG-MOD" == orderObject->channel ) { else if ( "WSG-MOD" == orderObject->channel ) {
if ( 7 == orderObject->orderType ) { if ( 7 == orderObject->orderType ) {
tempOrderType = 14; tempOrderType = 14;
} else if ( 8 == orderObject->orderType ) {
tempOrderType = 0; // 还未申请,等待申请
} else { } else {
// platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat; 5 口碑; // platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat; 5 口碑;
if ( "4" == orderObject->platformSource ) { if ( "4" == orderObject->platformSource ) {
...@@ -2693,8 +2689,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2693,8 +2689,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
else if ( "MOP" == orderObject->channel ){ else if ( "MOP" == orderObject->channel ){
if ( 7 == orderObject->orderType ) { if ( 7 == orderObject->orderType ) {
tempOrderType = 14; tempOrderType = 14;
} else if ( 8 == orderObject->orderType ) {
tempOrderType = 0; // 还未申请,等待申请
} else { } else {
// 区别:口碑-MOP / App-MOP; // 区别:口碑-MOP / App-MOP;
if ( "5" == orderObject->platformSource ){ if ( "5" == orderObject->platformSource ){
...@@ -2760,8 +2754,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2760,8 +2754,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
else if ( "MOD" == orderObject->channel ) { else if ( "MOD" == orderObject->channel ) {
if ( 7 == orderObject->orderType ) { if ( 7 == orderObject->orderType ) {
tempOrderType = 15; tempOrderType = 15;
} else if ( 8 == orderObject->orderType ) {
tempOrderType = 0; // 还未申请,等待申请
} else { } else {
// platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat; 5 口碑; // platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat; 5 口碑;
if ( "4" == orderObject->platformSource ) { if ( "4" == orderObject->platformSource ) {
...@@ -2775,8 +2767,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2775,8 +2767,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
else if ( "WSG-MOD" == orderObject->channel ) { else if ( "WSG-MOD" == orderObject->channel ) {
if ( 7 == orderObject->orderType ) { if ( 7 == orderObject->orderType ) {
tempOrderType = 15; tempOrderType = 15;
} else if ( 8 == orderObject->orderType ) {
tempOrderType = 0; // 还未申请,等待申请
} else { } else {
// platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat; 5 口碑; // platformSource:平台来源:1 app; 2 ele; 3 ors; 4 WeChat; 5 口碑;
if ( "4" == orderObject->platformSource ) { if ( "4" == orderObject->platformSource ) {
...@@ -2789,8 +2779,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso ...@@ -2789,8 +2779,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
else if ( "MOP" == orderObject->channel ) { else if ( "MOP" == orderObject->channel ) {
if ( 7 == orderObject->orderType ) { if ( 7 == orderObject->orderType ) {
tempOrderType = 15; tempOrderType = 15;
} else if ( 8 == orderObject->orderType ) {
tempOrderType = 0; // 还未申请,等待申请
} else { } else {
// 区分: 口碑-MOP / App-MOP; // 区分: 口碑-MOP / App-MOP;
if ( "5" == orderObject->platformSource ) { if ( "5" == orderObject->platformSource ) {
......
...@@ -637,6 +637,21 @@ bool PrintSumBillPosDB::insertOrderSumBill(OrderObject* orderObj, const QString& ...@@ -637,6 +637,21 @@ bool PrintSumBillPosDB::insertOrderSumBill(OrderObject* orderObj, const QString&
QLOG_INFO()<<QString("[<<<<---SqlServer Database:Insert OrderId %1 Into customer_info Success--->>>>]").arg(orderObj->id); QLOG_INFO()<<QString("[<<<<---SqlServer Database:Insert OrderId %1 Into customer_info Success--->>>>]").arg(orderObj->id);
result = true; result = true;
} }
// 订单状态为取消 && 预约订单时,需要更新 该订单在tb_msr_customer_info表中全部记录的订单状态;
// bool updateRet = false;
if (OrderObject::Refunded ==orderObj->orderStatus && 7 == orderObj->orderType) {
QSqlQuery updateQuery(m_sqlDb);
updateQuery.prepare(QString("update tb_msr_customer_info set order_status='%1' where order_id='%2' ")
.arg(orderObj->orderStatus).arg(orderObj->id));
if(!updateQuery.exec()) {
QLOG_ERROR()<<updateQuery.lastError().text()<<QString("[<<<<---SqlServer Database:Update OrderId %1 Refund orderStatus Failed--->>>>]").arg(orderObj->id);
} else {
QLOG_INFO()<<QString("[<<<<---SqlServer Database:update OrderId %1 Refund orderStatus success--->>>>]").arg(orderObj->id);
// updateRet= true;
}
}
m_sqlDb.close(); m_sqlDb.close();
return result; return result;
} }
......
...@@ -45,13 +45,18 @@ void DetailForm::InitData(OrderObject *orderObject) ...@@ -45,13 +45,18 @@ void DetailForm::InitData(OrderObject *orderObject)
ui->detailLab1->setText(QString("[ %1 ]:[ %2 ]:[%3:%4]").arg(orderObject->consigneeName,orderObject->consigneePhone, ui->detailLab1->setText(QString("[ %1 ]:[ %2 ]:[%3:%4]").arg(orderObject->consigneeName,orderObject->consigneePhone,
QString::fromLocal8Bit("暗号"),orderObject->secretSignal)); QString::fromLocal8Bit("暗号"),orderObject->secretSignal));
//订单完成后,送达时间需要更新为 finishTime //订单完成后,送达时间需要更新为 finishTime
if(OrderObject::Finished == orderObject->orderStatus){ QString deliveryFinishTime = "";
ui->detailLab2->setText( (orderObject->finishTime.isEmpty() || 0==orderObject->finishTime.length() )? QString::fromLocal8Bit("已经送达") : orderObject->finishTime); if (OrderObject::Finished == orderObject->orderStatus) {
}else if(OrderObject::Refunded == orderObject->orderStatus){ deliveryFinishTime = (orderObject->finishTime.isEmpty() || 0==orderObject->finishTime.length() )? QString::fromLocal8Bit("已经送达") : orderObject->finishTime;
ui->detailLab2->setText(QString("")); } else if (OrderObject::Refunded == orderObject->orderStatus) {
}else{ deliveryFinishTime = " ";
ui->detailLab2->setText(orderObject->deliveryTime); } else {
deliveryFinishTime = orderObject->deliveryTime;
}
if (7 == orderObject->orderType) {
deliveryFinishTime = deliveryFinishTime + QString::fromLocal8Bit("预约时间: ") + orderObject->expectDate;
} }
ui->detailLab2->setText(deliveryFinishTime);
QLOG_INFO() << QString("[<<<<---DetailForm::InitData ui->detailLab2->setText --->>>>]"); QLOG_INFO() << QString("[<<<<---DetailForm::InitData ui->detailLab2->setText --->>>>]");
ui->detailLab3->setText(orderObject->riderName.isEmpty() ? QString::fromLocal8Bit("暂未指定") : QString::fromLocal8Bit("[姓名]%1 [电话]%2") ui->detailLab3->setText(orderObject->riderName.isEmpty() ? QString::fromLocal8Bit("暂未指定") : QString::fromLocal8Bit("[姓名]%1 [电话]%2")
......
...@@ -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 2,2020,6,20 FILEVERSION 2,2020,6,29
PRODUCTVERSION 2,2020,6,20 PRODUCTVERSION 2,2020,6,29
//*************************************************************************// //*************************************************************************//
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", "fmTakeout.exe" VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "Delivery Order Plugin" VALUE "ProductName", "Delivery Order Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***// //***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "2.2020.6.20" VALUE "ProductVersion", "2.2020.6.29"
VALUE "FileVersion", "2.2020.6.20" VALUE "FileVersion", "2.2020.6.29"
//*************************************************************************// //*************************************************************************//
END END
END END
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
//#define APP_VERSION "2.2020.26.1" //#define APP_VERSION "2.2020.26.1"
//#define APP_VERSION "2.2020.312.1" //#define APP_VERSION "2.2020.312.1"
//#define APP_VERSION "2.2020.5.26" //#define APP_VERSION "2.2020.5.26"
#define APP_VERSION "2.2020.6.20" #define APP_VERSION "2.2020.6.29"
//修正版本号时,切记修正 FmTakeout.rc 中的版本号 //修正版本号时,切记修正 FmTakeout.rc 中的版本号
......
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