| 
						
						
							
								
							
						
						
					 | 
					@ -18,7 +18,6 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.HttpClientManager; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.HttpClientManager; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.constant.DataSourceConstant; | 
					 | 
					 | 
					import com.epmet.dataaggre.constant.DataSourceConstant; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -829,15 +828,7 @@ public class GovOrgServiceImpl implements GovOrgService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return; | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //3.生成多sheet页excel文件并写入数据导出文件
 | 
					 | 
					 | 
					        //3.生成多sheet页excel文件并写入数据导出文件
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<Map<String,Object>> headerList = new ArrayList<>(); | 
					 | 
					 | 
					        List<Map<String,Object>> headerList = getHeaderList(formDTO,agencyInfo,resultDTO); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        String titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"网格活跃度统计表"); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getLivelyExcelList(), titleName, "各街镇网格运行情况", GridLivelyExcel.class)); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"活跃网格明细"); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getLivelyGrid(), titleName, "活跃网格统计", GridLivelyDetailExcel.LivelyGrid.class)); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"正常运行网格明细"); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getOrdinaryGrid(), titleName, "正常运行网格统计", GridLivelyDetailExcel.OrdinaryGrid.class)); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"僵尸网格明细"); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getLazyGrid(), titleName, "僵尸网格统计", GridLivelyDetailExcel.LazyGrid.class)); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        try { | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Workbook workbook = ExcelExportUtil.exportExcel(headerList, ExcelType.XSSF); | 
					 | 
					 | 
					            Workbook workbook = ExcelExportUtil.exportExcel(headerList, ExcelType.XSSF); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            response.setCharacterEncoding("UTF-8"); | 
					 | 
					 | 
					            response.setCharacterEncoding("UTF-8"); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -852,6 +843,20 @@ public class GovOrgServiceImpl implements GovOrgService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.error("网格活跃度导出失败", e); | 
					 | 
					 | 
					            log.error("网格活跃度导出失败", e); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private List<Map<String, Object>> getHeaderList(GridLivelyFormDTO formDTO, AgencyInfoCache agencyInfo,GridLivelyDetailExcel resultDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        List<Map<String,Object>> headerList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        String titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"网格活跃度统计表"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getLivelyExcelList(), titleName, "各街镇网格运行情况", GridLivelyExcel.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"活跃网格明细"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getLivelyGrid(), titleName, "活跃网格统计", GridLivelyDetailExcel.LivelyGrid.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"正常运行网格明细"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getOrdinaryGrid(), titleName, "正常运行网格统计", GridLivelyDetailExcel.OrdinaryGrid.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        titleName = excelTitleName(formDTO.getStartTime(), formDTO.getEndTime(), agencyInfo.getOrganizationName()+"僵尸网格明细"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        headerList.add(getHaderMap(resultDTO.getLazyGrid(), titleName, "僵尸网格统计", GridLivelyDetailExcel.LazyGrid.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return headerList; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Author sun | 
					 | 
					 | 
					     * @Author sun | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * data 业务数据集合 | 
					 | 
					 | 
					     * data 业务数据集合 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -902,25 +907,38 @@ public class GovOrgServiceImpl implements GovOrgService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     **/ | 
					 | 
					 | 
					     **/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void pcworkRecordListExportSendMsg(GridLivelyFormDTO formDTO) { | 
					 | 
					 | 
					    public void pcworkRecordListExportSendMsg(GridLivelyFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<GridLivelyExcel> data = ConvertUtils.sourceToTarget(grdiLively(formDTO), GridLivelyExcel.class); | 
					 | 
					 | 
					        /*List<GridLivelyExcel> data = ConvertUtils.sourceToTarget(grdiLively(formDTO), GridLivelyExcel.class); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        if(CollectionUtils.isEmpty(data)){ | 
					 | 
					 | 
					        if(CollectionUtils.isEmpty(data)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.warn(String.format("网格员活跃度统计数据查询为空,入参【%s】", JSON.toJSONString(formDTO))); | 
					 | 
					 | 
					            log.warn(String.format("网格员活跃度统计数据查询为空,入参【%s】", JSON.toJSONString(formDTO))); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return; | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ExportParams exportParams = new ExportParams(); | 
					 | 
					 | 
					        ExportParams exportParams = new ExportParams(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String sheetName = excelSheetName(formDTO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        exportParams.setSheetName(sheetName); | 
					 | 
					 | 
					        exportParams.setSheetName(sheetName); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, | 
					 | 
					 | 
					        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                GridLivelyExcel.class, data); | 
					 | 
					 | 
					                GridLivelyExcel.class, data);*/ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					        //1.获取当前组织缓存信息
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(formDTO.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null == agencyInfo) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            throw new RenException(String.format("获取组织缓存信息失败%s", formDTO.getAgencyId())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        //2.查询网格活跃度数据
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        GridLivelyDetailExcel resultDTO = gridActiveList(formDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null == resultDTO || CollectionUtils.isEmpty(resultDTO.getLivelyExcelList())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            log.warn(String.format("网格员活跃度统计数据为空,入参【%s】", JSON.toJSONString(formDTO))); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        //3.生成多sheet页excel文件并写入数据导出文件
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        List<Map<String,Object>> headerList = getHeaderList(formDTO,agencyInfo,resultDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 文件名
 | 
					 | 
					 | 
					        // 文件名
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String resultDescFileName = sheetName.concat(".xls"); | 
					 | 
					 | 
					        String sheetName = excelSheetName(formDTO); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        String resultDescFileName = sheetName.concat(".xlsx"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        FileItemFactory factory = new DiskFileItemFactory(16, null); | 
					 | 
					 | 
					        FileItemFactory factory = new DiskFileItemFactory(16, null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, resultDescFileName); | 
					 | 
					 | 
					        FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, resultDescFileName); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        OutputStream os = null; | 
					 | 
					 | 
					        OutputStream os = null; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<UploadImgResultDTO> uploadResult = null; | 
					 | 
					 | 
					        Result<UploadImgResultDTO> uploadResult = null; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        try { | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            Workbook workbook = ExcelExportUtil.exportExcel(headerList, ExcelType.XSSF); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            os = fileItem.getOutputStream(); | 
					 | 
					 | 
					            os = fileItem.getOutputStream(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            workbook.write(os); | 
					 | 
					 | 
					            workbook.write(os); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            uploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); | 
					 | 
					 | 
					            uploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -946,17 +964,18 @@ public class GovOrgServiceImpl implements GovOrgService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.warn("【网格活跃度统计】调用OSS上传结果描述文件失败"); | 
					 | 
					 | 
					            log.warn("【网格活跃度统计】调用OSS上传结果描述文件失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } else { | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //EPMETV3群机器人
 | 
					 | 
					 | 
					            //EPMETV3群机器人
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            String secret = DingDingRobotConstant.V3_ROBOT_SECRET; | 
					 | 
					 | 
					            // String secret = DingDingRobotConstant.V3_ROBOT_SECRET;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            String url = DingDingRobotConstant.V3_ROBOT_URL; | 
					 | 
					 | 
					            // String url = DingDingRobotConstant.V3_ROBOT_URL;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            // String secret = DingDingRobotConstant.YZM_TEST_SECRET;
 | 
					 | 
					 | 
					            String secret = DingDingRobotConstant.YZM_TEST_SECRET; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            // String url = DingDingRobotConstant.YZM_TEST_URL;
 | 
					 | 
					 | 
					            String url = DingDingRobotConstant.YZM_TEST_URL; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            DingTextBriefNessFormDTO dingTalkTextMsg=new DingTextBriefNessFormDTO(); | 
					 | 
					 | 
					            DingTextBriefNessFormDTO dingTalkTextMsg=new DingTextBriefNessFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dingTalkTextMsg.setMsgtype("text"); | 
					 | 
					 | 
					            dingTalkTextMsg.setMsgtype("text"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //小雷哥手机号:18660295251,
 | 
					 | 
					 | 
					            //小雷哥手机号:18660295251,
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); | 
					 | 
					 | 
					            OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            at.setAtMobiles(Arrays.asList("18660295251")); | 
					 | 
					 | 
					            // at.setAtMobiles(Arrays.asList("18660295251"));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            at.setAtMobiles(Arrays.asList("15764229697")); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            at.setIsAtAll(false); | 
					 | 
					 | 
					            at.setIsAtAll(false); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dingTalkTextMsg.setAt(at); | 
					 | 
					 | 
					            dingTalkTextMsg.setAt(at); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -965,7 +984,7 @@ public class GovOrgServiceImpl implements GovOrgService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            text.setContent("网格活跃度统计: \n" + | 
					 | 
					 | 
					            text.setContent("网格活跃度统计: \n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    "起止时间: " + formDTO.getStartTime().concat(StrConstant.UNDER_LINE).concat(formDTO.getEndTime()) + "\n" + | 
					 | 
					 | 
					                    "起止时间: " + formDTO.getStartTime().concat(StrConstant.UNDER_LINE).concat(formDTO.getEndTime()) + "\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    "文件下载地址: " + uploadResult.getData().getUrl() + "\n"+ | 
					 | 
					 | 
					                    "文件下载地址: " + uploadResult.getData().getUrl() + "\n"+ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    "请查收@18660295251"); | 
					 | 
					 | 
					                    "请查收@15764229697"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            dingTalkTextMsg.setText(text); | 
					 | 
					 | 
					            dingTalkTextMsg.setText(text); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(dingTalkTextMsg), url, secret); | 
					 | 
					 | 
					            HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(dingTalkTextMsg), url, secret); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |