Browse Source

统计修改

v4
zouyx 2 years ago
parent
commit
1a1e0edb0e
  1. 10
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html
  2. 32
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  3. 39
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  4. 20
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/DeptStaticController.java
  5. 20
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java
  6. 21
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
  7. 20
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java
  8. 20
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java
  9. 21
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  10. 23
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticsEnterpriseServiceImpl.java

10
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html

@ -90,7 +90,7 @@
<a class="btn btn-success btn-sm" onclick="search1()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="resetR()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-sm" onclick="downloadR()"><i class="fa fa-share-square-o"></i> 导出</a>
<!--<a class="btn btn-warning btn-sm" onclick="downloadzf1()"><i class="fa fa-share-square-o"></i> 根据自定义时间导出执法监督码使用情况</a>-->
<a class="btn btn-warning btn-sm" onclick="downloadzf1()"><i class="fa fa-share-square-o"></i> 根据自定义时间导出执法监督码使用情况</a>
</li>
<!--<a class="btn btn-warning btn-sm" onclick="download2()"><i class="fa fa-share-square-o"></i> 导出企业信息</a>-->
</ul>
@ -458,6 +458,12 @@
params.endTime=now.getFullYear()+"-"+(now.getMonth()+1)+"-"+now.getDate();
}
console.log(params);
let beginDate=new Date(params.beginTime);
let endDate=new Date(params.endTime);
console.log(beginDate);
console.log(endDate);
let beginName=beginDate.getFullYear()+"年"+(beginDate.getMonth()+1)+"月"+beginDate.getDate()+"日";
let endName=endDate.getFullYear()+"年"+(endDate.getMonth()+1)+"月"+endDate.getDate()+"日";
$.ajax({
type: "POST",
contentType: 'application/json',
@ -470,7 +476,7 @@
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "执法监督码"+params.beginTime+"至"+params.endTime+"使用情况.xls");
link.setAttribute('download', "执法监督码"+beginName+"至"+endName+"使用情况.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)

32
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html

@ -133,38 +133,8 @@
</ul>
</div>
</form>
<!--<div class="tab_cont">
<div class="listhead">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
<colgroup>
<col width="60%"/>
<col width="25%"/>
</colgroup>
<tr class="trodd">
<th>行政检查部门</th>
<th>行政检查案件数量</th>
</tr>
</table>
</div>
<div class="listbody">
<div class="inner">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
<colgroup>
<col width="60%"/>
<col width="25%"/>
</colgroup>
<tbody id="echartRingTable"></tbody>
</table>
</div>
</div>
</div>
<div class="chartbox" id="echartRing"></div>-->
<!--<div class="chart-box">
<h3 class="chart-title">2024年检查计划总数量排行(TOP10)</h3>
<div class="echarts" id="echars1"></div>
</div>-->
<div class="chart-box" style="float: none">
<h3 class="chart-title"><span id="echarts1-title" class="chart-title"></span>年年度检查计划排行(TOP10)</h3>
<h3><span id="echarts1-title" class="chart-title"></span>年年度检查计划排行(TOP10)</h3>
<div class="echarts" id="echars2"></div>
</div>
<div class="chart-box">

39
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java

@ -13,6 +13,7 @@ import com.zdxt.common.zdxtFile.ZdxtFileCommon;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.DictData;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -150,6 +151,24 @@ public class ComplaintStaticController extends BaseController {
HSSFSheet sheet = workbook.createSheet("执法投诉统计");
//设置文件名称
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 = {"被投诉对象", "投诉数量"};
HSSFRow headerRow = sheet.createRow(0);
@ -157,6 +176,7 @@ public class ComplaintStaticController extends BaseController {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<complaintStatisticsList.size();i++){
HSSFRow row = sheet.createRow(i+1);
@ -181,6 +201,24 @@ public class ComplaintStaticController extends BaseController {
HSSFSheet sheet = workbook.createSheet("投诉类型统计");
//设置文件名称
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 = {"企业类型", "企业数量", "占比"};
HSSFRow headerRow = sheet.createRow(0);
@ -188,6 +226,7 @@ public class ComplaintStaticController extends BaseController {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<statisticsIndicatorList.size();i++){
HSSFRow row = sheet.createRow(i+1);

20
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/DeptStaticController.java

@ -16,6 +16,7 @@ import com.zdxt.common.util.TableDataInfo;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.User;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -127,6 +128,24 @@ public class DeptStaticController extends BaseController {
HSSFSheet sheet = workbook.createSheet("部门统计");
//设置文件名称
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 = {"部门名称", "执法人员", "执法证号", "联系方式"};
HSSFRow headerRow = sheet.createRow(0);
@ -134,6 +153,7 @@ public class DeptStaticController extends BaseController {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<zfryjdm2405301List.size();i++){
HSSFRow row = sheet.createRow(i+1);

20
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java

@ -14,6 +14,7 @@ import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.ExcelUtils;
import com.zdxt.common.util.TableDataInfo;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -144,6 +145,24 @@ public class EnforcementInspectionProgramController extends BaseController
HSSFSheet sheet = workbook.createSheet("检查计划统计");
//设置文件名称
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 = {"执法部门", "年度计划", "季度计划", "月度计划"};
HSSFRow headerRow = sheet.createRow(0);
@ -151,6 +170,7 @@ public class EnforcementInspectionProgramController extends BaseController
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<enforcementInspectionProgramDtos.size();i++){
HSSFRow row = sheet.createRow(i+1);

21
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -28,7 +28,7 @@ import com.zdxt.common.util.TableDataInfo;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.DictData;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -665,6 +665,24 @@ public class EnforcementRegistrationController extends BaseController
HSSFSheet sheet = workbook.createSheet("执法分析");
//设置文件名称
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 = {"区域", "街道", "企业名称","执法部门", "执法人员", "检查事项","检查次数", "2次及以下", "3至4次(黄色)", "5至6次(橙色)" ,"7次及以上(红色)"};
HSSFRow headerRow = sheet.createRow(0);
@ -672,6 +690,7 @@ public class EnforcementRegistrationController extends BaseController
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<enforcementRegistrationDtos.size();i++){
HSSFRow row = sheet.createRow(i+1);

20
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java

@ -8,6 +8,7 @@ import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.IdCardCryptoUtil;
import com.zdxt.domain.auth.DictData;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -338,6 +339,24 @@ public class StatisticsEnterpriseController extends BaseController {
HSSFSheet sheet = workbook.createSheet("企业类型统计");
//设置文件名称
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 = {"企业类型", "企业数量", "占比"};
HSSFRow headerRow = sheet.createRow(0);
@ -345,6 +364,7 @@ public class StatisticsEnterpriseController extends BaseController {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<statisticsIndicatorList.size();i++){
HSSFRow row = sheet.createRow(i+1);

20
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java

@ -8,6 +8,7 @@ import com.zdxt.code.service.ILawEnforcementWarningListService;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -111,6 +112,24 @@ public class StatisticsWarningController extends BaseController {
HSSFSheet sheet = workbook.createSheet("执法预警统计");
//设置文件名称
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 = {"执法部门", "预警时段", "预警次数"};
HSSFRow headerRow = sheet.createRow(0);
@ -118,6 +137,7 @@ public class StatisticsWarningController extends BaseController {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<lawEnforcementWarningListList.size();i++){
HSSFRow row = sheet.createRow(i+1);

21
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -29,7 +29,7 @@ import com.zdxt.common.zdxtFile.FilePreviewUtilBean;
import com.zdxt.common.zdxtFile.ZdxtFileCommon;
import com.zdxt.domain.auth.DictData;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zdxt.code.mapper.EnforcementRegistrationMapper;
@ -741,6 +741,24 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
HSSFSheet sheet = workbook.createSheet("执法检查统计");
//设置文件名称
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 = {"区域", "街道", "执法部门", "执法人员","企业名称","检查事项","联合检查","行政检查类别","是否扫码","未扫码原因","是否投诉","检查时间"};
HSSFRow headerRow = sheet.createRow(0);
@ -748,6 +766,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
HSSFCellStyle dateStyle= workbook.createCellStyle();
HSSFDataFormat cellDataFormat= workbook.createDataFormat();;

23
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticsEnterpriseServiceImpl.java

@ -9,6 +9,7 @@ import com.zdxt.code.service.IEnterpriseInformationService;
import com.zdxt.code.service.StatisticsEnterpriseService;
import com.zdxt.domain.auth.DictData;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -27,11 +28,30 @@ public class StatisticsEnterpriseServiceImpl implements StatisticsEnterpriseServ
private EnterpriseInformationMapper enterpriseInformationMapper;
@Override
public void qyAllList(HttpServletResponse response, SearchType searchType) throws IOException {
//设置文件名称
String fileName = "企业数量统计.xls";
HSSFWorkbook workbook = new HSSFWorkbook();
//全市页
HSSFSheet sheet1 = workbook.createSheet("全市");
//自适应列宽
sheet1.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 = {"区域", "企业数量", "续存企业数量","注销企业数量"};
int qyRowNum=0;
@ -41,6 +61,7 @@ public class StatisticsEnterpriseServiceImpl implements StatisticsEnterpriseServ
HSSFCell headerCell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
headerCell.setCellValue(text);
headerCell.setCellStyle(styleRow2);
}
//数据处理
List<DictData>dictDataList=iDictDataService.selectDictDataByType("address_type");//有序->区
@ -65,6 +86,7 @@ public class StatisticsEnterpriseServiceImpl implements StatisticsEnterpriseServ
qyRowNum++;
//街道页
HSSFSheet sheet = workbook.createSheet(qyName);
sheet.setDefaultColumnWidth(20);//全局
//设置表头
String[] hList = {"区域", "街道", "企业数量", "续存企业数量","注销企业数量"};
int jdRowNum=0;
@ -74,6 +96,7 @@ public class StatisticsEnterpriseServiceImpl implements StatisticsEnterpriseServ
HSSFCell hCell = hRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(hList[i]);
hCell.setCellValue(text);
hCell.setCellStyle(styleRow2);
}
List<DictData>jdDictDataList=iDictDataService.selectDictDataByType(dictData.getDictValue());//有序->街道
for(DictData jd:jdDictDataList){

Loading…
Cancel
Save