|
|
@ -36,7 +36,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
for (int t=0;t<cellList.size();t++){ |
|
|
for (int t=0;t<cellList.size();t++){ |
|
|
HSSFCell cell= row.createCell(t); |
|
|
HSSFCell cell= row.createCell(t); |
|
|
cell.setCellValue(cellList.get(t)); |
|
|
cell.setCellValue(cellList.get(t)); |
|
|
System.out.println(cellList.get(t)); |
|
|
//System.out.println(cellList.get(t));
|
|
|
cell.setCellStyle(styleRow3); |
|
|
cell.setCellStyle(styleRow3); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -87,6 +87,11 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
return enterpriseStreetMapper.selectEnterpriseName(enterpriseStreet); |
|
|
return enterpriseStreetMapper.selectEnterpriseName(enterpriseStreet); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<EnforcementCheckStatistics> selectAllStatisticsList(EnforcementCheckStatistics enforcementCheckStatistics) { |
|
|
|
|
|
return enforcementCheckStatisticsMapper.selectAllStatisticsList(enforcementCheckStatistics); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
*导出excel |
|
|
*导出excel |
|
|
@ -113,8 +118,8 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
font2.setBold(true); |
|
|
font2.setBold(true); |
|
|
font2.setFontHeightInPoints((short) 11); |
|
|
font2.setFontHeightInPoints((short) 11); |
|
|
HSSFFont font3=wb.createFont(); |
|
|
HSSFFont font3=wb.createFont(); |
|
|
font2.setFontName("微软雅黑"); |
|
|
font3.setFontName("微软雅黑"); |
|
|
font2.setFontHeightInPoints((short) 11); |
|
|
font3.setFontHeightInPoints((short) 11); |
|
|
//第一行样式
|
|
|
//第一行样式
|
|
|
HSSFCellStyle styleRow1=wb.createCellStyle(); |
|
|
HSSFCellStyle styleRow1=wb.createCellStyle(); |
|
|
styleRow1.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
|
styleRow1.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
|
@ -166,7 +171,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
//遍历地区list
|
|
|
//遍历地区list
|
|
|
for(int i=0;i<inOrderList.size();i++){ |
|
|
for(int i=0;i<inOrderList.size();i++){ |
|
|
String area=inOrderList.get(i);//取出地区名
|
|
|
String area=inOrderList.get(i);//取出地区名
|
|
|
if(list.get(area)!=null){//判断该区执法记录是否为空
|
|
|
if((list.get(area)!=null) && (!list.get(area).isEmpty())){//判断该区执法记录是否为空
|
|
|
List<EnforcementCheckStatistics> e=list.get(area); |
|
|
List<EnforcementCheckStatistics> e=list.get(area); |
|
|
if(e.size()>1){//当该区执法记录大于两条时才合并序号、区列
|
|
|
if(e.size()>1){//当该区执法记录大于两条时才合并序号、区列
|
|
|
sheet.addMergedRegion(new CellRangeAddress(rowNum+1, rowNum+e.size(),0,0)); |
|
|
sheet.addMergedRegion(new CellRangeAddress(rowNum+1, rowNum+e.size(),0,0)); |
|
|
@ -201,10 +206,10 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
hbStyle(rowNum+1, (int) (rowNum+qyGroup1.get(k)),9,9,sheet); |
|
|
hbStyle(rowNum+1, (int) (rowNum+qyGroup1.get(k)),9,9,sheet); |
|
|
hbStyle(rowNum+1, (int) (rowNum+qyGroup1.get(k)),10,10,sheet); |
|
|
hbStyle(rowNum+1, (int) (rowNum+qyGroup1.get(k)),10,10,sheet); |
|
|
//以同企业内,以执法分组
|
|
|
//以同企业内,以执法分组
|
|
|
Map<String, Long> zfGroup1 = qyGroup2.get(k).stream().collect(Collectors.groupingBy((m -> m.getDeptName()== null ? |
|
|
Map<String, Long> zfGroup1 = qyGroup2.get(k).stream().collect(Collectors.groupingBy((m -> m.getBureauDeptId()== null ? |
|
|
"" : m.getDeptName()), Collectors.counting())); |
|
|
"" : m.getBureauDeptId()), Collectors.counting())); |
|
|
Map<String, List<EnforcementCheckStatistics>> zfGroup2 = qyGroup2.get(k).stream().collect(Collectors.groupingBy(m -> m.getDeptName()== null ? |
|
|
Map<String, List<EnforcementCheckStatistics>> zfGroup2 = qyGroup2.get(k).stream().collect(Collectors.groupingBy(m -> m.getBureauDeptId()== null ? |
|
|
"" : m.getDeptName())); |
|
|
"" : m.getBureauDeptId())); |
|
|
for (String zf : zfGroup2.keySet()) { |
|
|
for (String zf : zfGroup2.keySet()) { |
|
|
//if 分组数<2则后续无需遍历
|
|
|
//if 分组数<2则后续无需遍历
|
|
|
if(zfGroup1.get(zf)<2){ |
|
|
if(zfGroup1.get(zf)<2){ |
|
|
@ -324,7 +329,7 @@ public class EnforcementCheckStatisticsImpl implements EnforcementCheckStatistic |
|
|
"坪山区","光明区","大鹏新区","深汕特别合作区","其他"); |
|
|
"坪山区","光明区","大鹏新区","深汕特别合作区","其他"); |
|
|
Map<String, List<EnterpriseStreet>> map1=enterpriseStreet.stream().collect(Collectors.groupingBy(item->(inOrderList2.contains(item.getEnterpriseAddress().substring(3,6))?item.getEnterpriseAddress().substring(3,6):"其他"))); |
|
|
Map<String, List<EnterpriseStreet>> map1=enterpriseStreet.stream().collect(Collectors.groupingBy(item->(inOrderList2.contains(item.getEnterpriseAddress().substring(3,6))?item.getEnterpriseAddress().substring(3,6):"其他"))); |
|
|
//List<EnterpriseStreet> es1= (List<EnterpriseStreet>) map1.get("其他").stream().filter(item->item.getEnterpriseAddress().substring(3,10).equals("深汕特别合作区"));
|
|
|
//List<EnterpriseStreet> es1= (List<EnterpriseStreet>) map1.get("其他").stream().filter(item->item.getEnterpriseAddress().substring(3,10).equals("深汕特别合作区"));
|
|
|
System.out.println("第317行:"+map1.get("其他")); |
|
|
//System.out.println("第317行:"+map1.get("其他"));
|
|
|
List<EnterpriseStreet> es1= map1.get("其他").stream().filter(item->item.getEnterpriseAddress().substring(3,10).equals("深汕特别合作区")).collect(Collectors.toList()); |
|
|
List<EnterpriseStreet> es1= map1.get("其他").stream().filter(item->item.getEnterpriseAddress().substring(3,10).equals("深汕特别合作区")).collect(Collectors.toList()); |
|
|
map1.put("深汕特别合作区",es1); |
|
|
map1.put("深汕特别合作区",es1); |
|
|
//List<EnterpriseStreet> es2= (List<EnterpriseStreet>) map1.get("其他").stream().filter(item->item.getEnterpriseAddress().substring(3,7).equals("大鹏新区"));
|
|
|
//List<EnterpriseStreet> es2= (List<EnterpriseStreet>) map1.get("其他").stream().filter(item->item.getEnterpriseAddress().substring(3,7).equals("大鹏新区"));
|
|
|
|