Commit 581cb1f3 authored by Quxl's avatar Quxl

x

parent a78c844f
......@@ -62,15 +62,18 @@ public class PromoController {
List<Map<String, Object>> list = service.getGroupGoodsDetail(orgNo, shopNo, promoPaperNO, promoGroupNO);
BigDecimal nTotalRealAmount = BigDecimal.ZERO;
BigDecimal nTotalPayAmount = BigDecimal.ZERO;
BigDecimal nTotalQty = BigDecimal.ZERO;
for(Map<String, Object> map : list) {
BigDecimal nMeetQty = (BigDecimal)map.get("nMeetQty");
BigDecimal nRealSalePrice = (BigDecimal)map.get("nRealSalePrice");
BigDecimal nDisPrice = (BigDecimal)map.get("nDisPrice");
nTotalRealAmount = nTotalRealAmount.add(nMeetQty.multiply(nRealSalePrice));
nTotalPayAmount = nTotalPayAmount.add(nMeetQty.multiply(nDisPrice));
nTotalQty = nTotalQty.add(nMeetQty);
}
promoMap.put("nTotalRealAmount", nTotalRealAmount);
promoMap.put("nTotalPayAmount", nTotalPayAmount);
promoMap.put("nTotalQty", nTotalQty);
List<Map<String, Object>> DLPicList = service.getGroupPicList("DL", promoPaperNO, promoGroupNO);
List<Map<String, Object>> BNPicList = service.getGroupPicList("BN", promoPaperNO, promoGroupNO);
return Rjx.jsonOk().set("data", promoMap).set("list", list).set("DLPicList", DLPicList).set("BNPicList", BNPicList).toJson();
......
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