master
wangning 8 years ago
parent ea18e38234
commit 7a5a6276ac

@ -22,6 +22,7 @@ public class CityPartnerCommissionAnalysis {
private BigDecimal rate; private BigDecimal rate;
private BigDecimal orgRate; private BigDecimal orgRate;
private String channel; private String channel;
private int commissionType;
private Map<Integer, List<JSONObject>> clientAnalysis = new HashMap<>(); private Map<Integer, List<JSONObject>> clientAnalysis = new HashMap<>();
private BigDecimal totalGrossAmount = BigDecimal.ZERO; private BigDecimal totalGrossAmount = BigDecimal.ZERO;
private BigDecimal totalChargeSum = BigDecimal.ZERO; private BigDecimal totalChargeSum = BigDecimal.ZERO;
@ -30,12 +31,13 @@ public class CityPartnerCommissionAnalysis {
private BigDecimal totalnetCharge = BigDecimal.ZERO; private BigDecimal totalnetCharge = BigDecimal.ZERO;
public CityPartnerCommissionAnalysis(int orgId, int year, int month, BigDecimal rate, String channel, BigDecimal alipayChargeRate, public CityPartnerCommissionAnalysis(int orgId, int year, int month, BigDecimal rate, String channel, BigDecimal alipayChargeRate,
BigDecimal wechatChargeRate, BigDecimal jdChargeRate, BigDecimal alipayonlineChargeRate, BigDecimal orgRate) { BigDecimal wechatChargeRate, BigDecimal jdChargeRate, BigDecimal alipayonlineChargeRate, BigDecimal orgRate,int commissionType) {
this.orgId = orgId; this.orgId = orgId;
this.year = year; this.year = year;
this.month = month; this.month = month;
this.rate = rate; this.rate = rate;
this.channel = channel; this.channel = channel;
this.commissionType = commissionType;
this.alipayChargeRate = alipayChargeRate; this.alipayChargeRate = alipayChargeRate;
this.wechatChargeRate = wechatChargeRate; this.wechatChargeRate = wechatChargeRate;
this.jdChargeRate = jdChargeRate; this.jdChargeRate = jdChargeRate;
@ -114,6 +116,7 @@ public class CityPartnerCommissionAnalysis {
item.put("org_charge", orgCharge); item.put("org_charge", orgCharge);
item.put("channel", channel); item.put("channel", channel);
item.put("net_charge", netCharge); item.put("net_charge", netCharge);
item.put("commission_type",commissionType);
clientTrades.add(item); clientTrades.add(item);
return this; return this;
} }
@ -131,6 +134,7 @@ public class CityPartnerCommissionAnalysis {
result.put("org_charge", totalOrgChargeSum); result.put("org_charge", totalOrgChargeSum);
result.put("net_charge", totalnetCharge); result.put("net_charge", totalnetCharge);
result.put("channel", channel); result.put("channel", channel);
result.put("commission_type",commissionType);
return result; return result;
} }

@ -290,7 +290,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
CityPartnerCommissionAnalysis orgAnalysis = results.get(orgId + channel); CityPartnerCommissionAnalysis orgAnalysis = results.get(orgId + channel);
if (orgAnalysis == null) { if (orgAnalysis == null) {
orgAnalysis = new CityPartnerCommissionAnalysis(orgId, year, month, org.getBigDecimal(channel + "_rate_value"), key, alipayChargeRate, orgAnalysis = new CityPartnerCommissionAnalysis(orgId, year, month, org.getBigDecimal(channel + "_rate_value"), key, alipayChargeRate,
wechatChargeRate, jdChargeRate, alipayonlineChargeRate,org.getBigDecimal("rate_value")); wechatChargeRate, jdChargeRate, alipayonlineChargeRate,org.getBigDecimal("rate_value"),org.getIntValue("commission_type"));
results.put(orgId + channel, orgAnalysis); results.put(orgId + channel, orgAnalysis);
} }
orgAnalysis.calculator(analysisDay, channel,org.getIntValue("commission_type")); orgAnalysis.calculator(analysisDay, channel,org.getIntValue("commission_type"));

Loading…
Cancel
Save