|
|
|
@ -5,12 +5,7 @@ import au.com.royalpay.payment.manage.bdprize.core.BDPrizeService;
|
|
|
|
|
import au.com.royalpay.payment.manage.bdprize.support.BDPrizeCalculator;
|
|
|
|
|
import au.com.royalpay.payment.manage.bdprize.support.impls.BDPrizeCalculatorDefaultImpl;
|
|
|
|
|
import au.com.royalpay.payment.manage.bdprize.support.impls.DefaultClientWithBDAwayDeterminor;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDCommissionConfigMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeDetailMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeLogMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeRecordMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDRateConfigMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
|
|
|
@ -27,6 +22,11 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
|
|
|
|
|
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.joda.time.DateTime;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
@ -44,6 +45,7 @@ import java.util.GregorianCalendar;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by yixian on 2017-02-07.
|
|
|
|
@ -74,6 +76,8 @@ public class BDPrizeServiceImpl implements BDPrizeService {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private FinancialBDCommissionConfigMapper financialBDCommissionConfigMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private FinancialLeaderPrizeLogMapper financialLeaderPrizeLogMapper;
|
|
|
|
|
|
|
|
|
|
@Value("${app.backup-app:false}")
|
|
|
|
|
private boolean backupSystem;
|
|
|
|
@ -239,54 +243,88 @@ public class BDPrizeServiceImpl implements BDPrizeService {
|
|
|
|
|
// cityPrizeLog.put("total_prize", total_prize);
|
|
|
|
|
// }
|
|
|
|
|
// report.put("cityPrizeLogs", cityPrizeLog);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> leaderPrizeLog = financialLeaderPrizeLogMapper.listLeaderPrizeLog(report.getString("record_id"));
|
|
|
|
|
if (leaderPrizeLog.size() > 0) {
|
|
|
|
|
for (JSONObject prizeLog : leaderPrizeLog) {
|
|
|
|
|
if (prizeLog.getIntValue("bd_type") == 3) {
|
|
|
|
|
report.put("sydneyPrizeLog", prizeLog);
|
|
|
|
|
}
|
|
|
|
|
if (prizeLog.getIntValue("bd_type") == 4) {
|
|
|
|
|
report.put("directPrizeLogs", prizeLog);
|
|
|
|
|
}
|
|
|
|
|
if (prizeLog.getIntValue("bd_type") == 5) {
|
|
|
|
|
report.put("ngDepartmentPrizeLog", prizeLog);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return report;
|
|
|
|
|
}
|
|
|
|
|
//bd_type=3 悉尼分公司经理 悉尼销售组和大客户组流水提成
|
|
|
|
|
|
|
|
|
|
JSONObject sydneyPrizeLog = new JSONObject();
|
|
|
|
|
BigDecimal sydneyAmount = transactionMapper.TotalAmountForSydneyGMPrize(monthDate.getYear(), monthDate.getMonthOfYear());
|
|
|
|
|
sydneyPrizeLog.put("total_amount",sydneyAmount);
|
|
|
|
|
JSONObject sydneyGMRate = financialBDCommissionConfigMapper.findCurrentCommissionRate(month, sydneyAmount.toString(), 3);
|
|
|
|
|
if (sydneyGMRate == null) {
|
|
|
|
|
sydneyPrizeLog.put("total_prize", 0.00);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal sydney_commission_rate = new BigDecimal(sydneyGMRate.getString("commission_rate"));
|
|
|
|
|
BigDecimal total_prize = sydneyAmount.multiply(sydney_commission_rate.divide(percent)).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
sydneyPrizeLog.put("total_prize", total_prize);
|
|
|
|
|
if (!locker.lock(report.getString("record_id"), 300_000)) {
|
|
|
|
|
throw new ServerErrorException("Processing task, wait for a moment");
|
|
|
|
|
}
|
|
|
|
|
report.put("sydneyPrizeLog", sydneyPrizeLog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//COO & NJ commission
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
params.put("begin", TimeZoneUtils.beginDate(TimeZoneUtils.getFirstDay(monthDate.toString())));
|
|
|
|
|
params.put("end", TimeZoneUtils.getPerFirstDayOfMonth(TimeZoneUtils.getLastDay(monthDate.toString())));
|
|
|
|
|
BigDecimal totalprize = transactionAnalysisMapper.analysisTotalAmount(params);
|
|
|
|
|
try {
|
|
|
|
|
List<JSONObject> prizeLogList = new ArrayList<>();
|
|
|
|
|
JSONObject sydneyPrizeLog = new JSONObject();
|
|
|
|
|
BigDecimal sydneyAmount = transactionMapper.TotalAmountForSydneyGMPrize(monthDate.getYear(), monthDate.getMonthOfYear());
|
|
|
|
|
sydneyPrizeLog.put("total_amount",sydneyAmount);
|
|
|
|
|
sydneyPrizeLog.put("bd_type", 3);
|
|
|
|
|
JSONObject sydneyGMRate = financialBDCommissionConfigMapper.findCurrentCommissionRate(month, sydneyAmount.toString(), 3);
|
|
|
|
|
if (sydneyGMRate == null) {
|
|
|
|
|
sydneyPrizeLog.put("total_prize", 0.00);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal sydney_commission_rate = new BigDecimal(sydneyGMRate.getString("commission_rate"));
|
|
|
|
|
BigDecimal total_prize = sydneyAmount.multiply(sydney_commission_rate.divide(percent)).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
sydneyPrizeLog.put("total_prize", total_prize);
|
|
|
|
|
}
|
|
|
|
|
report.put("sydneyPrizeLog", sydneyPrizeLog);
|
|
|
|
|
prizeLogList.add(sydneyPrizeLog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//COO & NJ commission
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
params.put("begin", TimeZoneUtils.beginDate(TimeZoneUtils.getFirstDay(monthDate.toString())));
|
|
|
|
|
params.put("end", TimeZoneUtils.getPerFirstDayOfMonth(TimeZoneUtils.getLastDay(monthDate.toString())));
|
|
|
|
|
BigDecimal totalprize = transactionAnalysisMapper.analysisTotalAmount(params);
|
|
|
|
|
|
|
|
|
|
JSONObject directPrizeLogs = new JSONObject();
|
|
|
|
|
directPrizeLogs.put("total_amount", totalprize);
|
|
|
|
|
directPrizeLogs.put("bd_type", 4);
|
|
|
|
|
JSONObject rate = financialBDCommissionConfigMapper.findCurrentCommissionRate(month, totalprize.toString(), 4);
|
|
|
|
|
if (rate == null) {
|
|
|
|
|
directPrizeLogs.put("total_prize", 0.00);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal _commission_rate = new BigDecimal(rate.getString("commission_rate"));
|
|
|
|
|
BigDecimal _total_amount = new BigDecimal(directPrizeLogs.getString("total_amount"));
|
|
|
|
|
BigDecimal total_prize = _total_amount.multiply(_commission_rate.divide(percent)).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
directPrizeLogs.put("total_prize", total_prize);
|
|
|
|
|
}
|
|
|
|
|
report.put("directPrizeLogs", directPrizeLogs);
|
|
|
|
|
prizeLogList.add(directPrizeLogs);
|
|
|
|
|
|
|
|
|
|
JSONObject ngDepartmentPrizeLog = new JSONObject();
|
|
|
|
|
ngDepartmentPrizeLog.put("total_amount", totalprize);
|
|
|
|
|
ngDepartmentPrizeLog.put("bd_type", 5);
|
|
|
|
|
JSONObject ngRate = financialBDCommissionConfigMapper.findCurrentCommissionRate(month, totalprize.toString(), 5);
|
|
|
|
|
if (ngRate == null) {
|
|
|
|
|
ngDepartmentPrizeLog.put("total_prize", 0.00);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal ng_commission_rate = new BigDecimal(ngRate.getString("commission_rate"));
|
|
|
|
|
BigDecimal ng_total_prize = totalprize.multiply(ng_commission_rate.divide(percent)).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
ngDepartmentPrizeLog.put("total_prize", ng_total_prize);
|
|
|
|
|
}
|
|
|
|
|
report.put("ngDepartmentPrizeLog", ngDepartmentPrizeLog);
|
|
|
|
|
prizeLogList.add(ngDepartmentPrizeLog);
|
|
|
|
|
|
|
|
|
|
JSONObject directPrizeLogs = new JSONObject();
|
|
|
|
|
directPrizeLogs.put("total_amount", totalprize);
|
|
|
|
|
JSONObject rate = financialBDCommissionConfigMapper.findCurrentCommissionRate(month, totalprize.toString(), 4);
|
|
|
|
|
if (rate == null) {
|
|
|
|
|
directPrizeLogs.put("total_prize", 0.00);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal _commission_rate = new BigDecimal(rate.getString("commission_rate"));
|
|
|
|
|
BigDecimal _total_amount = new BigDecimal(directPrizeLogs.getString("total_amount"));
|
|
|
|
|
BigDecimal total_prize = _total_amount.multiply(_commission_rate.divide(percent)).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
directPrizeLogs.put("total_prize", total_prize);
|
|
|
|
|
for (JSONObject prizeLog : prizeLogList) {
|
|
|
|
|
prizeLog.put("record_id", report.getString("record_id"));
|
|
|
|
|
prizeLog.put("create_time", new Date());
|
|
|
|
|
financialLeaderPrizeLogMapper.save(prizeLog);
|
|
|
|
|
}
|
|
|
|
|
return report;
|
|
|
|
|
} finally {
|
|
|
|
|
locker.unlock(report.getString("record_id"));
|
|
|
|
|
}
|
|
|
|
|
report.put("directPrizeLogs", directPrizeLogs);
|
|
|
|
|
|
|
|
|
|
JSONObject ngDepartmentPrizeLog = new JSONObject();
|
|
|
|
|
ngDepartmentPrizeLog.put("total_amount", totalprize);
|
|
|
|
|
JSONObject ngRate = financialBDCommissionConfigMapper.findCurrentCommissionRate(month, totalprize.toString(), 5);
|
|
|
|
|
if (ngRate == null) {
|
|
|
|
|
ngDepartmentPrizeLog.put("total_prize", 0.00);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal ng_commission_rate = new BigDecimal(ngRate.getString("commission_rate"));
|
|
|
|
|
BigDecimal ng_total_prize = totalprize.multiply(ng_commission_rate.divide(percent)).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
ngDepartmentPrizeLog.put("total_prize", ng_total_prize);
|
|
|
|
|
}
|
|
|
|
|
report.put("ngDepartmentPrizeLog", ngDepartmentPrizeLog);
|
|
|
|
|
return report;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -469,4 +507,136 @@ public class BDPrizeServiceImpl implements BDPrizeService {
|
|
|
|
|
financialBDConfigMapper.updateBDConfig(config);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void exportCommissionMonth(String month, HttpServletResponse resp) throws Exception {
|
|
|
|
|
OutputStream ous = null;
|
|
|
|
|
JSONObject report = findReport(month);
|
|
|
|
|
if (report != null) {
|
|
|
|
|
List<JSONObject> logs = (List<JSONObject>) report.get("logs");
|
|
|
|
|
resp.setContentType("application/octet-stream;");
|
|
|
|
|
resp.addHeader("Content-Disposition", "attachment; filename=" + "BD_Commission_Info_" + month + ".xls");
|
|
|
|
|
ous = resp.getOutputStream();
|
|
|
|
|
HSSFWorkbook wb = new HSSFWorkbook();
|
|
|
|
|
Cell cell = null;
|
|
|
|
|
HSSFFont font = wb.createFont();
|
|
|
|
|
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
|
|
|
|
|
font.setFontHeightInPoints((short) 10);
|
|
|
|
|
CellStyle titleStyle = wb.createCellStyle();
|
|
|
|
|
titleStyle.setFont(font);
|
|
|
|
|
HSSFCellStyle style = wb.createCellStyle();
|
|
|
|
|
//设置背景颜色
|
|
|
|
|
style.setFillForegroundColor(HSSFColor.RED.index);
|
|
|
|
|
//solid 填充 foreground 前景色
|
|
|
|
|
style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
|
|
|
|
|
Sheet sheet = wb.createSheet("BD_Commission_Info_" + month);
|
|
|
|
|
sheet.setDefaultColumnWidth(20);
|
|
|
|
|
int rowNum = 0;
|
|
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
|
|
//bd and manager
|
|
|
|
|
String[] BDTitle = {"BD Name","KPI", "BD Level", "Transaction Amount", "Total Commission","Send Commission", "Hold prize", "Prize Type"};
|
|
|
|
|
for (int i = 0; i < BDTitle.length; i++) {
|
|
|
|
|
cell = row.createCell(i, Cell.CELL_TYPE_STRING);
|
|
|
|
|
cell.setCellStyle(titleStyle);
|
|
|
|
|
cell.setCellValue(BDTitle[i]);
|
|
|
|
|
}
|
|
|
|
|
for (JSONObject log : logs) {
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(log.getString("bd_name"));
|
|
|
|
|
row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("kpi_amount")==null?BigDecimal.ZERO.toPlainString():log.getBigDecimal("kpi_amount").toPlainString());
|
|
|
|
|
row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(financialBdLevel(log.getIntValue("bd_level")));
|
|
|
|
|
row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("total_amount").toPlainString());
|
|
|
|
|
row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("total_prize").toPlainString());
|
|
|
|
|
row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("send_prize").toPlainString());
|
|
|
|
|
row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(log.getBigDecimal("hold_prize").toPlainString());
|
|
|
|
|
if (log.getIntValue("prize_type") == 0) {
|
|
|
|
|
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue("BD");
|
|
|
|
|
}
|
|
|
|
|
if (log.getIntValue("prize_type") == 1) {
|
|
|
|
|
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue("Group");
|
|
|
|
|
}
|
|
|
|
|
if (!log.getBoolean("is_valid")) {
|
|
|
|
|
for (int i = 0; i <= 7; i++) {
|
|
|
|
|
row.getCell(i).setCellStyle(style);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//analysis
|
|
|
|
|
String[] analysisTitle = {"month", "Total Commission", "Total Send", "Total Hold", "Total Fund"};
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
for (int i = 0; i < analysisTitle.length; i++) {
|
|
|
|
|
cell = row.createCell(i, Cell.CELL_TYPE_STRING);
|
|
|
|
|
cell.setCellStyle(titleStyle);
|
|
|
|
|
cell.setCellValue(analysisTitle[i]);
|
|
|
|
|
}
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(month);
|
|
|
|
|
row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(report.getBigDecimal("total_prize").toPlainString());
|
|
|
|
|
row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(report.getBigDecimal("total_send_prize").toPlainString());
|
|
|
|
|
row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(report.getBigDecimal("total_hold_prize").toPlainString());
|
|
|
|
|
row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(report.getBigDecimal("total_donation").toPlainString());
|
|
|
|
|
//channel
|
|
|
|
|
String[] channelTitle = {"channel", "BD Total Commission", "BD Total Send", "BD Total Hold", "BD Total Fund"};
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
for (int i = 0; i < channelTitle.length; i++) {
|
|
|
|
|
cell = row.createCell(i, Cell.CELL_TYPE_STRING);
|
|
|
|
|
cell.setCellStyle(titleStyle);
|
|
|
|
|
cell.setCellValue(channelTitle[i]);
|
|
|
|
|
}
|
|
|
|
|
for (String channel: channels) {
|
|
|
|
|
JSONObject channelReport = report.getJSONObject(channel + "Report");
|
|
|
|
|
if (channelReport != null) {
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(channel);
|
|
|
|
|
row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(channelReport.getBigDecimal("total_prize").toPlainString());
|
|
|
|
|
row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(channelReport.getBigDecimal("total_send_prize").toPlainString());
|
|
|
|
|
row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(channelReport.getBigDecimal("total_hold_prize").toPlainString());
|
|
|
|
|
row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(channelReport.getBigDecimal("total_donation").toPlainString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//Sydney GM & COO & NJ commission
|
|
|
|
|
String[] GMTitle = {"name", "Transaction Amount", "Total Commission"};
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
for (int i = 0; i < GMTitle.length; i++) {
|
|
|
|
|
cell = row.createCell(i, Cell.CELL_TYPE_STRING);
|
|
|
|
|
cell.setCellStyle(titleStyle);
|
|
|
|
|
cell.setCellValue(GMTitle[i]);
|
|
|
|
|
}
|
|
|
|
|
JSONObject sydneyPrizeLog = report.getJSONObject("sydneyPrizeLog");
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue("Sydney GM");
|
|
|
|
|
row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(sydneyPrizeLog.getBigDecimal("total_amount").toPlainString());
|
|
|
|
|
row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(sydneyPrizeLog.getBigDecimal("total_prize").toPlainString());
|
|
|
|
|
|
|
|
|
|
JSONObject ngDepartmentPrizeLog = report.getJSONObject("ngDepartmentPrizeLog");
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue("NJ Department");
|
|
|
|
|
row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(ngDepartmentPrizeLog.getBigDecimal("total_amount").toPlainString());
|
|
|
|
|
row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(ngDepartmentPrizeLog.getBigDecimal("total_prize").toPlainString());
|
|
|
|
|
|
|
|
|
|
JSONObject directPrizeLogs = report.getJSONObject("directPrizeLogs");
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue("COO");
|
|
|
|
|
row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(directPrizeLogs.getBigDecimal("total_amount").toPlainString());
|
|
|
|
|
row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(directPrizeLogs.getBigDecimal("total_prize").toPlainString());
|
|
|
|
|
|
|
|
|
|
wb.write(ous);
|
|
|
|
|
ous.flush();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String financialBdLevel (int level) {
|
|
|
|
|
switch (level) {
|
|
|
|
|
case 0:
|
|
|
|
|
return "Leader";
|
|
|
|
|
case 1:
|
|
|
|
|
return "Junior";
|
|
|
|
|
case 2:
|
|
|
|
|
return "Intermediate";
|
|
|
|
|
case 3:
|
|
|
|
|
return "Senior";
|
|
|
|
|
default:
|
|
|
|
|
return "Unknown";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|