|
|
@ -1,88 +1,39 @@
|
|
|
|
package au.com.royalpay.payment.manage.citypartner.core.impls;
|
|
|
|
package au.com.royalpay.payment.manage.citypartner.core.impls;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import java.util.zip.ZipEntry;
|
|
|
|
|
|
|
|
import java.util.zip.ZipOutputStream;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import javax.swing.plaf.basic.BasicScrollPaneUI;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFFont;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.util.HSSFColor;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.AgentCommissionAnalysis;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.AgentCommissionAnalysis;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerCommissionAnalysis;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerCommissionAnalysis;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.ReferrerCommissionAnalysis;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.ReferrerCommissionAnalysis;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService;
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialAgentCommissionDetailMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.*;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialAgentCommissionMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionDetailMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialReferrerCommissionDetailMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialReferrerCommissionMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialSeniorPartnerCommissionDetailMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialSeniorPartnerCommissionMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFFont;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.util.HSSFColor;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.Calendar;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.Collections;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by yixian on 2017-03-08.
|
|
|
|
* Created by yixian on 2017-03-08.
|
|
|
@ -476,6 +427,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
BigDecimal total_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal total_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal net_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal net_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal royalpay_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal royalpay_surage = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
BigDecimal transaction_fee = BigDecimal.ZERO;
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
String channel = oneChannel.getKey();
|
|
|
|
String channel = oneChannel.getKey();
|
|
|
|
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
|
|
|
|
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
|
|
|
@ -491,7 +443,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
for (JSONObject params : oneChannel.getValue()) {
|
|
|
|
for (JSONObject params : oneChannel.getValue()) {
|
|
|
|
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
|
|
|
|
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
|
|
|
|
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
|
|
|
|
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
|
|
|
|
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback"));
|
|
|
|
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")).subtract(params.getBigDecimal("transaction_fee"));
|
|
|
|
//增加货币判断
|
|
|
|
//增加货币判断
|
|
|
|
int i = currencyScale(params.getString("clearing_currency"));
|
|
|
|
int i = currencyScale(params.getString("clearing_currency"));
|
|
|
|
total = total.add(tmpClearingAmount);
|
|
|
|
total = total.add(tmpClearingAmount);
|
|
|
@ -499,11 +451,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP));
|
|
|
|
royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP));
|
|
|
|
// net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
|
|
|
|
// net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
|
|
|
|
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
|
|
|
|
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
|
|
|
|
|
|
|
|
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
BigDecimal org_charge = total_surage.subtract(royalpay_surage);
|
|
|
|
BigDecimal org_charge = total_surage.subtract(royalpay_surage);
|
|
|
|
json.put("channel", oneChannel.getKey());
|
|
|
|
json.put("channel", oneChannel.getKey());
|
|
|
|
json.put("gross_amount", total);
|
|
|
|
json.put("gross_amount", total);
|
|
|
|
json.put("total_charge", total_surage);
|
|
|
|
json.put("total_charge", total_surage);
|
|
|
|
|
|
|
|
json.put("transaction_fee", transaction_fee);
|
|
|
|
json.put("net_charge", net_surage);
|
|
|
|
json.put("net_charge", net_surage);
|
|
|
|
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
|
|
|
|
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
|
|
|
|
json.put("royalpay_charge", royalpay_surage);
|
|
|
|
json.put("royalpay_charge", royalpay_surage);
|
|
|
@ -525,6 +479,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
BigDecimal net_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal net_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal royalpay_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal royalpay_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal share_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal share_surage = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
BigDecimal transaction_fee = BigDecimal.ZERO;
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
String channel = oneChannel.getKey();
|
|
|
|
String channel = oneChannel.getKey();
|
|
|
|
|
|
|
|
|
|
|
@ -534,7 +489,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
for (JSONObject params : oneChannel.getValue()) {
|
|
|
|
for (JSONObject params : oneChannel.getValue()) {
|
|
|
|
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
|
|
|
|
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
|
|
|
|
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
|
|
|
|
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
|
|
|
|
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback"));
|
|
|
|
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")).subtract(params.getBigDecimal("transaction_fee"));
|
|
|
|
//增加货币判断
|
|
|
|
//增加货币判断
|
|
|
|
int i = currencyScale(params.getString("clearing_currency"));
|
|
|
|
int i = currencyScale(params.getString("clearing_currency"));
|
|
|
|
BigDecimal parent_surage = tmpClearingAmount.multiply(parentOrgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)).setScale(i, RoundingMode.HALF_UP);
|
|
|
|
BigDecimal parent_surage = tmpClearingAmount.multiply(parentOrgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)).setScale(i, RoundingMode.HALF_UP);
|
|
|
@ -545,6 +500,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
//net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
|
|
|
|
//net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
|
|
|
|
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
|
|
|
|
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
|
|
|
|
share_surage = share_surage.add(roy_surage.subtract(parent_surage)).setScale(i, RoundingMode.HALF_UP);
|
|
|
|
share_surage = share_surage.add(roy_surage.subtract(parent_surage)).setScale(i, RoundingMode.HALF_UP);
|
|
|
|
|
|
|
|
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
BigDecimal org_charge = total_surage.subtract(royalpay_surage);
|
|
|
|
BigDecimal org_charge = total_surage.subtract(royalpay_surage);
|
|
|
@ -556,6 +512,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
json.put("partner_charge", royalpay_surage);
|
|
|
|
json.put("partner_charge", royalpay_surage);
|
|
|
|
json.put("share_charge", share_surage);
|
|
|
|
json.put("share_charge", share_surage);
|
|
|
|
json.put("org_charge", org_charge);
|
|
|
|
json.put("org_charge", org_charge);
|
|
|
|
|
|
|
|
json.put("transaction_fee", transaction_fee);
|
|
|
|
json.put("commission_type", "1");
|
|
|
|
json.put("commission_type", "1");
|
|
|
|
json.put("create_time", new Date());
|
|
|
|
json.put("create_time", new Date());
|
|
|
|
amountByChannel.add(json);
|
|
|
|
amountByChannel.add(json);
|
|
|
@ -579,6 +536,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
BigDecimal total_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal total_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal net_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal net_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal royalpay_surage = BigDecimal.ZERO;
|
|
|
|
BigDecimal royalpay_surage = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
BigDecimal transaction_fee = BigDecimal.ZERO;
|
|
|
|
Date datefrom = new Date();
|
|
|
|
Date datefrom = new Date();
|
|
|
|
Date dateto = new Date();
|
|
|
|
Date dateto = new Date();
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
@ -617,6 +575,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP));
|
|
|
|
royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP));
|
|
|
|
//net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
|
|
|
|
//net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
|
|
|
|
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
|
|
|
|
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
|
|
|
|
|
|
|
|
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
BigDecimal org_charge = total_surage.subtract(royalpay_surage);
|
|
|
|
BigDecimal org_charge = total_surage.subtract(royalpay_surage);
|
|
|
|
if (channel.toLowerCase().equals("alipay_direct")) {
|
|
|
|
if (channel.toLowerCase().equals("alipay_direct")) {
|
|
|
@ -642,6 +601,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
json.put("org_net_charge", net_surage);
|
|
|
|
json.put("org_net_charge", net_surage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
json.put("org_charge", org_charge);
|
|
|
|
json.put("org_charge", org_charge);
|
|
|
|
|
|
|
|
json.put("transaction_fee", transaction_fee);
|
|
|
|
json.put("commission_type", "1");
|
|
|
|
json.put("commission_type", "1");
|
|
|
|
json.put("create_time", new Date());
|
|
|
|
json.put("create_time", new Date());
|
|
|
|
json.put("date_from", DateFormatUtils.format(datefrom, "yyyy-MM-dd"));
|
|
|
|
json.put("date_from", DateFormatUtils.format(datefrom, "yyyy-MM-dd"));
|
|
|
@ -825,6 +785,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
temp.put("total_charge", 0);
|
|
|
|
temp.put("total_charge", 0);
|
|
|
|
temp.put("royalpay_charge", 0);
|
|
|
|
temp.put("royalpay_charge", 0);
|
|
|
|
temp.put("org_charge", 0);
|
|
|
|
temp.put("org_charge", 0);
|
|
|
|
|
|
|
|
temp.put("transaction_fee", 0);
|
|
|
|
temp.put("share_charge", 0);
|
|
|
|
temp.put("share_charge", 0);
|
|
|
|
temp.put("channel", channel.getString("channel"));
|
|
|
|
temp.put("channel", channel.getString("channel"));
|
|
|
|
temp.put("net_charge", 0);
|
|
|
|
temp.put("net_charge", 0);
|
|
|
@ -839,28 +800,8 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
|
|
|
|
mineCommission.put("share_charge", mineCommission.getBigDecimal("share_charge").subtract(channel.getBigDecimal("share_charge")));
|
|
|
|
mineCommission.put("share_charge", mineCommission.getBigDecimal("share_charge").subtract(channel.getBigDecimal("share_charge")));
|
|
|
|
financialPartnerCommissionMapper.update(mineCommission);
|
|
|
|
financialPartnerCommissionMapper.update(mineCommission);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
channel.put("month", month);
|
|
|
|
|
|
|
|
channel.put("year", year);
|
|
|
|
|
|
|
|
channel.put("org_id", orgId);
|
|
|
|
|
|
|
|
//撤销agent表
|
|
|
|
|
|
|
|
// financialAgentCommissionMapper.save(channel);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//撤销agent表
|
|
|
|
|
|
|
|
// Map<Integer, List<JSONObject>> groupByClientMap = transactionDetail.stream().collect(Collectors.groupingBy(e -> e.getInteger("client_id")));
|
|
|
|
|
|
|
|
// for (Map.Entry<Integer, List<JSONObject>> oneClient : groupByClientMap.entrySet()) {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// JSONObject org = orgMapper.findOne(oneClient.getValue().get(0).getInteger("org_id"));
|
|
|
|
|
|
|
|
// Map<String, List<JSONObject>> groupByChannel = oneClient.getValue().stream().collect(Collectors.groupingBy(e -> e.getString("channel")));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// List<JSONObject> clientChannelAmount = clientChannelAmount(oneClient.getKey(),org, groupByChannel, channelCharge,year,month,2);
|
|
|
|
|
|
|
|
// for (JSONObject channel : clientChannelAmount) {
|
|
|
|
|
|
|
|
// financialAgentCommissionDetailMapper.save(channel);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|