获取营业数据测试
This commit is contained in:
@@ -651,7 +651,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
if len(skuList) > 0 {
|
if len(skuList) > 0 {
|
||||||
flagVendorOrderID = skuList[0].VendorOrderID
|
flagVendorOrderID = skuList[0].VendorOrderID
|
||||||
}
|
}
|
||||||
for _, v := range skuList {
|
for k, v := range skuList {
|
||||||
if v.EarningPrice == 0 {
|
if v.EarningPrice == 0 {
|
||||||
v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, v.PayPercentage)
|
v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, v.PayPercentage)
|
||||||
}
|
}
|
||||||
@@ -675,7 +675,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
||||||
// saleInfo.EarningPrice += v.EarningPrice * int64(v.Count)
|
// saleInfo.EarningPrice += v.EarningPrice * int64(v.Count)
|
||||||
if v.VendorOrderID == flagVendorOrderID {
|
if v.VendorOrderID == flagVendorOrderID {
|
||||||
if len(skuList) == 1 {
|
if k == 0 {
|
||||||
saleInfo.EarningPrice = v.NewEarningPrice
|
saleInfo.EarningPrice = v.NewEarningPrice
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -733,7 +733,6 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
order.VendorPrice += orderSku.VendorPrice * int64(v.Count)
|
order.VendorPrice += orderSku.VendorPrice * int64(v.Count)
|
||||||
order.SalePrice += orderSku.SalePrice * int64(v.Count)
|
order.SalePrice += orderSku.SalePrice * int64(v.Count)
|
||||||
order.EarningPrice += orderSku.EarningPrice * int64(v.Count)
|
order.EarningPrice += orderSku.EarningPrice * int64(v.Count)
|
||||||
globals.SugarLogger.Debugf("GetStoresOrderSaleInfoNew", utils.Format4Output(order, false))
|
|
||||||
} else {
|
} else {
|
||||||
// globals.SugarLogger.Debug(utils.Format4Output(v, true))
|
// globals.SugarLogger.Debug(utils.Format4Output(v, true))
|
||||||
}
|
}
|
||||||
@@ -757,7 +756,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
saleInfo.ShopPrice += v.ShopPrice
|
saleInfo.ShopPrice += v.ShopPrice
|
||||||
saleInfo.VendorPrice += v.VendorPrice
|
saleInfo.VendorPrice += v.VendorPrice
|
||||||
saleInfo.SalePrice += v.SalePrice
|
saleInfo.SalePrice += v.SalePrice
|
||||||
// saleInfo.EarningPrice += v.EarningPrice
|
saleInfo.EarningPrice += v.EarningPrice
|
||||||
saleInfo.Count++
|
saleInfo.Count++
|
||||||
}
|
}
|
||||||
for _, v := range saleInfoMap {
|
for _, v := range saleInfoMap {
|
||||||
|
|||||||
Reference in New Issue
Block a user