| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -120,7 +120,6 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            int[] mergeColumnIndex = mergeColumnIndexList.stream().filter(Objects::nonNull).mapToInt(i->i).toArray(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 从那一列开始合并
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            int mergeRowIndex = exportConfigData.getHeaderRow(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -134,12 +133,11 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            FreezeAndFilter writeHandler = new FreezeAndFilter(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("居民基本信息.xlsx", response)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    .registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex, mergeColumnIndex)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    .registerWriteHandler(writeHandler).build(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            WriteSheet writeSheet = EasyExcel.writerSheet() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    .registerWriteHandler(horizontalCellStyleStrategy) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    .head(exportConfigData.getHeaders()).build(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    .registerWriteHandler(writeHandler).build(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            WriteSheet writeSheet = EasyExcel.writerSheet().head(exportConfigData.getHeaders()).build(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            String staffOrgPath = null; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -164,7 +162,6 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                result.forEach(o -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<Object> singleResult = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    Map<String,Object> originalConditionMap = new ConcurrentHashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    log.info("==========居民信息:{}",JSON.toJSONString(o)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    o.forEach((key,value) -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        List<IcCustomExportResultDTO.SqlColumn> showSqlColumns = exportConfigData.getShowSqlColumns(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        Map<String, IcCustomExportResultDTO.SqlColumn> itemMap = showSqlColumns.stream().collect(Collectors.toMap(IcCustomExportResultDTO.SqlColumn::getColumnName, item -> item)); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -196,7 +193,6 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    resultData.add(singleResult); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                log.info("需要写入的data长度:{}", resultData.size()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                excelWriter.write(resultData, writeSheet); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //todo
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                break; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -210,6 +206,11 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * desc:校验查询表单参数 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @param tokenDto | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @param exportResiUserFormDTO | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void validateSearchForm(TokenDto tokenDto, ExportResiUserFormDTO exportResiUserFormDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        IcResiUserPageFormDTO searchForm = exportResiUserFormDTO.getSearchForm(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        searchForm.setCustomerId(tokenDto.getCustomerId()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -247,8 +248,6 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private static Map<String, Cache<String,String>> remoteOptionCacheMap = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private void putRemoteValue(Set<FormItemResult> conditionItemSet, String currentStaffAgencyId, Map<String, Object> map, Map<String, Object> originalConditionMap, FormItemResult e, String columnName, String vauleStr) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            log.info("========putRemoteValue:formItemResult:{}",e.getLabel()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            log.info("========putRemoteValue:columnName:{},vauleStr:{}",columnName,vauleStr); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Map<String, IcResiUserImportServiceImpl.ColumnWrapper> columnWrappers = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (e.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                for (FormItemResult o : conditionItemSet) { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -272,6 +271,7 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    Map<String, OptionResultDTO> remoteOptions = icResiUserImportService.listRemoteCascadeOptions(parts[0], parts[1], columnWrappers, currentStaffAgencyId, "query"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<String> listOptions = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    remoteOptions.forEach((value,label) -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        //todo 看看怎么更好的利用本地缓存
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        if (vauleStr.equals(value)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            listOptions.add(label.getLabel()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -280,11 +280,8 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    cache.put(vauleStr,join); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    map.put(columnName, join); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //todo 不支持多个itemId
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    Map<String, String> remoteOptions = icResiUserImportService.listRemoteOptions(parts[0], parts[1], columnWrappers, currentStaffAgencyId, "query"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    log.info("========putRemoteValue:条件:{}", JSON.toJSONString(columnWrappers)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    log.info("========putRemoteValue:结果:{}", JSON.toJSONString(remoteOptions)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (FormItemTypeEnum.CHECKBOX.getCode().equals(e.getItemType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        remoteOptions.forEach((label, value) -> map.put(value, vauleStr.contains(value) ? StrConstant.YES : StrConstant.NO)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } else if (FormItemTypeEnum.SELECT.getCode().equals(e.getItemType())) { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -292,6 +289,7 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            if (vauleStr.equals(value)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                map.put(columnName, label); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            //放if外面是为了下次取得时候 可以有值
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            cache.put(value,label); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -299,7 +297,7 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					         } catch (Exception ex) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            log.error("listRemoteOptions url", ex); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            log.warn("listRemoteOptions url", ex); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |