|
|
@ -13,6 +13,7 @@ import com.zdxt.common.zdxtFile.ZdxtFileCommon; |
|
|
import com.zdxt.domain.auth.Dept; |
|
|
import com.zdxt.domain.auth.Dept; |
|
|
import com.zdxt.domain.auth.DictData; |
|
|
import com.zdxt.domain.auth.DictData; |
|
|
import org.apache.poi.hssf.usermodel.*; |
|
|
import org.apache.poi.hssf.usermodel.*; |
|
|
|
|
|
import org.apache.poi.ss.usermodel.*; |
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Controller; |
|
|
import org.springframework.stereotype.Controller; |
|
|
@ -150,6 +151,24 @@ public class ComplaintStaticController extends BaseController { |
|
|
HSSFSheet sheet = workbook.createSheet("执法投诉统计"); |
|
|
HSSFSheet sheet = workbook.createSheet("执法投诉统计"); |
|
|
//设置文件名称
|
|
|
//设置文件名称
|
|
|
String fileName = "执法投诉统计.xls"; |
|
|
String fileName = "执法投诉统计.xls"; |
|
|
|
|
|
//自适应列宽
|
|
|
|
|
|
sheet.setDefaultColumnWidth(20);//全局
|
|
|
|
|
|
//表头样式
|
|
|
|
|
|
HSSFFont font2=workbook.createFont(); |
|
|
|
|
|
font2.setFontName("微软雅黑"); |
|
|
|
|
|
font2.setBold(true); |
|
|
|
|
|
font2.setFontHeightInPoints((short) 11); |
|
|
|
|
|
HSSFCellStyle styleRow2=workbook.createCellStyle(); |
|
|
|
|
|
styleRow2.setWrapText(true);//换行
|
|
|
|
|
|
styleRow2.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
|
|
|
|
styleRow2.setFillPattern(FillPatternType.SOLID_FOREGROUND); |
|
|
|
|
|
styleRow2.setAlignment(HorizontalAlignment.CENTER); |
|
|
|
|
|
styleRow2.setVerticalAlignment(VerticalAlignment.CENTER); |
|
|
|
|
|
styleRow2.setBorderTop(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setBorderRight(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setBorderBottom(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setBorderLeft(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setFont(font2); |
|
|
//设置表头
|
|
|
//设置表头
|
|
|
String[] headerList = {"被投诉对象", "投诉数量"}; |
|
|
String[] headerList = {"被投诉对象", "投诉数量"}; |
|
|
HSSFRow headerRow = sheet.createRow(0); |
|
|
HSSFRow headerRow = sheet.createRow(0); |
|
|
@ -157,6 +176,7 @@ public class ComplaintStaticController extends BaseController { |
|
|
HSSFCell cell = headerRow.createCell(i); |
|
|
HSSFCell cell = headerRow.createCell(i); |
|
|
HSSFRichTextString text = new HSSFRichTextString(headerList[i]); |
|
|
HSSFRichTextString text = new HSSFRichTextString(headerList[i]); |
|
|
cell.setCellValue(text); |
|
|
cell.setCellValue(text); |
|
|
|
|
|
cell.setCellStyle(styleRow2); |
|
|
} |
|
|
} |
|
|
for(int i=0;i<complaintStatisticsList.size();i++){ |
|
|
for(int i=0;i<complaintStatisticsList.size();i++){ |
|
|
HSSFRow row = sheet.createRow(i+1); |
|
|
HSSFRow row = sheet.createRow(i+1); |
|
|
@ -181,6 +201,24 @@ public class ComplaintStaticController extends BaseController { |
|
|
HSSFSheet sheet = workbook.createSheet("投诉类型统计"); |
|
|
HSSFSheet sheet = workbook.createSheet("投诉类型统计"); |
|
|
//设置文件名称
|
|
|
//设置文件名称
|
|
|
String fileName = "投诉类型统计.xls"; |
|
|
String fileName = "投诉类型统计.xls"; |
|
|
|
|
|
//自适应列宽
|
|
|
|
|
|
sheet.setDefaultColumnWidth(20);//全局
|
|
|
|
|
|
//表头样式
|
|
|
|
|
|
HSSFFont font2=workbook.createFont(); |
|
|
|
|
|
font2.setFontName("微软雅黑"); |
|
|
|
|
|
font2.setBold(true); |
|
|
|
|
|
font2.setFontHeightInPoints((short) 11); |
|
|
|
|
|
HSSFCellStyle styleRow2=workbook.createCellStyle(); |
|
|
|
|
|
styleRow2.setWrapText(true);//换行
|
|
|
|
|
|
styleRow2.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
|
|
|
|
styleRow2.setFillPattern(FillPatternType.SOLID_FOREGROUND); |
|
|
|
|
|
styleRow2.setAlignment(HorizontalAlignment.CENTER); |
|
|
|
|
|
styleRow2.setVerticalAlignment(VerticalAlignment.CENTER); |
|
|
|
|
|
styleRow2.setBorderTop(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setBorderRight(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setBorderBottom(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setBorderLeft(BorderStyle.THIN); |
|
|
|
|
|
styleRow2.setFont(font2); |
|
|
//设置表头
|
|
|
//设置表头
|
|
|
String[] headerList = {"企业类型", "企业数量", "占比"}; |
|
|
String[] headerList = {"企业类型", "企业数量", "占比"}; |
|
|
HSSFRow headerRow = sheet.createRow(0); |
|
|
HSSFRow headerRow = sheet.createRow(0); |
|
|
@ -188,6 +226,7 @@ public class ComplaintStaticController extends BaseController { |
|
|
HSSFCell cell = headerRow.createCell(i); |
|
|
HSSFCell cell = headerRow.createCell(i); |
|
|
HSSFRichTextString text = new HSSFRichTextString(headerList[i]); |
|
|
HSSFRichTextString text = new HSSFRichTextString(headerList[i]); |
|
|
cell.setCellValue(text); |
|
|
cell.setCellValue(text); |
|
|
|
|
|
cell.setCellStyle(styleRow2); |
|
|
} |
|
|
} |
|
|
for(int i=0;i<statisticsIndicatorList.size();i++){ |
|
|
for(int i=0;i<statisticsIndicatorList.size();i++){ |
|
|
HSSFRow row = sheet.createRow(i+1); |
|
|
HSSFRow row = sheet.createRow(i+1); |
|
|
|