物料下单终极

This commit is contained in:
苏尹岚
2020-03-09 16:27:27 +08:00
parent b8eda36d40
commit fd45eae813

View File

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