Commit 811b3ce7 authored by Quxl's avatar Quxl

x

parent ac93bbc3
......@@ -375,7 +375,7 @@ public class GoodsServiceImpl implements GoodsService {
Map<String, Object> detail = jdbcTemplate.queryForMap(sql, contractNo, goodsId);
BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice");
BigDecimal nRealSalePrice = (BigDecimal)detail.get("nRealSalePrice");
BigDecimal nProfitMargin = nMarketPrice.subtract(nRealSalePrice).multiply(new BigDecimal(100)).divide(nRealSalePrice).setScale(2, BigDecimal.ROUND_UP);
BigDecimal nProfitMargin = nMarketPrice.subtract(nRealSalePrice).multiply(new BigDecimal(100)).divide(nRealSalePrice, 2, BigDecimal.ROUND_HALF_UP);
detail.put("nProfitMargin", nProfitMargin);
Map<String, List<Map<String, Object>>> picList = goodsPicList(goodsId, contractNo);
Rjx rjx = Rjx.jsonOk().set("goodsDetail", detail);
......
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 to comment