|  | @ -31,6 +31,7 @@ import com.epmet.constant.IcResiUserConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.ExportResiUserFormDTO; |  |  | import com.epmet.dto.form.ExportResiUserFormDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.IcExportTemplateQueryFormDTO; |  |  | import com.epmet.dto.form.IcExportTemplateQueryFormDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.IcResiUserPageFormDTO; |  |  | import com.epmet.dto.form.IcResiUserPageFormDTO; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.dto.form.ResiUserQueryValueDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.result.FormItemResult; |  |  | import com.epmet.dto.result.FormItemResult; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.result.IcCustomExportResultDTO; |  |  | import com.epmet.dto.result.IcCustomExportResultDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.result.OptionDTO; |  |  | import com.epmet.dto.result.OptionDTO; | 
			
		
	
	
		
		
			
				
					|  | @ -45,6 +46,7 @@ import com.google.common.base.Joiner; | 
			
		
	
		
		
			
				
					|  |  | import com.google.common.cache.Cache; |  |  | import com.google.common.cache.Cache; | 
			
		
	
		
		
			
				
					|  |  | import com.google.common.cache.CacheBuilder; |  |  | import com.google.common.cache.CacheBuilder; | 
			
		
	
		
		
			
				
					|  |  | import lombok.extern.slf4j.Slf4j; |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import org.apache.commons.collections4.CollectionUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.lang3.StringUtils; |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.poi.ss.usermodel.IndexedColors; |  |  | import org.apache.poi.ss.usermodel.IndexedColors; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.poi.ss.usermodel.VerticalAlignment; |  |  | import org.apache.poi.ss.usermodel.VerticalAlignment; | 
			
		
	
	
		
		
			
				
					|  | @ -103,8 +105,9 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
			
		
	
		
		
			
				
					|  |  |         ExcelWriter excelWriter = null; |  |  |         ExcelWriter excelWriter = null; | 
			
		
	
		
		
			
				
					|  |  |         WriteSheet writeSheet = null; |  |  |         WriteSheet writeSheet = null; | 
			
		
	
		
		
			
				
					|  |  |         try { |  |  |         try { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             String dynamicCustomerId=StringUtils.isNotBlank(exportResiUserFormDTO.getCustomerId()) ? exportResiUserFormDTO.getCustomerId() : tokenDto.getCustomerId(); | 
			
		
	
		
		
			
				
					|  |  |             //获取用户配置的导出条件
 |  |  |             //获取用户配置的导出条件
 | 
			
		
	
		
		
			
				
					
					|  |  |             Result<IcCustomExportResultDTO> exportConfigResult = this.getIcCustomExportConfig(exportResiUserFormDTO.getCustomerId(), templateId, exportResiUserFormDTO.getExportConfig()); |  |  |             Result<IcCustomExportResultDTO> exportConfigResult = this.getIcCustomExportConfig(dynamicCustomerId, templateId, exportResiUserFormDTO.getExportConfig()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             Map<String, ExportResiUserItemDTO> itemOriginMap = getItemMap(searchForm.getCustomerId()); |  |  |             Map<String, ExportResiUserItemDTO> itemOriginMap = getItemMap(searchForm.getCustomerId()); | 
			
		
	
		
		
			
				
					|  |  |             IcCustomExportResultDTO exportConfigData = exportConfigResult.getData(); |  |  |             IcCustomExportResultDTO exportConfigData = exportConfigResult.getData(); | 
			
		
	
	
		
		
			
				
					|  | @ -163,6 +166,21 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             allShowColumns.addAll(exportConfigData.getHiddenSqlColumns()); |  |  |             allShowColumns.addAll(exportConfigData.getHiddenSqlColumns()); | 
			
		
	
		
		
			
				
					|  |  |             do { |  |  |             do { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 if(StringUtils.isNotBlank(exportResiUserFormDTO.getId())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     ResiUserQueryValueDTO idCondition=new ResiUserQueryValueDTO(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     idCondition.setTableName("ic_resi_user"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     idCondition.setQueryType("equal"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     idCondition.setColumnName("ID"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     idCondition.setColumnValue(Arrays.asList(exportResiUserFormDTO.getId())); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     if(CollectionUtils.isNotEmpty(searchForm.getConditions())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         searchForm.getConditions().add(idCondition); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     }else{ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         List<ResiUserQueryValueDTO> conditions=new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         conditions.add(idCondition); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         searchForm.setConditions(conditions); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |                 String finalStaffOrgPath = staffOrgPath; |  |  |                 String finalStaffOrgPath = staffOrgPath; | 
			
		
	
		
		
			
				
					|  |  |                 mapListPage = PageHelper.startPage(searchForm.getPageNo(), searchForm.getPageSize(), searchForm.getIsPage()).doSelectPage(() -> { |  |  |                 mapListPage = PageHelper.startPage(searchForm.getPageNo(), searchForm.getPageSize(), searchForm.getIsPage()).doSelectPage(() -> { | 
			
		
	
		
		
			
				
					|  |  |                     icResiUserService.dynamicQuery(searchForm.getCustomerId(), searchForm.getFormCode(), IcResiUserConstant.IC_RESI_USER, allShowColumns, searchForm.getConditions(), staffInfoCacheResult.getAgencyId(), finalStaffOrgPath); |  |  |                     icResiUserService.dynamicQuery(searchForm.getCustomerId(), searchForm.getFormCode(), IcResiUserConstant.IC_RESI_USER, allShowColumns, searchForm.getConditions(), staffInfoCacheResult.getAgencyId(), finalStaffOrgPath); | 
			
		
	
	
		
		
			
				
					|  | @ -227,10 +245,10 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { | 
			
		
	
		
		
			
				
					|  |  |             } else if (Constant.OPITON_SOURCE_LOCAL.equals(sqlColumn.getOptionSourceType())) { |  |  |             } else if (Constant.OPITON_SOURCE_LOCAL.equals(sqlColumn.getOptionSourceType())) { | 
			
		
	
		
		
			
				
					|  |  |                 newValue = putOptionValue(formItemResult, vauleStr); |  |  |                 newValue = putOptionValue(formItemResult, vauleStr); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             o.put(key,newValue); | 
			
		
	
		
		
			
				
					|  |  |             if (FieldConstant.ID.equals(key)) { |  |  |             if (FieldConstant.ID.equals(key)) { | 
			
		
	
		
		
			
				
					|  |  |                 newValue = Md5Util.md5(vauleStr); |  |  |                 newValue = Md5Util.md5(vauleStr); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             o.put(key,newValue); |  |  |  | 
			
		
	
		
		
			
				
					|  |  |             singleRowData.add(newValue); |  |  |             singleRowData.add(newValue); | 
			
		
	
		
		
			
				
					|  |  |         }); |  |  |         }); | 
			
		
	
		
		
			
				
					|  |  |         resultData.add(singleRowData); |  |  |         resultData.add(singleRowData); | 
			
		
	
	
		
		
			
				
					|  | 
 |