Commit acccaa85 by wuyang.zou

FIX BUG:修正工程名 有 takeaway -> takeout

parent ab0c400b
![外卖订单流程图](http://172.16.12.240/yunpeng.song/takeout_sbk/raw/master/document/Picture/flow.png)
![外卖订单流程图](http://172.16.12.240/yunpeng.song/takeout_sbk/raw/master/document/Picture/flow.png)
## simphony拉取订单
>OMS插件点击触发simphony拉取订单,返回订单
### request:
字段名 | 类型 | 必选|说明
---|--- |--- |---
actionId| int| true |请求类型 1
storeId | string| true|门店号
posId | string| true |pos号
operatorId | string| true | 收银员
### reponse:
字段名 | 类型 | 说明
---|--- |---
fm_cmd|string |订单类型(入单还是退单)
statusCode | int | 状态
iscontinue | int |是否还有订单待拉取
msg|string |消息
data| object | 订单
pay_id | object | 支付信息
pay_id/pay_id | string | 支付方式(表示订单来源)
pay_id/pos_sale_id| string | pos短号
pay_id/order_status| int | 订单状态
pay_id/pay_str | string | 支付方式说明(一般是非码外卖)
pay_id/pay_ebcode | string | 支付方式中的类型&渠道(下方渠道对照表)
pay_id/pay_ebcode_str | string | 支付方式中的类型&渠道说明
pay_id/order_index |int |外卖平台流水号
pay_id/customer_name | string |顾客姓名
pay_id/customer_phone | string| 顾客手机
pay_id/customer_address |string |顾客地址
pay_id/has_invoice |bool |是否开发票
pay_id/invoice_title |string |发票抬头
pay_id/delivery_time | int| 配送时间戳
pay_id/delivery_type | int | 配送方式,0自配送、1平台配送
pay_id/delivery_party | string | 配送方式 例:百度配送
pay_id/create_time | int| 下单时间戳
pay_id/remark | string | 订单备注
pay_id/shop_fee | int | 门店能够从平台拿到的钱(已去除服务费)
pay_id/service_fee | int | 平台收取的佣金
pay_id/products_fee | int | 商品金额
pay_id/discount_fee | int | 优惠总额
pay_id/dis_shop_fee | int | 商家承担的优惠总额
pay_id/dis_platform_fee | int | 平台承担的优惠总额
pay_id/send_fee | int | 配送费
pay_id/package_fee |int | 打包费(餐盒总费用)
pay_id/package_amount |int | 餐盒数量
pay_id/invoice_amount |int | 发票金额
pay_id/paid_trans_id |string | 外卖平台订单号
pay_id/fm_id | string | 非码交易号
products | array | 商品信息
products/consume_num |int | 数量
products/pid | string | 商品编码
products/original_price |int | 外卖平台上的单价
products/sub_products | array | 套餐子商品信息,结构同products数组
## simphony消息回复
>当simphony处理完订单时,如果是新订单需要将小票号和订单号一起回复给OMS插件,如果是退款单,则回复插件已经确认撤单,返回成功或失败。
### request:
字段名 | 类型 | 说明
---|--- |---
actionId| int|请求类型 4
orderId | string|订单号
posSalesId|string |pos短号
### reponse:
字段名 | 类型 | 说明
---|--- |---
statusCode | int | 状态
iscontinue | int |是否还有订单待拉取
msg |string |消息
## simphony确认接单
>由simphony主动发起通知OMS插件确认接单,返回成功或者失败。
### request:
字段名 | 类型 | 说明
---|--- |---
actionId| int|请求类型 2
orderId | string|订单号
posSalesId|string |pos短号
### reponse:
字段名 | 类型 | 说明
---|--- |---
statusCode | int | 状态
iscontinue | int |是否还有订单待拉取
msg |string |消息
## simphony取消订单
>由simphony主动发起通知OMS插件取消订单,返回成功或者失败。
### request:
字段名 | 类型 | 说明
---|--- |---
actionId| int|请求类型 3
orderId | string|订单号
posSalesId|string |pos短号
### reponse:
字段名 | 类型 | 说明
---|--- |---
statusCode | int | 状态
iscontinue | int |是否还有订单待拉取
msg |string |消息
## OMS登录接口
>oms接受simphony发送的门店信息,像服务端发送登录请求。
### request:
字段名 | 类型 | 说明
---|--- |---
iPAddress| int| pos机ip地址
partnerId | string|商户号
orgCode|string |门店号
password |string | 登录密码
machineCode |string | pos编号
### reponse:
字段名 | 类型 | 说明
---|--- |---
data | object | 数据
data/PosToken | string |token
data/StoreName |string |门店名称
message | string | 错误消息
statusCode | int |状态
## OMS心跳接口
>定时发送终端信息到服务端,告知pos在线。
### request:
字段名 | 类型 | 说明
---|--- |---
iPAddress| int| pos机ip地址
partnerId | string|商户号
orgCode|string |门店号
password |string | 登录密码
machineCode |string | pos编号
### reponse:
字段名 | 类型 | 说明
---|--- |---
data | object | 数据
data/PosToken | string |token
data/StoreName |string |门店名称
message | string | 错误消息
statusCode | int |状态
...@@ -1209,9 +1209,13 @@ bool FlowControl::_Get04ReplyJson(const QJsonObject &content, QJsonObject &data, ...@@ -1209,9 +1209,13 @@ bool FlowControl::_Get04ReplyJson(const QJsonObject &content, QJsonObject &data,
m_orderIdToPosSalesIdMap.insert(orderId,posSaleId); m_orderIdToPosSalesIdMap.insert(orderId,posSaleId);
} }
OrderObject* order_p = m_ordersMap.value(orderId); OrderObject* order_p = m_ordersMap.value(orderId);
QLOG_DEBUG()<< order_p << "====1===" << orderId << "===" << m_ordersMap.size();
QLOG_DEBUG()<< order_p->orderIndex << "====2==="; if (!order_p){
QLOG_DEBUG()<< order_p << "=====3=="; QLOG_ERROR()<<QString::fromLocal8Bit("%1订单并不存在m_orderMap[键值对]中;m_ordersMap.size()=%2").arg(orderId).arg(m_ordersMap.size());
result=false;
error=QString::fromLocal8Bit("%1订单并不存在m_orderMap[键值对]中;m_ordersMap.size()=%2").arg(orderId).arg(m_ordersMap.size());
return result;
}
if(m_ordersEntryList.contains(orderId)) if(m_ordersEntryList.contains(orderId))
{ {
......
...@@ -11,11 +11,13 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets ...@@ -11,11 +11,13 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
include("./QsLog/QsLog.pri") include("./QsLog/QsLog.pri")
include("./JQLibrary/JQLibrary.pri") include("./JQLibrary/JQLibrary.pri")
TARGET = fmTakeaway TARGET = fmTakeout
TEMPLATE = app TEMPLATE = app
CONFIG +=c++11 CONFIG +=c++11
QMAKE_LFLAGS_RELEASE += /debug /opt:ref
INCLUDEPATH += DTools INCLUDEPATH += DTools
LIBS += -luser32 LIBS += -luser32
...@@ -101,7 +103,7 @@ FORMS += mainForm.ui \ ...@@ -101,7 +103,7 @@ FORMS += mainForm.ui \
refuseForm.ui \ refuseForm.ui \
dailyreportForm.ui dailyreportForm.ui
RC_FILE += fmTakeaway.rc RC_FILE += fmTakeout.rc
DESTDIR += ../bin DESTDIR += ../bin
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