物料下单终极
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||||
@@ -598,8 +599,8 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) {
|
|||||||
if order.FromStoreID != 0 {
|
if order.FromStoreID != 0 {
|
||||||
var (
|
var (
|
||||||
goodsNos []string
|
goodsNos []string
|
||||||
prices []float64
|
prices []string
|
||||||
quantities []int
|
quantities []string
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
err = changeOrderStatus(order.VendorOrderID, model.OrderStatusDelivering, "")
|
err = changeOrderStatus(order.VendorOrderID, model.OrderStatusDelivering, "")
|
||||||
@@ -613,8 +614,8 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
goodsNos = append(goodsNos, skus[0].EclpID)
|
goodsNos = append(goodsNos, skus[0].EclpID)
|
||||||
prices = append(prices, 0.00)
|
prices = append(prices, "0")
|
||||||
quantities = append(quantities, v.Count)
|
quantities = append(quantities, utils.Int2Str(v.Count))
|
||||||
}
|
}
|
||||||
result, err := api.JdEclpAPI.AddOrder(&jdeclpapi.AddOrderParam{
|
result, err := api.JdEclpAPI.AddOrder(&jdeclpapi.AddOrderParam{
|
||||||
IsvUUID: order.VendorOrderID,
|
IsvUUID: order.VendorOrderID,
|
||||||
@@ -628,9 +629,9 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) {
|
|||||||
ConsigneeMobile: order.ConsigneeMobile,
|
ConsigneeMobile: order.ConsigneeMobile,
|
||||||
ConsigneeAddress: order.ConsigneeAddress,
|
ConsigneeAddress: order.ConsigneeAddress,
|
||||||
OrderMark: jdeclpapi.OrderMark,
|
OrderMark: jdeclpapi.OrderMark,
|
||||||
GoodsNo: goodsNos,
|
IsvGoodsNo: strings.Join(goodsNos, ","),
|
||||||
Price: prices,
|
Price: strings.Join(prices, ","),
|
||||||
Quantity: quantities,
|
Quantity: strings.Join(quantities, ","),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user