|
|
@ -89,15 +89,8 @@ public class BDPrizeCalculatorDefaultImpl implements BDPrizeCalculator {
|
|
|
|
log.put("total_amount", 0);
|
|
|
|
log.put("total_amount", 0);
|
|
|
|
log.put("total_prize", 0);
|
|
|
|
log.put("total_prize", 0);
|
|
|
|
log.put("total_donation", 0);
|
|
|
|
log.put("total_donation", 0);
|
|
|
|
BigDecimal totalAmount = log.getBigDecimal("total_amount");
|
|
|
|
BigDecimal totalAmount = bdTotalMap.get(bd.getString("bd_id"));
|
|
|
|
List<JSONObject> details = new ArrayList<>();
|
|
|
|
List<JSONObject> details = new ArrayList<>();
|
|
|
|
for (Map.Entry<String, JSONObject> detail : resultItem.getValue().entrySet()) {
|
|
|
|
|
|
|
|
JSONObject detailItem = detail.getValue();
|
|
|
|
|
|
|
|
BigDecimal totalTransaction = detailItem.getBigDecimal("total_transaction");
|
|
|
|
|
|
|
|
BigDecimal coefficient = detailItem.getBigDecimal("coefficient");
|
|
|
|
|
|
|
|
BigDecimal realTransaction = totalTransaction.multiply(coefficient).setScale(2,BigDecimal.ROUND_DOWN);
|
|
|
|
|
|
|
|
totalAmount = totalAmount.add(realTransaction);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (Map.Entry<String, JSONObject> detail : resultItem.getValue().entrySet()) {
|
|
|
|
for (Map.Entry<String, JSONObject> detail : resultItem.getValue().entrySet()) {
|
|
|
|
JSONObject detailItem = detail.getValue();
|
|
|
|
JSONObject detailItem = detail.getValue();
|
|
|
|
int clientId = detailItem.getIntValue("client_id");
|
|
|
|
int clientId = detailItem.getIntValue("client_id");
|
|
|
|