Commit cd7e8d90 by 杨树贤

修复问题

parent d7953134
......@@ -568,6 +568,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
if len(sku.LadderPrice) == 0 {
return sku
}
//判断场地是否是美国,是美国的话,输出关税率以及转换价格
//https://cf.ichunt.net/pages/viewpage.action?pageId=35326045
usLabelList := []string{
......@@ -578,7 +579,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
usSupplierIdList := []int{
6,
19,
//7,
7,
1675,
}
//先判断供应商对不对
......@@ -591,12 +592,18 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X 2.25
var transformedLadderPrice []model.LadderPrice
transformedLadderPrice = sku.LadderPrice
for index, price := range sku.LadderPrice {
transformedLadderPrice[index].PriceCn = c.MyRound(c.MulFloat(price.PriceCn,2.25),4)
transformedLadderPrice[index].PriceAc = c.MyRound(c.MulFloat(price.PriceAc,2.25),4)
//digikey暂时不处理
if sku.SupplierId != 7 {
for index, price := range sku.LadderPrice {
transformedLadderPrice[index].PriceCn = c.MyRound(c.MulFloat(price.PriceCn, 2.25), 4)
transformedLadderPrice[index].PriceAc = c.MyRound(c.MulFloat(price.PriceAc, 2.25), 4)
}
}
sku.Tariff = 2.25
sku.TariffFormat = "125%"
} else {
sku.Coo = ""
}
return sku
......
......@@ -707,7 +707,7 @@ func (ps *PriceService) TransformSpecialSupplierPrice(sku model.LySku) model.LyS
//这里面还要判断,如果是usToCn为true代表也要走美金转人民币的逻辑(前提是没有人民币价格)
if price.PriceCn == 0 && usToCn == true {
rmbRatio, _ := redis.Float64(redisCon.Do("HGET", "erp_rate", currency))
priceCn := c.MyRound(c.MulFloat(priceUs, rmbRatio), 4)
priceCn := c.MyRound(c.MulFloat(priceUs, rmbRatio, 1.13), 4)
sku.LadderPrice[index].PriceCn = priceCn
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment