物料订单拆分测试输出
This commit is contained in:
@@ -836,21 +836,24 @@ 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("tryToSplitMatterOrder2,[%v]", utils.Format4Output(outOrders, false))
|
|
||||||
for _, v := range outOrders {
|
for _, v := range outOrders {
|
||||||
globals.SugarLogger.Debugf("tryToSplitMatterOrder4,[%v]", *v)
|
globals.SugarLogger.Debugf("tryToSplitMatterOrder6,[%v]", utils.Format4Output(v, false))
|
||||||
outJxOrder, deliveryAddress, err := generateOrder(jxcontext.AdminCtx, v, order.AddressID, order.FromStoreID)
|
outJxOrder, deliveryAddress, err := generateOrder(jxcontext.AdminCtx, v, order.AddressID, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
outJxOrder.OrderID = GenOrderNo(jxcontext.AdminCtx)
|
outJxOrder.OrderID = GenOrderNo(jxcontext.AdminCtx)
|
||||||
|
outJxOrder.FromStoreID = order.FromStoreID
|
||||||
|
globals.SugarLogger.Debugf("tryToSplitMatterOrder7,[%v]", utils.Format4Output(outJxOrder, false))
|
||||||
order2, err2 := jxOrder2GoodsOrder(jxcontext.AdminCtx, outJxOrder, deliveryAddress)
|
order2, err2 := jxOrder2GoodsOrder(jxcontext.AdminCtx, outJxOrder, deliveryAddress)
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
order2.AddressID = order.AddressID
|
order2.AddressID = order.AddressID
|
||||||
order2.Status = model.OrderStatusDelivering
|
order2.Status = model.OrderStatusDelivering
|
||||||
|
globals.SugarLogger.Debugf("tryToSplitMatterOrder8,[%v]", utils.Format4Output(order2, false))
|
||||||
partner.CurOrderManager.OnOrderNew(order2, model.Order2Status(order2))
|
partner.CurOrderManager.OnOrderNew(order2, model.Order2Status(order2))
|
||||||
|
} else {
|
||||||
|
globals.SugarLogger.Debugf("tryToSplitMatterOrder5,[%v]", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//刷新一下库存
|
//刷新一下库存
|
||||||
|
|||||||
Reference in New Issue
Block a user