Commit 066fe8c5 authored by 张永's avatar 张永

111

parent b0ae4832
...@@ -236,11 +236,17 @@ public class CartQueryServiceImpl implements CartQueryService { ...@@ -236,11 +236,17 @@ public class CartQueryServiceImpl implements CartQueryService {
BigDecimal unitSum = BigDecimal.ZERO; BigDecimal unitSum = BigDecimal.ZERO;
for(Object goodsId : goodsIdList) { for(Object goodsId : goodsIdList) {
Map<String, Object> goodsMap = gmm.get(goodsId); Map<String, Object> goodsMap = gmm.get(goodsId);
System.out.println(GsonUtil.toJson(goodsMap)); logger.info(GsonUtil.toJson(goodsMap));
Integer nTag = (Integer) goodsMap.get("nTag"); Integer nTag = (Integer) goodsMap.get("nTag");
if((nTag&2048) == 0) { if((nTag&2048) == 0) {
BigDecimal orderUnit = (BigDecimal)goodsMap.get("orderUnit"); BigDecimal orderUnit ;
if(goodsMap.get("orderUnit") == null) {
orderUnit = (BigDecimal)goodsMap.get("orderUnit");
orderUnit = orderUnit == null ? BigDecimal.ONE : orderUnit; orderUnit = orderUnit == null ? BigDecimal.ONE : orderUnit;
}else {
orderUnit = BigDecimal.ONE;
}
BigDecimal saleQty = (BigDecimal)goodsMap.get("saleQty"); BigDecimal saleQty = (BigDecimal)goodsMap.get("saleQty");
unitSum = unitSum.add(saleQty.divide(orderUnit, 0, BigDecimal.ROUND_UP)); unitSum = unitSum.add(saleQty.divide(orderUnit, 0, BigDecimal.ROUND_UP));
} }
......
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