没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
/**
* 导出资讯统计数据
* @return
* @throws IOException
*/
@Action("/article/export-data")
public void exportData() throws IOException{
HSSFWorkbook workbook=null;
if (type>=1&&type<=3) {
List<Map<String, Object>> articles=articleService.findCustomerArticle(type);
List<Map<String, Object>>maps=new ArrayList<Map<String,Object>>();
for (int i = 0; i < articles.size(); i++) {//封装好评数据
Map<String, Object> map=new HashMap<String, Object>();
Category category=articleService.findCategoryById(Integer.parseInt(articles.get(i).get("category")+""));
map.put("category", category.getName());
map.put("cnt", ((Double.parseDouble(articles.get(i).get("cnt")+"")*100))+"%");
maps.add(map);
}
String nav=null;
if (type==1) {
nav="收藏种类,所点百分比";
}else if (type==2) {
nav="分享种类,所点百分比";
}else if (type==3) {
nav="好评种类,所点百分比";
}
String amount="category,cnt";
workbook=POIUtils.createN(nav.split(","), amount.split(","), maps);
}else if (type==0) {
* 导出资讯统计数据
* @return
* @throws IOException
*/
@Action("/article/export-data")
public void exportData() throws IOException{
HSSFWorkbook workbook=null;
if (type>=1&&type<=3) {
List<Map<String, Object>> articles=articleService.findCustomerArticle(type);
List<Map<String, Object>>maps=new ArrayList<Map<String,Object>>();
for (int i = 0; i < articles.size(); i++) {//封装好评数据
Map<String, Object> map=new HashMap<String, Object>();
Category category=articleService.findCategoryById(Integer.parseInt(articles.get(i).get("category")+""));
map.put("category", category.getName());
map.put("cnt", ((Double.parseDouble(articles.get(i).get("cnt")+"")*100))+"%");
maps.add(map);
}
String nav=null;
if (type==1) {
nav="收藏种类,所点百分比";
}else if (type==2) {
nav="分享种类,所点百分比";
}else if (type==3) {
nav="好评种类,所点百分比";
}
String amount="category,cnt";
workbook=POIUtils.createN(nav.split(","), amount.split(","), maps);
}else if (type==0) {
资源评论
猪弟
- 粉丝: 2
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功