diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html
index b7089a71..233a4c27 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html
@@ -90,7 +90,7 @@
搜索
重置
导出
-
+ 根据自定义时间导出执法监督码使用情况
@@ -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)
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
index 86609e7c..21deffa3 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
@@ -133,38 +133,8 @@
-
-
-
年年度检查计划排行(TOP10)
+
年年度检查计划排行(TOP10)
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
index 22803e88..b69ae6d8 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
+++ b/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;idictDataList=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);
}
ListjdDictDataList=iDictDataService.selectDictDataByType(dictData.getDictValue());//有序->街道
for(DictData jd:jdDictDataList){