任务描述
功能同需求
需求描述

背景:订单组对应wish中间表需要调整迁移;利润需要整改


需求:wish 添加 V3 版本后,将同时存在V2, V3 , 订单进来后判断 V2/V3 版本进行取值落地;





订单改造字段如下背景------------------------------------

(RB_Wish_OrderInfo)的中间表 相关字段  将做移除;

http://pm.irobotbox.com/zentao/task-view-21278.html

{

Quantity 数量
OrderTotal 订单价格
Price 产品价格
Cost 
Shipping 
ShippingCost 
ChinaPostSubsidyAmount
ShippingReimbursementAmount       
EligibleForShippingReimbursement   判断字段,对应是否合并计划;
MerchantResponsibleRefundAmount

}

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


利润需求如下:


1. Wish 新方法 对应关系 


202110310745108571711 案例

V2                                                                                 V3
"quantity": "1"                                                               "product_quantity": 1【备注:Wish 产品数量 】
"shipping_cost": "16.1"                                                 shipping_merchant_payment ,"amount": 16.1, 【 取值来源 :general_payment_details. shipping_merchant_payment."amount": 11.47】
 "Price"                                                                        "product_price" 19.48 【备注:Wish 产品单一价格 需要* 数量得出销售收入】

"cost": "56.18"                                                              "product_merchant_payment" "amount": 56.18, 【取值来源:general_payment_details. product_merchant_payment.amount】

                                                                                    "payment_total: 19.7【取值来源:general_payment_details. payment_total.amount】
"order_total": "72.28"                                                   "product_shipping_price" 【取值来源:general_payment_details. payment_total.amount】
 "shipping_reimbursement_amount": "0.0"                  "shipping_reimbursements": []
 "merchant_responsible_amount": "72.28"                 "merchant_responsible_amount":19.7 【取值来源:merchant_responsible_amount.amount: 19.7】 
"shipping": "20.64"                                                       "product_shipping_price" "amount": 20.64
"transaction_tax": "20.69"                                            "Transacation_tax ": 20.69 ,【取 Transacation_information. tax_type = Transacation_tax [amount : 20.69 ] 备注:Wish 税费】
"eligible_for_shipping_reimbursement": "False"          "shipping_reimbursements": [] 该项有值则为WishPost运费

                                                                            【取值来源:只取 数组里唯一 amount [ 备注:wish 订单运费补贴] , 

                                                                                              多于一条amount 取第一条 并且 Currency_code = 'CNY' 正常只有这条,不正常就不取了 

                                                                                              取大于0 为补贴计划,为0 或者空值非补贴】


                                                                                 "refund_amount": "72.28" 【取值来源:"refunds"."refund_amount"."amount": 19.7 只取一条,第一条】

                                                                                   

V2  判断合并计划方法:

1、非合并计划订单(EligibleForShippingReimbursement)不计算该项费用。
2、合并计划订单需计(EligibleForShippingReimbursement)算该项费用。

  • 合并计划订单有WishPost运费(ShippingReimbursementAmount),其他收入取值WishPost运费,该费用为真实值。
  • 合并计划订单没有WishPost运费(ShippingReimbursementAmount),其他收入取值本地仓派送运费,该费用非预估值。

ShippingReimbursementAmount 非空 其他收入 =  ShippingReimbursementAmount"

ShippingReimbursementAmount 空值 其他收入 =  本地仓派送运费


V3 判断合并计划方法:

 "shipping_reimbursements": []  非空 ,其他收入 =  "shipping_reimbursements"

 "shipping_reimbursements": []  空值 ,其他收入 =  本地仓派送运费




如下为订单参考内容

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

订单组更新:

原来的需求V3 , 一共 11个字段,

Version(V2 ,V3公共字段 ) : 枚举 : v2 / v3
"product_quantity": 1
shipping_merchant_payment ,"amount": 16.1,
"product_price" "amount": 72.02
"product_merchant_payment" "amount": 56.18,
"payment_total" "amount": 72.28,
"shipping_reimbursements": []
"merchant_responsible_amount" "amount": 72.28,
"refund_amount": "72.28"
"product_shipping_price" "amount": 20.64
"tax_amount_in_merchant_currency" "amount": 20.69

