|
|
|
@ -314,7 +314,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
//创建HSSFWorkbook对象(excel文档对象)
|
|
|
|
HSSFWorkbook wb=new HSSFWorkbook(); |
|
|
|
//建立新的sheet对象(sheet:表单)
|
|
|
|
HSSFSheet sheet= wb.createSheet("行政执法检查统计"); |
|
|
|
HSSFSheet sheet= wb.createSheet("行政执法统计"); |
|
|
|
//自适应列宽
|
|
|
|
sheet.setDefaultColumnWidth(20);//全局
|
|
|
|
sheet.setColumnWidth(0,2500);//某列
|
|
|
|
@ -378,7 +378,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
String strStart=sMonther.format(simpleDateFormat.parse(enforcementCheckStatistics.getStartTime()))+"月"+sDay.format(simpleDateFormat.parse(enforcementCheckStatistics.getStartTime()))+"日"; |
|
|
|
String strEnd=sMonther.format(simpleDateFormat.parse(enforcementCheckStatistics.getEndTime()))+"月"+sDay.format(simpleDateFormat.parse(enforcementCheckStatistics.getEndTime()))+"日"; |
|
|
|
String strNow=sYear.format(enforcementCheckStatistics.getNowTime())+"年"+sMonther.format(enforcementCheckStatistics.getNowTime())+"月"+sDay.format(enforcementCheckStatistics.getNowTime())+"日 "+enforcementCheckStatistics.getNowTime().getHours()+"时"+enforcementCheckStatistics.getNowTime().getMinutes()+"分"; |
|
|
|
cell1.setCellValue("深圳市涉企行政检查登记情况\n(统计范围:"+strStart+"至"+strEnd+" 统计时间:"+strNow+")"); |
|
|
|
cell1.setCellValue("深圳市涉企行政登记情况\n(统计范围:"+strStart+"至"+strEnd+" 统计时间:"+strNow+")"); |
|
|
|
//将单元格样式应用到该单元格
|
|
|
|
cell1.setCellStyle(styleRow1); |
|
|
|
//合并单元格--CellRangeAddress(起始行,结束行,起始列,结束列)
|
|
|
|
@ -387,7 +387,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
HSSFRow row2=sheet.createRow(1); |
|
|
|
|
|
|
|
List<String> headRow2List=new ArrayList<>(); |
|
|
|
Collections.addAll(headRow2List,"序号","区域","企业","执法主体","执法人员","检查事项","检查时间","执法检查次数", |
|
|
|
Collections.addAll(headRow2List,"序号","区域","企业","执法主体","执法人员","执法事项","执法时间","执法次数", |
|
|
|
"2次及以下","3至4次","5至6次","7次及以上","备注"); |
|
|
|
setStyle(headRow2List,row2,styleRow2); |
|
|
|
int rowNum=1; |
|
|
|
@ -2216,7 +2216,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
//创建HSSFWorkbook对象(excel文档对象)
|
|
|
|
HSSFWorkbook wb=new HSSFWorkbook(); |
|
|
|
//建立新的sheet对象(sheet:表单)
|
|
|
|
HSSFSheet sheet= wb.createSheet("行政执法检查统计"); |
|
|
|
HSSFSheet sheet= wb.createSheet("行政执法统计"); |
|
|
|
//自适应列宽
|
|
|
|
sheet.setColumnWidth(0,1442);//某列
|
|
|
|
sheet.setColumnWidth(1,2256); |
|
|
|
@ -2329,7 +2329,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
System.out.println(localDate1.getMonth()); |
|
|
|
} |
|
|
|
String strNow=sYear.format(enforcementCheckStatistics.getNowTime())+"年"+sMonther.format(enforcementCheckStatistics.getNowTime())+"月"+sDay.format(enforcementCheckStatistics.getNowTime())+"日 "+enforcementCheckStatistics.getNowTime().getHours()+"时"+enforcementCheckStatistics.getNowTime().getMinutes()+"分"; |
|
|
|
cell1.setCellValue("深圳市涉企行政检查登记情况\n(统计范围:"+strStart+"至"+strEnd+" 统计时间:"+strNow+")"); |
|
|
|
cell1.setCellValue("深圳市涉企行政登记情况\n(统计范围:"+strStart+"至"+strEnd+" 统计时间:"+strNow+")"); |
|
|
|
//将单元格样式应用到该单元格
|
|
|
|
cell1.setCellStyle(styleRow1); |
|
|
|
//合并单元格--CellRangeAddress(起始行,结束行,起始列,结束列)
|
|
|
|
@ -2338,7 +2338,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
HSSFRow row2=sheet.createRow(1); |
|
|
|
|
|
|
|
List<String> headRow2List=new ArrayList<>(); |
|
|
|
Collections.addAll(headRow2List,"序号","区域","企业","执法主体","执法人员","检查事项","检查时间","检查次数", |
|
|
|
Collections.addAll(headRow2List,"序号","区域","企业","执法主体","执法人员","执法事项","执法时间","执法次数", |
|
|
|
"2次及以下","3至4次","5至6次","7次及以上","备注"); |
|
|
|
setStyle(headRow2List,row2,styleRow2); |
|
|
|
int rowNum=1; |
|
|
|
@ -2544,8 +2544,8 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
|
setStyle(cellList,row,styleRow3); |
|
|
|
} |
|
|
|
} |
|
|
|
//表名:深圳市涉企行政检查登记情况(xxxx年xx月xx日至xxxx年xx月xx日)
|
|
|
|
String fileName="深圳市涉企行政检查登记情况("+strStart+"至"+strEnd+").xls"; |
|
|
|
//表名:深圳市涉企行政登记情况(xxxx年xx月xx日至xxxx年xx月xx日)
|
|
|
|
String fileName="深圳市涉企行政登记情况("+strStart+"至"+strEnd+").xls"; |
|
|
|
fileName = URLEncoder.encode(fileName, "UTF-8"); |
|
|
|
response.setCharacterEncoding("UTF-8"); |
|
|
|
response.setContentType("application/vnd.ms-excel"); |
|
|
|
|