use of com.kendy.excel.ExportTeamhsExcel in project financial by greatkendy123.
the class MoneyService method exportTeamhsExcel.
/**
*********************** 导出团队回水表Excel ***********************************
*/
public static void exportTeamhsExcel() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String title = "回水表" + sdf.format(new Date());
log.info("导出团队回水表Excel:" + title);
String[] rowsName = new String[] { "团队ID", "团队名字", "比例", "保险比例", "股东", "战绩是否代管理", "备注", "回水比例", "回保比例", "服务费判定" };
List<Object[]> dataList = new ArrayList<Object[]>();
Object[] objs = null;
Map<String, Huishui> huishuiMap = DataConstans.huishuiMap;
String teamId;
Huishui hs;
for (Map.Entry<String, Huishui> entry : huishuiMap.entrySet()) {
teamId = entry.getKey();
hs = entry.getValue();
objs = new Object[rowsName.length];
objs[0] = teamId;
objs[1] = hs.getTeamName();
objs[2] = NumUtil.getPercentStr(NumUtil.getNum(NumUtil.digit4(hs.getHuishuiRate())));
objs[3] = NumUtil.getPercentStr(NumUtil.getNum(NumUtil.digit4(hs.getInsuranceRate())));
objs[4] = hs.getGudong();
objs[5] = hs.getZjManaged();
// "回水比例","回保比例","服务费判定","服务费判定"
objs[6] = hs.getBeizhu();
objs[7] = hs.getProxyHSRate();
objs[8] = hs.getProxyHBRate();
objs[9] = hs.getProxyFWF();
dataList.add(objs);
}
String out = "D:/" + title;
ExportTeamhsExcel ex = new ExportTeamhsExcel(title, rowsName, dataList, out);
try {
ex.export();
log.debug("导出回水表Excel成功");
} catch (Exception e) {
ErrorUtil.err("导出回水表Excel失败", e);
}
}
Aggregations