优化下解释的需求V3 , 一共 12个字段,(这个为准, 加了个货币字段)
Version(V2 ,V3公共字段 ) : 枚举 : v2 / v3
"product_quantity": 1 【备注:Wish 产品数量 】
shipping_merchant_payment : 11.47 【 取值来源 :general_payment_details. shipping_merchant_payment."amount": 11.47】
"product_price" 19.48 【备注:Wish 产品单一价格 需要* 数量得出销售收入】
Currency_code : 'CNY'
"product_merchant_payment" 15.19,【取值来源:general_payment_details. product_merchant_payment.amount】
"payment_total: 19.7【取值来源:general_payment_details. payment_total.amount】
"shipping_reimbursements": 【取值来源:只取 数组里唯一 amount [ 备注:wish 订单运费补贴] , 多于一条amount 取第一条 并且 Currency_code = 'CNY' 正常只有这条,不正常就不取了 】
"product_shipping_price" 【取值来源:general_payment_details. payment_total.amount】
"merchant_responsible_amount":19.7 【取值来源:merchant_responsible_amount.amount: 19.7】
"refund_amount"19.7【取值来源:"refunds"."refund_amount"."amount": 19.7 只取一条,第一条】
简化 "Transacation_tax ": 20.69 ,【取 Transacation_information. tax_type = Transacation_tax [amount : 20.69 ] 备注:Wish 税费】

验收标准
暂无
历史记录  
  1. 2022-01-11 11:47:13, 由 韦思成 创建。
  2. 2022-01-11 13:11:00, 由 何智军 完成。
    修改了 总计消耗,旧值为 "0",新值为 "6"。
    修改了 指派给 ,旧值为 "hezhijun",新值为 "weisicheng"。
    修改了 实际完成,旧值为 "",新值为 "2022-01-11 13:10:53"。
    修改了 任务状态,旧值为 "wait",新值为 "done"。
    修改了 实际开始,旧值为 "0000-00-00 00:00:00",新值为 "2022-01-11 13:11:00"。
    修改了 预计剩余,旧值为 "6",新值为 "0"。
    修改了 由谁完成,旧值为 "",新值为 "hezhijun"。
  3. 2022-01-11 18:05:05, 由 何智军 添加备注。

    该任务为wish平台订单费用计算时获取通过订单接口获取平台订单费用信息,由于该接口目前V2和V3版本混用,通过利润这边通过订单接口传递的IsV3标识区分使用对应的平台订单信息;以下以订单【202109231143872702】验证。


    一、使用V2版本接口 计算订单费用




    利润估算:订单订单总额=订单总额+其他收入预估值(本地仓派送运费正值)= 783 + 162 = 945


    二使用V3版本

    需要创建V3版本订单,需要与订单联调 

  4. 2022-06-23 14:16:07, 由 韦思成 关闭。
    修改了 任务状态,旧值为 "done",新值为 "closed"。
    修改了 指派给 ,旧值为 "weisicheng",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "weisicheng"。
    修改了 关闭时间,旧值为 "0000-00-00 00:00:00",新值为 "2022-06-23 14:16:07"。
    修改了 关闭原因,旧值为 "",新值为 "done"。
所属迭代 【分支】产品中心1月非正常更新版本(2022年)
所属模块 赛盒科技  赛盒ERP管理系统   数据报表组
相关需求 Wish中间表迁移利润对应调整
指派给 Closed 于 2022-06-23 14:16:07
任务类型 后端
任务标签 初始
开发组
任务状态 已关闭
进度 100%
优先级 P2
关键词
抄送给
由谁创建 韦思成 于 2022-01-11 11:47:13
由谁完成 何智军 于 2022-01-11 13:10:53
由谁取消 暂无
由谁关闭 韦思成 于 2022-06-23 14:16:07
关闭原因 已完成
最后编辑 韦思成 于 2022-06-23 14:16:07
团队 最初预计 总计消耗 预计剩余
工时信息
最初预计 6工时
总计消耗 6工时
预计剩余 0工时
预计开始 2022-01-08
实际开始 2022-01-11
截止日期 2022-01-10