| 
						
						
							
								
							
						
						
					 | 
					@ -4,7 +4,6 @@ import com.alibaba.excel.context.AnalysisContext; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.alibaba.excel.event.AnalysisEventListener; | 
					 | 
					 | 
					import com.alibaba.excel.event.AnalysisEventListener; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetException; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.GridInfoCache; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.GridInfoCache; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -28,7 +27,6 @@ import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.util.CollectionUtils; | 
					 | 
					 | 
					import org.springframework.util.CollectionUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.io.IOException; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.ArrayList; | 
					 | 
					 | 
					import java.util.ArrayList; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Arrays; | 
					 | 
					 | 
					import java.util.Arrays; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.List; | 
					 | 
					 | 
					import java.util.List; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -332,6 +330,11 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener<Neighb | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void doAfterAllAnalysed(AnalysisContext context) { | 
					 | 
					 | 
					    public void doAfterAllAnalysed(AnalysisContext context) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        input.setOperatorId(formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        input.setTaskId(taskId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            finalDispose(); | 
					 | 
					 | 
					            finalDispose(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 删除缓存
 | 
					 | 
					 | 
					            // 删除缓存
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId()); | 
					 | 
					 | 
					            icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -342,26 +345,29 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener<Neighb | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 放结果
 | 
					 | 
					 | 
					            // 放结果
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            icHouseRedis.setImportResultDTO(formDTO.getCustomerId(), formDTO.getUserId(), new ImportResultDTO(nums,num)); | 
					 | 
					 | 
					            icHouseRedis.setImportResultDTO(formDTO.getCustomerId(), formDTO.getUserId(), new ImportResultDTO(nums,num)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.info("数据处理完毕,开始更新任务状态"); | 
					 | 
					 | 
					            log.info("数据处理完毕,开始更新任务状态"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        input.setOperatorId(formDTO.getUserId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        input.setTaskId(taskId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            if (CollectionUtils.isEmpty(nums)){ | 
					 | 
					 | 
					            if (CollectionUtils.isEmpty(nums)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); | 
					 | 
					 | 
					                input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                epmetCommonServiceOpenFeignClient.finishImportTask(input); | 
					 | 
					 | 
					                epmetCommonServiceOpenFeignClient.finishImportTask(input); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }else { | 
					 | 
					 | 
					            }else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                if (!CollectionUtils.isEmpty(errorInfos)){ | 
					 | 
					 | 
					                if (!CollectionUtils.isEmpty(errorInfos)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    try { | 
					 | 
					 | 
					                    try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        String s = neighborHoodService.orgGeneralImport(errorInfos, NeighborHoodErrorInfoModel.class); | 
					 | 
					 | 
					                        String s = neighborHoodService.orgGeneralImport(errorInfos, NeighborHoodErrorInfoModel.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        if (s == null){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            log.warn("doAfterAllAnalysed orgGeneralImport fail,return null,taskId:{}", taskId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        input.setResultDescFilePath(s); | 
					 | 
					 | 
					                        input.setResultDescFilePath(s); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                } catch (IOException e) { | 
					 | 
					 | 
					                    } catch (Exception e) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    epmetCommonServiceOpenFeignClient.finishImportTask(input); | 
					 | 
					 | 
					                        log.error("doAfterAllAnalysed orgGeneralImport exception", e); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					                    e.printStackTrace(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            epmetCommonServiceOpenFeignClient.finishImportTask(input); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                log.info("任务状态更新完毕"); | 
					 | 
					 | 
					                log.info("任务状态更新完毕"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } catch (Exception e) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            log.error("doAfterAllAnalysed exception", e); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } finally { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            epmetCommonServiceOpenFeignClient.finishImportTask(input); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        log.info("任务DTO"+JSON.toJSONString(input)); | 
					 | 
					 | 
					        log.info("任务DTO"+JSON.toJSONString(input)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |