|  |  | @ -1,5 +1,8 @@ | 
			
		
	
		
			
				
					|  |  |  | package com.epmet.service.impl; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.excel.EasyExcel; | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.excel.ExcelWriter; | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.excel.write.metadata.WriteSheet; | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.fastjson.JSON; | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.rocketmq.messages.ProjectChangedMQMsg; | 
			
		
	
	
		
			
				
					|  |  | @ -19,10 +22,7 @@ import com.epmet.commons.tools.scan.param.TextTaskDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.scan.result.SyncScanResult; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.dto.TokenDto; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.user.LoginUserUtil; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.IpUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ScanContentUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constant.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.ProjectOrgRelationDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.ProjectProcessAttachmentDao; | 
			
		
	
	
		
			
				
					|  |  | @ -34,6 +34,7 @@ import com.epmet.dto.ProjectStaffDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.excel.ApprovaledListExcel; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.send.SendMqMsgUtil; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.*; | 
			
		
	
	
		
			
				
					|  |  | @ -51,6 +52,7 @@ import org.springframework.web.context.request.RequestContextHolder; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.web.context.request.ServletRequestAttributes; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import javax.servlet.http.HttpServletRequest; | 
			
		
	
		
			
				
					|  |  |  | import javax.servlet.http.HttpServletResponse; | 
			
		
	
		
			
				
					|  |  |  | import java.util.*; | 
			
		
	
		
			
				
					|  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -935,6 +937,42 @@ public class ProjectTraceServiceImpl<ProjectTagService> implements ProjectTraceS | 
			
		
	
		
			
				
					|  |  |  | 		return result; | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
		
			
				
					|  |  |  | 	 * 【网格员工作统计】项目列表导出 | 
			
		
	
		
			
				
					|  |  |  | 	 * | 
			
		
	
		
			
				
					|  |  |  | 	 * @param formDTO | 
			
		
	
		
			
				
					|  |  |  | 	 * @Param formDTO | 
			
		
	
		
			
				
					|  |  |  | 	 * @Return {@link PageData< ApprovaledListResultDTO>} | 
			
		
	
		
			
				
					|  |  |  | 	 * @Author zhaoqifeng | 
			
		
	
		
			
				
					|  |  |  | 	 * @Date 2022/1/4 15:33 | 
			
		
	
		
			
				
					|  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  | 	@Override | 
			
		
	
		
			
				
					|  |  |  | 	public void approvaledListExport(HttpServletResponse response,  ApprovaledListFromDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  | 		formDTO.setPageNo(NumConstant.ONE); | 
			
		
	
		
			
				
					|  |  |  | 		formDTO.setPageSize(NumConstant.ONE_THOUSAND); | 
			
		
	
		
			
				
					|  |  |  | 		ExcelWriter excelWriter = null; | 
			
		
	
		
			
				
					|  |  |  | 		try { | 
			
		
	
		
			
				
					|  |  |  | 			excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("直接立项记录.xlsx", response)).build(); | 
			
		
	
		
			
				
					|  |  |  | 			WriteSheet writeSheet = EasyExcel.writerSheet().build(); | 
			
		
	
		
			
				
					|  |  |  | 			writeSheet.setClazz(ApprovaledListExcel.class); | 
			
		
	
		
			
				
					|  |  |  | 			Integer num; | 
			
		
	
		
			
				
					|  |  |  | 			//一千条一循环分批写入
 | 
			
		
	
		
			
				
					|  |  |  | 			do { | 
			
		
	
		
			
				
					|  |  |  | 				List<ApprovaledListResultDTO> list = approvaledList(formDTO).getList(); | 
			
		
	
		
			
				
					|  |  |  | 				List<ApprovaledListExcel> data = ConvertUtils.sourceToTarget(list, ApprovaledListExcel.class); | 
			
		
	
		
			
				
					|  |  |  | 				excelWriter.write(data, writeSheet); | 
			
		
	
		
			
				
					|  |  |  | 				num = data.size(); | 
			
		
	
		
			
				
					|  |  |  | 				formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); | 
			
		
	
		
			
				
					|  |  |  | 			} while (num > NumConstant.ZERO && num.compareTo(formDTO.getPageSize()) == NumConstant.ZERO); | 
			
		
	
		
			
				
					|  |  |  | 		} catch (Exception e) { | 
			
		
	
		
			
				
					|  |  |  | 			e.printStackTrace(); | 
			
		
	
		
			
				
					|  |  |  | 		} finally { | 
			
		
	
		
			
				
					|  |  |  | 			if (excelWriter != null) { | 
			
		
	
		
			
				
					|  |  |  | 				excelWriter.finish(); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	private List<StaffListResultDTO> queryStaffListRes(List<TickStaffFormDTO> staffList,String currentUserId) { | 
			
		
	
		
			
				
					|  |  |  | 		List<String> staffIdList = staffList.stream().map(TickStaffFormDTO::getStaffId).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  | 		staffIdList.add(currentUserId); | 
			
		
	
	
		
			
				
					|  |  | 
 |