|
|
|
@ -69,6 +69,7 @@ public class CityPartnerPrizeController {
|
|
|
|
|
BigDecimal royalpayCharge = BigDecimal.ZERO;
|
|
|
|
|
BigDecimal orgCharge = BigDecimal.ZERO;
|
|
|
|
|
BigDecimal netCharge = BigDecimal.ZERO;
|
|
|
|
|
BigDecimal shareCharge = BigDecimal.ZERO;
|
|
|
|
|
String cityPartnerName = "";
|
|
|
|
|
int org_id = 0;
|
|
|
|
|
int type = 1;
|
|
|
|
@ -76,6 +77,7 @@ public class CityPartnerPrizeController {
|
|
|
|
|
grossAmount = grossAmount.add(jsonObject.getBigDecimal("gross_amount"));
|
|
|
|
|
totalCharge = totalCharge.add(jsonObject.getBigDecimal("total_charge"));
|
|
|
|
|
royalpayCharge = royalpayCharge.add(jsonObject.getBigDecimal("royalpay_charge"));
|
|
|
|
|
shareCharge = shareCharge.add(jsonObject.getBigDecimal("share_charge"));
|
|
|
|
|
orgCharge = orgCharge.add(jsonObject.getBigDecimal("org_charge"));
|
|
|
|
|
if (jsonObject.getBigDecimal("net_charge") != null) {
|
|
|
|
|
netCharge = netCharge.add(jsonObject.getBigDecimal("net_charge"));
|
|
|
|
@ -84,10 +86,14 @@ public class CityPartnerPrizeController {
|
|
|
|
|
cityPartnerName = jsonObject.getString("name");
|
|
|
|
|
type = jsonObject.getIntValue("commission_type");
|
|
|
|
|
}
|
|
|
|
|
if (entry.getValue().get(0).get("parent_org_id") != null) {
|
|
|
|
|
sumResult.put("org_type", "agent");
|
|
|
|
|
}
|
|
|
|
|
sumResult.put("gross_amount", grossAmount);
|
|
|
|
|
sumResult.put("total_charge", totalCharge);
|
|
|
|
|
sumResult.put("royalpay_charge", royalpayCharge);
|
|
|
|
|
sumResult.put("org_charge", orgCharge);
|
|
|
|
|
sumResult.put("share_charge", shareCharge);
|
|
|
|
|
sumResult.put("org_name", cityPartnerName);
|
|
|
|
|
sumResult.put("org_id", org_id);
|
|
|
|
|
sumResult.put("net_charge", netCharge);
|
|
|
|
@ -95,7 +101,13 @@ public class CityPartnerPrizeController {
|
|
|
|
|
sumResult.put("channel_detail", entry.getValue());
|
|
|
|
|
resultTotalCharge = resultTotalCharge.add(totalCharge);
|
|
|
|
|
resultRoyalpayCharge = resultRoyalpayCharge.add(royalpayCharge);
|
|
|
|
|
if ("agent".equals(sumResult.getString("org_type"))) {
|
|
|
|
|
resultRoyalpayCharge = resultRoyalpayCharge.add(shareCharge);
|
|
|
|
|
}
|
|
|
|
|
resultOrgCharge = resultOrgCharge.add(orgCharge);
|
|
|
|
|
if (!"agent".equals(sumResult.getString("org_type"))) {
|
|
|
|
|
resultOrgCharge = resultOrgCharge.add(shareCharge);
|
|
|
|
|
}
|
|
|
|
|
resultNetCharge = resultNetCharge.add(netCharge);
|
|
|
|
|
partnerInfos.add(sumResult);
|
|
|
|
|
}
|
|
|
|
|