物料订单分包测试

This commit is contained in:
苏尹岚
2020-03-16 12:41:42 +08:00
parent 220780b2ba
commit a576358b43

View File

@@ -631,11 +631,11 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
// } // }
// outJxOrder.FreightPrice = int64(freightPrice) // outJxOrder.FreightPrice = int64(freightPrice)
// } else { // } else {
if outJxOrder.Weight <= 2000 { if outJxOrder.Weight <= 2000 {
outJxOrder.FreightPrice = 500 outJxOrder.FreightPrice = 500
} else { } else {
outJxOrder.FreightPrice = utils.Float64TwoInt64(500 + math.Ceil((utils.Int2Float64(outJxOrder.Weight)-2000)/1000)*200) outJxOrder.FreightPrice = utils.Float64TwoInt64(500 + math.Ceil((utils.Int2Float64(outJxOrder.Weight)-2000)/1000)*200)
} }
// } // }
} else { } else {
if outJxOrder.FreightPrice > specialFreightPrice { if outJxOrder.FreightPrice > specialFreightPrice {
@@ -836,9 +836,11 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) {
skus = append(skus, sku) skus = append(skus, sku)
} }
jxOrder.Skus = skus jxOrder.Skus = skus
globals.SugarLogger.Debugf("tryToSplitMatterOrder3,[%v]", utils.Format4Output(jxOrder, false))
outOrders, _, _ := tryToSplitMatterOrder(jxOrder) outOrders, _, _ := tryToSplitMatterOrder(jxOrder)
globals.SugarLogger.Debugf("tryToSplitMatterOrder,[%v]", utils.Format4Output(outOrders, false)) globals.SugarLogger.Debugf("tryToSplitMatterOrder2,[%v]", utils.Format4Output(outOrders, false))
for _, v := range outOrders { for _, v := range outOrders {
globals.SugarLogger.Debugf("tryToSplitMatterOrder4,[%v]", *v)
outJxOrder, deliveryAddress, err := generateOrder(jxcontext.AdminCtx, v, order.AddressID, order.FromStoreID) outJxOrder, deliveryAddress, err := generateOrder(jxcontext.AdminCtx, v, order.AddressID, order.FromStoreID)
if err != nil { if err != nil {
return err return err