| 
						
						
							
								
							
						
						
					 | 
					@ -18,6 +18,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					package com.epmet.service.impl; | 
					 | 
					 | 
					package com.epmet.service.impl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import cn.hutool.core.bean.BeanUtil; | 
					 | 
					 | 
					import cn.hutool.core.bean.BeanUtil; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import cn.hutool.core.collection.CollUtil; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.bean.ResiExportBaseInfoData; | 
					 | 
					 | 
					import com.epmet.bean.ResiExportBaseInfoData; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -66,6 +67,7 @@ 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.collections4.CollectionUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.apache.commons.compress.utils.Lists; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.data.redis.core.RedisTemplate; | 
					 | 
					 | 
					import org.springframework.data.redis.core.RedisTemplate; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -128,8 +130,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Resource | 
					 | 
					 | 
					    @Resource | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private IcTripReportRecordService icTripReportRecordService; | 
					 | 
					 | 
					    private IcTripReportRecordService icTripReportRecordService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    private QueryWrapper<IcResiUserEntity> getWrapper(Map<String, Object> params){ | 
					 | 
					 | 
					    private QueryWrapper<IcResiUserEntity> getWrapper(Map<String, Object> params) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String id = (String)params.get(FieldConstant.ID_HUMP); | 
					 | 
					 | 
					        String id = (String) params.get(FieldConstant.ID_HUMP); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        QueryWrapper<IcResiUserEntity> wrapper = new QueryWrapper<>(); | 
					 | 
					 | 
					        QueryWrapper<IcResiUserEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -194,7 +196,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                map.put("customer_id", tokenDto.getCustomerId()); | 
					 | 
					 | 
					                map.put("customer_id", tokenDto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                map.put("created_by", tokenDto.getUserId()); | 
					 | 
					 | 
					                map.put("created_by", tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                map.put("updated_by", tokenDto.getUserId()); | 
					 | 
					 | 
					                map.put("updated_by", tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if(!map.containsKey("AGENCY_ID")){ | 
					 | 
					 | 
					                if (!map.containsKey("AGENCY_ID")) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    throw new RenException("新增居民信息--入参AGENCY_ID为空"); | 
					 | 
					 | 
					                    throw new RenException("新增居民信息--入参AGENCY_ID为空"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //2021.11.25 新增需求 客户下身份证号唯一  start
 | 
					 | 
					 | 
					                //2021.11.25 新增需求 客户下身份证号唯一  start
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -426,7 +428,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcResiCategoryStatsConfigDTO sfdto = new IcResiCategoryStatsConfigDTO(); | 
					 | 
					 | 
					        IcResiCategoryStatsConfigDTO sfdto = new IcResiCategoryStatsConfigDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        sfdto.setCustomerId(tokenDto.getCustomerId()); | 
					 | 
					 | 
					        sfdto.setCustomerId(tokenDto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<List<IcResiCategoryStatsConfigDTO>> categoryListResult = operCustomizeOpenFeignClient.getCategoryList(sfdto); | 
					 | 
					 | 
					        Result<List<IcResiCategoryStatsConfigDTO>> categoryListResult = operCustomizeOpenFeignClient.getCategoryList(sfdto); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!categoryListResult.success()){ | 
					 | 
					 | 
					        if (!categoryListResult.success()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException("居民信息修改,获取客户居民类别预警配置表数据失败"); | 
					 | 
					 | 
					            throw new RenException("居民信息修改,获取客户居民类别预警配置表数据失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //修改前数据库居民十八类信息值
 | 
					 | 
					 | 
					        //修改前数据库居民十八类信息值
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -496,7 +498,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public List<HomeUserResultDTO> getPeopleByRoom(String homeId) { | 
					 | 
					 | 
					    public List<HomeUserResultDTO> getPeopleByRoom(String homeId) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(StringUtils.isBlank(homeId)) { | 
					 | 
					 | 
					        if (StringUtils.isBlank(homeId)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return Collections.emptyList(); | 
					 | 
					 | 
					            return Collections.emptyList(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        LambdaQueryWrapper<IcResiUserEntity> wrapper = new LambdaQueryWrapper<>(); | 
					 | 
					 | 
					        LambdaQueryWrapper<IcResiUserEntity> wrapper = new LambdaQueryWrapper<>(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -516,72 +518,70 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public PageData<Map<String, Object>> pageResiMap(IcResiUserPageFormDTO formDTO) { | 
					 | 
					 | 
					    public PageData<Map<String, Object>> pageResiMap(IcResiUserPageFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); | 
					 | 
					 | 
					        CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        String staffOrgPath; | 
					 | 
					 | 
					        String staffOrgPath; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds())&& !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())){ | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            staffOrgPath=staffInfoCacheResult.getAgencyPIds().concat(":").concat(staffInfoCacheResult.getAgencyId()); | 
					 | 
					 | 
					            staffOrgPath = staffInfoCacheResult.getAgencyPIds().concat(":").concat(staffInfoCacheResult.getAgencyId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }else{ | 
					 | 
					 | 
					        } else { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            staffOrgPath=staffInfoCacheResult.getAgencyId(); | 
					 | 
					 | 
					            staffOrgPath = staffInfoCacheResult.getAgencyId(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 查询列表展示项,如果没有,直接返回
 | 
					 | 
					 | 
					        // 查询列表展示项,如果没有,直接返回
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        CustomerFormQueryDTO queryDTO1=new CustomerFormQueryDTO(); | 
					 | 
					 | 
					        CustomerFormQueryDTO queryDTO1 = new CustomerFormQueryDTO(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        queryDTO1.setCustomerId(formDTO.getCustomerId()); | 
					 | 
					 | 
					        queryDTO1.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        queryDTO1.setFormCode(formDTO.getFormCode()); | 
					 | 
					 | 
					        queryDTO1.setFormCode(formDTO.getFormCode()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<IcFormResColumnDTO>> resultColumnRes=operCustomizeOpenFeignClient.queryConditions(queryDTO1); | 
					 | 
					 | 
					        Result<List<IcFormResColumnDTO>> resultColumnRes = operCustomizeOpenFeignClient.queryConditions(queryDTO1); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        if (!resultColumnRes.success() || CollectionUtils.isEmpty(resultColumnRes.getData())) { | 
					 | 
					 | 
					        if (!resultColumnRes.success() || CollectionUtils.isEmpty(resultColumnRes.getData())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.warn("没有配置列表展示列"); | 
					 | 
					 | 
					            log.warn("没有配置列表展示列"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new PageData(new ArrayList(), NumConstant.ZERO); | 
					 | 
					 | 
					            return new PageData(new ArrayList(), NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcFormResColumnDTO> resultColumns = resultColumnRes.getData(); | 
					 | 
					 | 
					        List<IcFormResColumnDTO> resultColumns = resultColumnRes.getData(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 查询结果列对应的表:
 | 
					 | 
					 | 
					        // 查询结果列对应的表:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Set<String> resultColumnTables=resultColumns.stream().map(IcFormResColumnDTO::getTableName).collect(Collectors.toSet()); | 
					 | 
					 | 
					        Set<String> resultColumnTables = resultColumns.stream().map(IcFormResColumnDTO::getTableName).collect(Collectors.toSet()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 查询列表展示项需要用到哪些子表
 | 
					 | 
					 | 
					        // 查询列表展示项需要用到哪些子表
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<SubTableJoinDTO>> subTablesRes=operCustomizeOpenFeignClient.querySubTables(queryDTO1); | 
					 | 
					 | 
					        Result<List<SubTableJoinDTO>> subTablesRes = operCustomizeOpenFeignClient.querySubTables(queryDTO1); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<SubTableJoinDTO> subTables =subTablesRes.getData(); | 
					 | 
					 | 
					        List<SubTableJoinDTO> subTables = subTablesRes.getData(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        // log.info("1、所有的子表subTables:"+JSON.toJSONString(subTables,true));
 | 
					 | 
					 | 
					        // log.info("1、所有的子表subTables:"+JSON.toJSONString(subTables,true));
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //关联哪些子表:查询条件用到的表名+查询的列对应的表  并集去重
 | 
					 | 
					 | 
					        //关联哪些子表:查询条件用到的表名+查询的列对应的表  并集去重
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Set<String> whereConditionTables=formDTO.getConditions().stream().map(ResiUserQueryValueDTO::getTableName).collect(Collectors.toSet()); | 
					 | 
					 | 
					        Set<String> whereConditionTables = formDTO.getConditions().stream().map(ResiUserQueryValueDTO::getTableName).collect(Collectors.toSet()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Set<String> tables=new HashSet<>(); | 
					 | 
					 | 
					        Set<String> tables = new HashSet<>(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        tables.addAll(whereConditionTables); | 
					 | 
					 | 
					        tables.addAll(whereConditionTables); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        tables.addAll(resultColumnTables); | 
					 | 
					 | 
					        tables.addAll(resultColumnTables); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // log.info("2、查询条件+查询列对应的tables并集去重:"+ JSON.toJSONString(tables,true));
 | 
					 | 
					 | 
					        // log.info("2、查询条件+查询列对应的tables并集去重:"+ JSON.toJSONString(tables,true));
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //最终关联的子表对应的sql:
 | 
					 | 
					 | 
					        //最终关联的子表对应的sql:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<String> finalSubTables =new ArrayList<>(); | 
					 | 
					 | 
					        List<String> finalSubTables = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        subTables.forEach(subTable->{ | 
					 | 
					 | 
					        subTables.forEach(subTable -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if(tables.contains(subTable.getTableName())){ | 
					 | 
					 | 
					            if (tables.contains(subTable.getTableName())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                finalSubTables.add(subTable.getJoinTableSql()); | 
					 | 
					 | 
					                finalSubTables.add(subTable.getJoinTableSql()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        PageInfo<Map<String, Object>> pageInfo=new PageInfo<>(); | 
					 | 
					 | 
					        PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (null == formDTO.getPageFlag()||formDTO.getPageFlag()) { | 
					 | 
					 | 
					        if (null == formDTO.getPageFlag() || formDTO.getPageFlag()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            //分页
 | 
					 | 
					 | 
					            //分页
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String finalStaffOrgPath = staffOrgPath; | 
					 | 
					 | 
					            String finalStaffOrgPath = staffOrgPath; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            pageInfo= PageHelper.startPage(formDTO.getPageNo(), | 
					 | 
					 | 
					            pageInfo = PageHelper.startPage(formDTO.getPageNo(), | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectListResiMap(formDTO.getCustomerId(), | 
					 | 
					 | 
					                    formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectListResiMap(formDTO.getCustomerId(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    formDTO.getFormCode(), | 
					 | 
					 | 
					                    formDTO.getFormCode(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    formDTO.getConditions(), | 
					 | 
					 | 
					                    formDTO.getConditions(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    resultColumns, | 
					 | 
					 | 
					                    resultColumns, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    finalSubTables, | 
					 | 
					 | 
					                    finalSubTables, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    staffInfoCacheResult.getAgencyId(), finalStaffOrgPath,null, formDTO.getKeyword())); | 
					 | 
					 | 
					                    staffInfoCacheResult.getAgencyId(), finalStaffOrgPath, null, formDTO.getKeyword())); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }else{ | 
					 | 
					 | 
					        } else { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            List<Map<String,Object>> list=baseDao.selectListResiMap(formDTO.getCustomerId(), | 
					 | 
					 | 
					            List<Map<String, Object>> list = baseDao.selectListResiMap(formDTO.getCustomerId(), | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    formDTO.getFormCode(), | 
					 | 
					 | 
					                    formDTO.getFormCode(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    formDTO.getConditions(), | 
					 | 
					 | 
					                    formDTO.getConditions(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    resultColumns, | 
					 | 
					 | 
					                    resultColumns, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    finalSubTables, | 
					 | 
					 | 
					                    finalSubTables, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    staffInfoCacheResult.getAgencyId(), | 
					 | 
					 | 
					                    staffInfoCacheResult.getAgencyId(), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    staffOrgPath,null, | 
					 | 
					 | 
					                    staffOrgPath, null, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    formDTO.getKeyword()); | 
					 | 
					 | 
					                    formDTO.getKeyword()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            pageInfo.setTotal(CollectionUtils.isEmpty(list)?NumConstant.ZERO:list.size()); | 
					 | 
					 | 
					            pageInfo.setTotal(CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            pageInfo.setList(list); | 
					 | 
					 | 
					            pageInfo.setList(list); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -597,23 +597,23 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                houseIds.add(map.get(UserConstant.HOME_ID).toString()); | 
					 | 
					 | 
					                houseIds.add(map.get(UserConstant.HOME_ID).toString()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); | 
					 | 
					 | 
					        Result<List<AllGridsByUserIdResultDTO>> gridInfoRes = govOrgOpenFeignClient.getGridListByGridIds(gridIds); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); | 
					 | 
					 | 
					        List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, AllGridsByUserIdResultDTO> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity())); | 
					 | 
					 | 
					        Map<String, AllGridsByUserIdResultDTO> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //查询房子名称
 | 
					 | 
					 | 
					        //查询房子名称
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<HouseInfoDTO>> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(houseIds,formDTO.getCustomerId()); | 
					 | 
					 | 
					        Result<List<HouseInfoDTO>> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds, formDTO.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        List<HouseInfoDTO> houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>(); | 
					 | 
					 | 
					        List<HouseInfoDTO> houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, HouseInfoDTO> houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); | 
					 | 
					 | 
					        Map<String, HouseInfoDTO> houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //查询需求分类字典
 | 
					 | 
					 | 
					        //查询需求分类字典
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        UserDemandNameQueryFormDTO userDemandNameQueryFormDTO=new UserDemandNameQueryFormDTO(); | 
					 | 
					 | 
					        UserDemandNameQueryFormDTO userDemandNameQueryFormDTO = new UserDemandNameQueryFormDTO(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        userDemandNameQueryFormDTO.setCustomerId(formDTO.getCustomerId()); | 
					 | 
					 | 
					        userDemandNameQueryFormDTO.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<IcResiDemandDictDTO>> demandNameRes=heartOpenFeignClient.queryDemandNames(userDemandNameQueryFormDTO); | 
					 | 
					 | 
					        Result<List<IcResiDemandDictDTO>> demandNameRes = heartOpenFeignClient.queryDemandNames(userDemandNameQueryFormDTO); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(!demandNameRes.success()||CollectionUtils.isEmpty(demandNameRes.getData())){ | 
					 | 
					 | 
					        if (!demandNameRes.success() || CollectionUtils.isEmpty(demandNameRes.getData())) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"获取需求分类字典表数据异常",EpmetErrorCode.SERVER_ERROR.getMsg()); | 
					 | 
					 | 
					            throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取需求分类字典表数据异常", EpmetErrorCode.SERVER_ERROR.getMsg()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Map<String,IcResiDemandDictDTO> demandDictMap=demandNameRes.getData().stream().collect(Collectors.toMap(IcResiDemandDictDTO::getCategoryCode,Function.identity())); | 
					 | 
					 | 
					        Map<String, IcResiDemandDictDTO> demandDictMap = demandNameRes.getData().stream().collect(Collectors.toMap(IcResiDemandDictDTO::getCategoryCode, Function.identity())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        for (Map<String, Object> resultMap : list) { | 
					 | 
					 | 
					        for (Map<String, Object> resultMap : list) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String gridIdValue = null != resultMap.get(UserConstant.GRID_ID) ? resultMap.get(UserConstant.GRID_ID).toString() : StrConstant.EPMETY_STR; | 
					 | 
					 | 
					            String gridIdValue = null != resultMap.get(UserConstant.GRID_ID) ? resultMap.get(UserConstant.GRID_ID).toString() : StrConstant.EPMETY_STR; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -651,7 +651,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                resultMap.put(UserConstant.HOME_ID, neighBorName.concat(buildName).concat(unitName).concat(doorName)); | 
					 | 
					 | 
					                resultMap.put(UserConstant.HOME_ID, neighBorName.concat(buildName).concat(unitName).concat(doorName)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                resultMap.put("CATEGORY_NAME",queryUserDemandName((String) resultMap.get("icResiUserId"),demandDictMap)); | 
					 | 
					 | 
					                resultMap.put("CATEGORY_NAME", queryUserDemandName((String) resultMap.get("icResiUserId"), demandDictMap)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (resultMap.containsKey(UserConstant.GENDER)) { | 
					 | 
					 | 
					            if (resultMap.containsKey(UserConstant.GENDER)) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -669,31 +669,31 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); | 
					 | 
					 | 
					        return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    private String queryUserDemandName(String icResiUserId,Map<String,IcResiDemandDictDTO> demandDictMap) { | 
					 | 
					 | 
					    private String queryUserDemandName(String icResiUserId, Map<String, IcResiDemandDictDTO> demandDictMap) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        // epmet_user.ic_resi_demand.category_code存储的值为 分类编码的全路径,eg:
 | 
					 | 
					 | 
					        // epmet_user.ic_resi_demand.category_code存储的值为 分类编码的全路径,eg:
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 1003,10030002
 | 
					 | 
					 | 
					        // 1003,10030002
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 1012,10120003
 | 
					 | 
					 | 
					        // 1012,10120003
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 1016,10160003
 | 
					 | 
					 | 
					        // 1016,10160003
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Set<String> demandCodePath=baseDao.selectUserDemandCode(icResiUserId); | 
					 | 
					 | 
					        Set<String> demandCodePath = baseDao.selectUserDemandCode(icResiUserId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(CollectionUtils.isEmpty(demandCodePath)){ | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(demandCodePath)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return StrConstant.EPMETY_STR; | 
					 | 
					 | 
					            return StrConstant.EPMETY_STR; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<String> nameList=new ArrayList<>(); | 
					 | 
					 | 
					        List<String> nameList = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        for(String codePath:demandCodePath){ | 
					 | 
					 | 
					        for (String codePath : demandCodePath) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            if (StringUtils.isNotBlank(codePath) && codePath.contains(StrConstant.COMMA)) { | 
					 | 
					 | 
					            if (StringUtils.isNotBlank(codePath) && codePath.contains(StrConstant.COMMA)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                String[] codeAtt=codePath.split(StrConstant.COMMA); | 
					 | 
					 | 
					                String[] codeAtt = codePath.split(StrConstant.COMMA); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                String code=codeAtt[codeAtt.length-1]; | 
					 | 
					 | 
					                String code = codeAtt[codeAtt.length - 1]; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if(StringUtils.isNotBlank(code)&&demandDictMap.containsKey(code)){ | 
					 | 
					 | 
					                if (StringUtils.isNotBlank(code) && demandDictMap.containsKey(code)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    nameList.add(demandDictMap.get(code).getParentName()); | 
					 | 
					 | 
					                    nameList.add(demandDictMap.get(code).getParentName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					            } else { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if(StringUtils.isNotBlank(codePath)&&demandDictMap.containsKey(codePath)){ | 
					 | 
					 | 
					                if (StringUtils.isNotBlank(codePath) && demandDictMap.containsKey(codePath)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    nameList.add(demandDictMap.get(codePath).getParentName()); | 
					 | 
					 | 
					                    nameList.add(demandDictMap.get(codePath).getParentName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String demandName=String.join(StrConstant.COMMA_ZH,nameList); | 
					 | 
					 | 
					        String demandName = String.join(StrConstant.COMMA_ZH, nameList); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return  demandName; | 
					 | 
					 | 
					        return demandName; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -709,17 +709,17 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public Map queryIcResiDetail(IcResiDetailFormDTO pageFormDTO) { | 
					 | 
					 | 
					    public Map queryIcResiDetail(IcResiDetailFormDTO pageFormDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map resultMap = new HashMap(); | 
					 | 
					 | 
					        Map resultMap = new HashMap(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 先查询主表,主表没有记录,直接返回空
 | 
					 | 
					 | 
					        // 先查询主表,主表没有记录,直接返回空
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<Map<String, Object>> icResiUserMapList = baseDao.selectListMapById(pageFormDTO.getCustomerId(),pageFormDTO.getIcResiUserId()); | 
					 | 
					 | 
					        List<Map<String, Object>> icResiUserMapList = baseDao.selectListMapById(pageFormDTO.getCustomerId(), pageFormDTO.getIcResiUserId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        if (CollectionUtils.isEmpty(icResiUserMapList)) { | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(icResiUserMapList)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new HashMap(); | 
					 | 
					 | 
					            return new HashMap(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultMap.put("ic_resi_user", icResiUserMapList); | 
					 | 
					 | 
					        resultMap.put("ic_resi_user", icResiUserMapList); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        CustomerFormQueryDTO queryDTO=ConvertUtils.sourceToTarget(pageFormDTO,CustomerFormQueryDTO.class); | 
					 | 
					 | 
					        CustomerFormQueryDTO queryDTO = ConvertUtils.sourceToTarget(pageFormDTO, CustomerFormQueryDTO.class); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //循环查询每个子表的记录
 | 
					 | 
					 | 
					        //循环查询每个子表的记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<Set<String>> subTableRes=operCustomizeOpenFeignClient.queryIcResiSubTables(queryDTO); | 
					 | 
					 | 
					        Result<Set<String>> subTableRes = operCustomizeOpenFeignClient.queryIcResiSubTables(queryDTO); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(subTableRes.success()&&!CollectionUtils.isEmpty(subTableRes.getData())){ | 
					 | 
					 | 
					        if (subTableRes.success() && !CollectionUtils.isEmpty(subTableRes.getData())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            for (String subTalbeName : subTableRes.getData()) { | 
					 | 
					 | 
					            for (String subTalbeName : subTableRes.getData()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                List<Map<String, Object>> list = baseDao.selectSubTableRecords(pageFormDTO.getCustomerId(),pageFormDTO.getIcResiUserId(), subTalbeName); | 
					 | 
					 | 
					                List<Map<String, Object>> list = baseDao.selectSubTableRecords(pageFormDTO.getCustomerId(), pageFormDTO.getIcResiUserId(), subTalbeName); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                if (!CollectionUtils.isEmpty(list)) { | 
					 | 
					 | 
					                if (!CollectionUtils.isEmpty(list)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    resultMap.put(subTalbeName, list); | 
					 | 
					 | 
					                    resultMap.put(subTalbeName, list); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -733,6 +733,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * desc:动态查询 某表的所有字段值 | 
					 | 
					 | 
					     * desc:动态查询 某表的所有字段值 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param customerId | 
					 | 
					 | 
					     * @param customerId | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formCode | 
					 | 
					 | 
					     * @param formCode | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param resultTableName | 
					 | 
					 | 
					     * @param resultTableName | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -740,50 +741,50 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @return | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public List<Map<String,Object>> dynamicQuery(String customerId, | 
					 | 
					 | 
					    public List<Map<String, Object>> dynamicQuery(String customerId, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                                                 String formCode, | 
					 | 
					 | 
					                                                  String formCode, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                                                 String resultTableName, | 
					 | 
					 | 
					                                                  String resultTableName, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                                                 List<ResiUserQueryValueDTO> conditions, | 
					 | 
					 | 
					                                                  List<ResiUserQueryValueDTO> conditions, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                                                 String currentStaffAgencyId, | 
					 | 
					 | 
					                                                  String currentStaffAgencyId, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                                                 String staffOrgPath){ | 
					 | 
					 | 
					                                                  String staffOrgPath) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        CustomerFormQueryDTO queryDTO=new CustomerFormQueryDTO(); | 
					 | 
					 | 
					        CustomerFormQueryDTO queryDTO = new CustomerFormQueryDTO(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        queryDTO.setCustomerId(customerId); | 
					 | 
					 | 
					        queryDTO.setCustomerId(customerId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        queryDTO.setFormCode(formCode); | 
					 | 
					 | 
					        queryDTO.setFormCode(formCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //所有的子表
 | 
					 | 
					 | 
					        //所有的子表
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<SubTableJoinDTO>> subTablesRes=operCustomizeOpenFeignClient.querySubTables(queryDTO); | 
					 | 
					 | 
					        Result<List<SubTableJoinDTO>> subTablesRes = operCustomizeOpenFeignClient.querySubTables(queryDTO); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        /*List<String> subTablesBak=new ArrayList<>(); | 
					 | 
					 | 
					        /*List<String> subTablesBak=new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(subTablesRes.success()&&CollectionUtils.isNotEmpty(subTablesRes.getData())){ | 
					 | 
					 | 
					        if(subTablesRes.success()&&CollectionUtils.isNotEmpty(subTablesRes.getData())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            subTablesBak =subTablesRes.getData().stream().map(SubTableJoinDTO::getJoinTableSql).collect(Collectors.toList()); | 
					 | 
					 | 
					            subTablesBak =subTablesRes.getData().stream().map(SubTableJoinDTO::getJoinTableSql).collect(Collectors.toList()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }*/ | 
					 | 
					 | 
					        }*/ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<SubTableJoinDTO> subTables =subTablesRes.getData(); | 
					 | 
					 | 
					        List<SubTableJoinDTO> subTables = subTablesRes.getData(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        // log.info("1、所有的子表subTables:"+JSON.toJSONString(subTables,true));
 | 
					 | 
					 | 
					        // log.info("1、所有的子表subTables:"+JSON.toJSONString(subTables,true));
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //关联哪些子表:查询条件用到的表名+查询的列对应的表  并集去重
 | 
					 | 
					 | 
					        //关联哪些子表:查询条件用到的表名+查询的列对应的表  并集去重
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Set<String> whereConditionTables=conditions.stream().map(ResiUserQueryValueDTO::getTableName).collect(Collectors.toSet()); | 
					 | 
					 | 
					        Set<String> whereConditionTables = conditions.stream().map(ResiUserQueryValueDTO::getTableName).collect(Collectors.toSet()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Set<String> tables=new HashSet<>(); | 
					 | 
					 | 
					        Set<String> tables = new HashSet<>(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        tables.addAll(whereConditionTables); | 
					 | 
					 | 
					        tables.addAll(whereConditionTables); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        tables.add(resultTableName); | 
					 | 
					 | 
					        tables.add(resultTableName); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // log.info("2、查询条件+查询列对应的tables并集去重:"+ JSON.toJSONString(tables,true));
 | 
					 | 
					 | 
					        // log.info("2、查询条件+查询列对应的tables并集去重:"+ JSON.toJSONString(tables,true));
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //最终关联的子表对应的sql:
 | 
					 | 
					 | 
					        //最终关联的子表对应的sql:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<String> finalSubTables =new ArrayList<>(); | 
					 | 
					 | 
					        List<String> finalSubTables = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        subTables.forEach(subTable->{ | 
					 | 
					 | 
					        subTables.forEach(subTable -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if(tables.contains(subTable.getTableName())){ | 
					 | 
					 | 
					            if (tables.contains(subTable.getTableName())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                finalSubTables.add(subTable.getJoinTableSql()); | 
					 | 
					 | 
					                finalSubTables.add(subTable.getJoinTableSql()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return baseDao.dynamicQuery(customerId,resultTableName,conditions,finalSubTables,currentStaffAgencyId,staffOrgPath); | 
					 | 
					 | 
					        return baseDao.dynamicQuery(customerId, resultTableName, conditions, finalSubTables, currentStaffAgencyId, staffOrgPath); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description  查询个人数据 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formDTO | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Description 查询个人数据 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @author zxc | 
					 | 
					 | 
					     * @author zxc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2021/11/3 9:21 上午 | 
					 | 
					 | 
					     * @date 2021/11/3 9:21 上午 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public PersonDataResultDTO personData(PersonDataFormDTO formDTO) { | 
					 | 
					 | 
					    public PersonDataResultDTO personData(PersonDataFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        PersonDataResultDTO personData = baseDao.personData(formDTO.getUserId()); | 
					 | 
					 | 
					        PersonDataResultDTO personData = baseDao.personData(formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (null == personData){ | 
					 | 
					 | 
					        if (null == personData) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return new PersonDataResultDTO(); | 
					 | 
					 | 
					            return new PersonDataResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //新增以下2个返参
 | 
					 | 
					 | 
					        //新增以下2个返参
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -797,16 +798,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        personData.setIcResiUserId(formDTO.getUserId()); | 
					 | 
					 | 
					        personData.setIcResiUserId(formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 房屋信息查询
 | 
					 | 
					 | 
					        // 房屋信息查询
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<String>> listResult = govOrgOpenFeignClient.selectHouseInfoByIdCard(personData.getIdCard(),formDTO.getCustomerId()); | 
					 | 
					 | 
					        Result<List<String>> listResult = govOrgOpenFeignClient.selectHouseInfoByIdCard(personData.getIdCard(), formDTO.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!listResult.success()){ | 
					 | 
					 | 
					        if (!listResult.success()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException("查询房屋信息失败"); | 
					 | 
					 | 
					            throw new RenException("查询房屋信息失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        personData.setHouseInfo(listResult.getData()); | 
					 | 
					 | 
					        personData.setHouseInfo(listResult.getData()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 志愿者处理
 | 
					 | 
					 | 
					        // 志愿者处理
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (personData.getIsVolunteer().equals(NumConstant.ONE_STR)){ | 
					 | 
					 | 
					        if (personData.getIsVolunteer().equals(NumConstant.ONE_STR)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            List<String> volunteerList = baseDao.selectVolunteerByUserId(formDTO.getUserId()); | 
					 | 
					 | 
					            List<String> volunteerList = baseDao.selectVolunteerByUserId(formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(volunteerList)){ | 
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(volunteerList)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                List<String> volunteers = new ArrayList<>(); | 
					 | 
					 | 
					                List<String> volunteers = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                List<String> finalVolunteers = volunteers; | 
					 | 
					 | 
					                List<String> finalVolunteers = volunteers; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                volunteerList.forEach(v -> { | 
					 | 
					 | 
					                volunteerList.forEach(v -> { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -816,7 +817,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                volunteers = volunteers.stream().distinct().collect(Collectors.toList()); | 
					 | 
					 | 
					                volunteers = volunteers.stream().distinct().collect(Collectors.toList()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                // 去customize 查询志愿者类别
 | 
					 | 
					 | 
					                // 去customize 查询志愿者类别
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                Result<List<String>> volunteerResult = operCustomizeOpenFeignClient.volunteerLabelByValues(volunteers, personData.getCustomerId()); | 
					 | 
					 | 
					                Result<List<String>> volunteerResult = operCustomizeOpenFeignClient.volunteerLabelByValues(volunteers, personData.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if (!volunteerResult.success()){ | 
					 | 
					 | 
					                if (!volunteerResult.success()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    throw new RenException("查询志愿者类别失败..."); | 
					 | 
					 | 
					                    throw new RenException("查询志愿者类别失败..."); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                personData.setVolunteerCategory(volunteerResult.getData()); | 
					 | 
					 | 
					                personData.setVolunteerCategory(volunteerResult.getData()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -824,7 +825,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 网格名
 | 
					 | 
					 | 
					        // 网格名
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(personData.getGridId()); | 
					 | 
					 | 
					        GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(personData.getGridId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (null != gridInfo){ | 
					 | 
					 | 
					        if (null != gridInfo) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            personData.setGridName(gridInfo.getGridNamePath()); | 
					 | 
					 | 
					            personData.setGridName(gridInfo.getGridNamePath()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        /** | 
					 | 
					 | 
					        /** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -835,22 +836,22 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcResiCategoryStatsConfigDTO dto = new IcResiCategoryStatsConfigDTO(); | 
					 | 
					 | 
					        IcResiCategoryStatsConfigDTO dto = new IcResiCategoryStatsConfigDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dto.setCustomerId(personData.getCustomerId()); | 
					 | 
					 | 
					        dto.setCustomerId(personData.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<List<IcResiCategoryStatsConfigDTO>> categoryListResult = operCustomizeOpenFeignClient.getCategoryList(dto); | 
					 | 
					 | 
					        Result<List<IcResiCategoryStatsConfigDTO>> categoryListResult = operCustomizeOpenFeignClient.getCategoryList(dto); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!categoryListResult.success()){ | 
					 | 
					 | 
					        if (!categoryListResult.success()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException("查询客户下的人员类别失败..."); | 
					 | 
					 | 
					            throw new RenException("查询客户下的人员类别失败..."); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcResiCategoryStatsConfigDTO> categoryData = categoryListResult.getData(); | 
					 | 
					 | 
					        List<IcResiCategoryStatsConfigDTO> categoryData = categoryListResult.getData(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!CollectionUtils.isEmpty(categoryData)){ | 
					 | 
					 | 
					        if (!CollectionUtils.isEmpty(categoryData)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            Map<String, List<IcResiCategoryStatsConfigDTO>> groupByStatus = categoryData.stream().collect(Collectors.groupingBy(IcResiCategoryStatsConfigDTO::getStatus)); | 
					 | 
					 | 
					            Map<String, List<IcResiCategoryStatsConfigDTO>> groupByStatus = categoryData.stream().collect(Collectors.groupingBy(IcResiCategoryStatsConfigDTO::getStatus)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<IcResiCategoryStatsConfigDTO> showList = groupByStatus.get(IcPlatformConstant.PERSON_CATEGORY_SHOW); | 
					 | 
					 | 
					            List<IcResiCategoryStatsConfigDTO> showList = groupByStatus.get(IcPlatformConstant.PERSON_CATEGORY_SHOW); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<String> personCategoryList = new ArrayList<>(); | 
					 | 
					 | 
					            List<String> personCategoryList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(showList)){ | 
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(showList)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                Map<String, List<IcResiCategoryStatsConfigDTO>> groupByTableName = showList.stream().collect(Collectors.groupingBy(IcResiCategoryStatsConfigDTO::getTableName)); | 
					 | 
					 | 
					                Map<String, List<IcResiCategoryStatsConfigDTO>> groupByTableName = showList.stream().collect(Collectors.groupingBy(IcResiCategoryStatsConfigDTO::getTableName)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                groupByTableName.forEach((tableName,list) -> { | 
					 | 
					 | 
					                groupByTableName.forEach((tableName, list) -> { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    List<String> columns = list.stream().map(IcResiCategoryStatsConfigDTO::getColumnName).collect(Collectors.toList()); | 
					 | 
					 | 
					                    List<String> columns = list.stream().map(IcResiCategoryStatsConfigDTO::getColumnName).collect(Collectors.toList()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    Map<String, String> result = baseDao.selectPersonType(columns, personData.getCustomerId(), tableName,formDTO.getUserId()); | 
					 | 
					 | 
					                    Map<String, String> result = baseDao.selectPersonType(columns, personData.getCustomerId(), tableName, formDTO.getUserId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    list.forEach(l -> { | 
					 | 
					 | 
					                    list.forEach(l -> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        result.forEach((k,v) -> { | 
					 | 
					 | 
					                        result.forEach((k, v) -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                            if (l.getColumnName().equals(k) && v.equals(NumConstant.ONE_STR)){ | 
					 | 
					 | 
					                            if (l.getColumnName().equals(k) && v.equals(NumConstant.ONE_STR)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                                personCategoryList.add(l.getLabel()); | 
					 | 
					 | 
					                                personCategoryList.add(l.getLabel()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            } | 
					 | 
					 | 
					                            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        }); | 
					 | 
					 | 
					                        }); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -863,7 +864,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description  根据名字搜索 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formDTO | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @author zxc | 
					 | 
					 | 
					     * @author zxc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2021/11/3 1:42 下午 | 
					 | 
					 | 
					     * @date 2021/11/3 1:42 下午 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -878,23 +878,23 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Integer no = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); | 
					 | 
					 | 
					        Integer no = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), formDTO.getColumnName(),staffInfo.getAgencyId(), no)); | 
					 | 
					 | 
					        PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), formDTO.getColumnName(),staffInfo.getAgencyId(), no)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<SearchByNameResultDTO> result = pageInfo.getList(); | 
					 | 
					 | 
					        List<SearchByNameResultDTO> result = pageInfo.getList(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (CollectionUtils.isEmpty(result)){ | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(result)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return new PageData<>(new ArrayList<>(), pageInfo.getTotal()); | 
					 | 
					 | 
					            return new PageData<>(new ArrayList<>(), pageInfo.getTotal()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 查询小区,楼号,网格
 | 
					 | 
					 | 
					        // 查询小区,楼号,网格
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<List<AllGridsByUserIdResultDTO>> gridResult = govOrgOpenFeignClient.getGridListByGridIds(result.stream().map(SearchByNameResultDTO::getGridId).collect(Collectors.toList())); | 
					 | 
					 | 
					        Result<List<AllGridsByUserIdResultDTO>> gridResult = govOrgOpenFeignClient.getGridListByGridIds(result.stream().map(SearchByNameResultDTO::getGridId).collect(Collectors.toList())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (!gridResult.success()) { | 
					 | 
					 | 
					        if (!gridResult.success()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            throw new RenException(gridResult.getCode(),gridResult.getMsg()); | 
					 | 
					 | 
					            throw new RenException(gridResult.getCode(), gridResult.getMsg()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, String> gridMap = gridResult.getData().stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName)); | 
					 | 
					 | 
					        Map<String, String> gridMap = gridResult.getData().stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<List<IcNeighborHoodDTO>> neighborHoodResult = govOrgOpenFeignClient.getListByIds(result.stream().map(SearchByNameResultDTO::getNeighborHoodId).collect(Collectors.toList())); | 
					 | 
					 | 
					        Result<List<IcNeighborHoodDTO>> neighborHoodResult = govOrgOpenFeignClient.getListByIds(result.stream().map(SearchByNameResultDTO::getNeighborHoodId).collect(Collectors.toList())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (!neighborHoodResult.success()) { | 
					 | 
					 | 
					        if (!neighborHoodResult.success()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            throw new RenException(neighborHoodResult.getCode(),neighborHoodResult.getMsg()); | 
					 | 
					 | 
					            throw new RenException(neighborHoodResult.getCode(), neighborHoodResult.getMsg()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, String> neighborHoodMap = neighborHoodResult.getData().stream().collect(Collectors.toMap(IcNeighborHoodDTO::getId, IcNeighborHoodDTO::getNeighborHoodName)); | 
					 | 
					 | 
					        Map<String, String> neighborHoodMap = neighborHoodResult.getData().stream().collect(Collectors.toMap(IcNeighborHoodDTO::getId, IcNeighborHoodDTO::getNeighborHoodName)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<List<BuildingResultDTO>> buildResult = govOrgOpenFeignClient.buildingListByIds(result.stream().map(SearchByNameResultDTO::getBuildId).collect(Collectors.toList())); | 
					 | 
					 | 
					        Result<List<BuildingResultDTO>> buildResult = govOrgOpenFeignClient.buildingListByIds(result.stream().map(SearchByNameResultDTO::getBuildId).collect(Collectors.toList())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (!buildResult.success()) { | 
					 | 
					 | 
					        if (!buildResult.success()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            throw new RenException(buildResult.getCode(),buildResult.getMsg()); | 
					 | 
					 | 
					            throw new RenException(buildResult.getCode(), buildResult.getMsg()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, String> buildMap = buildResult.getData().stream().collect(Collectors.toMap(BuildingResultDTO::getBuildingId, BuildingResultDTO::getBuildingName)); | 
					 | 
					 | 
					        Map<String, String> buildMap = buildResult.getData().stream().collect(Collectors.toMap(BuildingResultDTO::getBuildingId, BuildingResultDTO::getBuildingName)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AtomicInteger i = new AtomicInteger(NumConstant.ONE); | 
					 | 
					 | 
					        AtomicInteger i = new AtomicInteger(NumConstant.ONE); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -911,8 +911,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * desc:条件导出 | 
					 | 
					 | 
					     * desc:条件导出 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					     * | 
					 | 
					 | 
					     * @param formItemMap   key 表名 value formItem | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formItemMap key 表名 value formItem | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					     * @param baseTableName | 
					 | 
					 | 
					     * @param baseTableName | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @return | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -928,33 +927,33 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //获取用户Id
 | 
					 | 
					 | 
					            //获取用户Id
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { | 
					 | 
					 | 
					            if (IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                resiId = (String) resiUser.get("ID"); | 
					 | 
					 | 
					                resiId = (String) resiUser.get("ID"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }else { | 
					 | 
					 | 
					            } else { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                resiId = (String) resiUser.get(UserConstant.IC_RESI_USER); | 
					 | 
					 | 
					                resiId = (String) resiUser.get(UserConstant.IC_RESI_USER); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (StringUtils.isBlank(resiId)){ | 
					 | 
					 | 
					            if (StringUtils.isBlank(resiId)) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                log.error("getDataForExport error,resiId is net exist:{}",resiUser); | 
					 | 
					 | 
					                log.error("getDataForExport error,resiId is net exist:{}", resiUser); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                return; | 
					 | 
					 | 
					                return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //遍历所有字段 格式化时间字段
 | 
					 | 
					 | 
					            //遍历所有字段 格式化时间字段
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            resiUser.forEach((k,o) -> { | 
					 | 
					 | 
					            resiUser.forEach((k, o) -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					               if (o instanceof java.sql.Date){ | 
					 | 
					 | 
					                if (o instanceof java.sql.Date) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                   o = DateUtils.format(((Date) o),DateUtils.DATE_PATTERN); | 
					 | 
					 | 
					                    o = DateUtils.format(((Date) o), DateUtils.DATE_PATTERN); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					               }else if (o instanceof java.sql.Timestamp){ | 
					 | 
					 | 
					                } else if (o instanceof java.sql.Timestamp) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    o = DateUtils.format(new Date(((Timestamp) o).getTime()),DateUtils.DATE_TIME_PATTERN); | 
					 | 
					 | 
					                    o = DateUtils.format(new Date(((Timestamp) o).getTime()), DateUtils.DATE_TIME_PATTERN); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                resiUser.put(k,o); | 
					 | 
					 | 
					                resiUser.put(k, o); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            }); | 
					 | 
					 | 
					            }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //当前条数据原始的id值 resiUser
 | 
					 | 
					 | 
					            //当前条数据原始的id值 resiUser
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            Map<String,Object> originalConditionMap = new ConcurrentHashMap<>(); | 
					 | 
					 | 
					            Map<String, Object> originalConditionMap = new ConcurrentHashMap<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            formItemMap.getItemMap().values().parallelStream().forEach(e->{ | 
					 | 
					 | 
					            formItemMap.getItemMap().values().parallelStream().forEach(e -> { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                String columnName = getColumnName(e); | 
					 | 
					 | 
					                String columnName = getColumnName(e); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                Object temp = resiUser.get(columnName); | 
					 | 
					 | 
					                Object temp = resiUser.get(columnName); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                String vauleStr = temp == null ? StrConstant.EPMETY_STR : temp.toString(); | 
					 | 
					 | 
					                String vauleStr = temp == null ? StrConstant.EPMETY_STR : temp.toString(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                originalConditionMap.putIfAbsent(columnName,vauleStr); | 
					 | 
					 | 
					                originalConditionMap.putIfAbsent(columnName, vauleStr); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                if (Constant.OPITON_SOURCE_REMOTE.equals(e.getOptionSourceType()) && StringUtils.isNotBlank(vauleStr)) { | 
					 | 
					 | 
					                if (Constant.OPITON_SOURCE_REMOTE.equals(e.getOptionSourceType()) && StringUtils.isNotBlank(vauleStr)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    putRemoteValue(formItemMap.getRemoteItemConditionMap().get(e.getItemId()), currentStaffAgencyId, resiUser,originalConditionMap, e, columnName, vauleStr); | 
					 | 
					 | 
					                    putRemoteValue(formItemMap.getRemoteItemConditionMap().get(e.getItemId()), currentStaffAgencyId, resiUser, originalConditionMap, e, columnName, vauleStr); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                } else { | 
					 | 
					 | 
					                } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    putOptionValue(resiUser, e, columnName, vauleStr); | 
					 | 
					 | 
					                    putOptionValue(resiUser, e, columnName, vauleStr); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -963,14 +962,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { | 
					 | 
					 | 
					            if (IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //把人放入redis缓存 便于后面的sheet使用基础信息
 | 
					 | 
					 | 
					                //把人放入redis缓存 便于后面的sheet使用基础信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                ResiExportBaseInfoData infoData = ConvertUtils.mapToEntity(resiUser, ResiExportBaseInfoData.class); | 
					 | 
					 | 
					                ResiExportBaseInfoData infoData = ConvertUtils.mapToEntity(resiUser, ResiExportBaseInfoData.class); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                redisTemplate.opsForValue().set(RedisKeys.getExportResiBaseInfoKey(resiId), infoData,RedisUtils.MINUTE_THIRTY_EXPIRE, TimeUnit.SECONDS); | 
					 | 
					 | 
					                redisTemplate.opsForValue().set(RedisKeys.getExportResiBaseInfoKey(resiId), infoData, RedisUtils.MINUTE_THIRTY_EXPIRE, TimeUnit.SECONDS); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					            } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                ResiExportBaseInfoData temp = (ResiExportBaseInfoData) redisTemplate.opsForValue().get(RedisKeys.getExportResiBaseInfoKey(resiId)); | 
					 | 
					 | 
					                ResiExportBaseInfoData temp = (ResiExportBaseInfoData) redisTemplate.opsForValue().get(RedisKeys.getExportResiBaseInfoKey(resiId)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if (temp != null){ | 
					 | 
					 | 
					                if (temp != null) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    try { | 
					 | 
					 | 
					                    try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        resiUser.putAll(ConvertUtils.entityToMap(temp)); | 
					 | 
					 | 
					                        resiUser.putAll(ConvertUtils.entityToMap(temp)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    }  catch (Exception e) { | 
					 | 
					 | 
					                    } catch (Exception e) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        log.error("entityToMap exception,temp:{}",temp); | 
					 | 
					 | 
					                        log.error("entityToMap exception,temp:{}", temp); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -982,15 +981,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * key:itemId,value: key:columnName,中文 | 
					 | 
					 | 
					     * key:itemId,value: key:columnName,中文 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    private static Map<String,Cache<String,String>> remoteOptionCacheMap = new HashMap<>(); | 
					 | 
					 | 
					    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) { | 
					 | 
					 | 
					    private void putRemoteValue(Set<FormItemResult> conditionItemSet, String currentStaffAgencyId, Map<String, Object> map, Map<String, Object> originalConditionMap, FormItemResult e, String columnName, String vauleStr) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        try { | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Map<String, IcResiUserImportServiceImpl.ColumnWrapper> columnWrappers = new HashMap<>(); | 
					 | 
					 | 
					            Map<String, IcResiUserImportServiceImpl.ColumnWrapper> columnWrappers = new HashMap<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (e.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)){ | 
					 | 
					 | 
					            if (e.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                for (FormItemResult o : conditionItemSet) { | 
					 | 
					 | 
					                for (FormItemResult o : conditionItemSet) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    String column = getColumnName(o); | 
					 | 
					 | 
					                    String column = getColumnName(o); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    Object conditionValue = originalConditionMap.getOrDefault(column, map.get(column)); | 
					 | 
					 | 
					                    Object conditionValue = originalConditionMap.getOrDefault(column, map.get(column)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    originalConditionMap.putIfAbsent(column,conditionValue.toString()); | 
					 | 
					 | 
					                    originalConditionMap.putIfAbsent(column, conditionValue.toString()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    IcResiUserImportServiceImpl.ColumnWrapper value = new IcResiUserImportServiceImpl.ColumnWrapper(); | 
					 | 
					 | 
					                    IcResiUserImportServiceImpl.ColumnWrapper value = new IcResiUserImportServiceImpl.ColumnWrapper(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    value.setColValue(conditionValue.toString()); | 
					 | 
					 | 
					                    value.setColValue(conditionValue.toString()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    columnWrappers.put(o.getItemId(), value); | 
					 | 
					 | 
					                    columnWrappers.put(o.getItemId(), value); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1004,10 +1004,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                continue; | 
					 | 
					 | 
					                continue; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }*/ | 
					 | 
					 | 
					            }*/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Cache<String, String> cache = remoteOptionCacheMap.getOrDefault(e.getItemId(), CacheBuilder.newBuilder().maximumSize(NumConstant.FIVE_HUNDRED).build()); | 
					 | 
					 | 
					            Cache<String, String> cache = remoteOptionCacheMap.getOrDefault(e.getItemId(), CacheBuilder.newBuilder().maximumSize(NumConstant.FIVE_HUNDRED).build()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            remoteOptionCacheMap.putIfAbsent(e.getItemId(),cache); | 
					 | 
					 | 
					            remoteOptionCacheMap.putIfAbsent(e.getItemId(), cache); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            String cacheValue = cache.getIfPresent(vauleStr); | 
					 | 
					 | 
					            String cacheValue = cache.getIfPresent(vauleStr); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (StringUtils.isNotBlank(cacheValue)){ | 
					 | 
					 | 
					            if (StringUtils.isNotBlank(cacheValue)) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                map.put(columnName,cacheValue); | 
					 | 
					 | 
					                map.put(columnName, cacheValue); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					            } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                String[] parts = icResiUserImportService.splitOptionSourceUrl(e.getOptionSourceValue()); | 
					 | 
					 | 
					                String[] parts = icResiUserImportService.splitOptionSourceUrl(e.getOptionSourceValue()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1019,7 +1019,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        if (vauleStr.equals(value)) { | 
					 | 
					 | 
					                        if (vauleStr.equals(value)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            map.put(columnName, label); | 
					 | 
					 | 
					                            map.put(columnName, label); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        } | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        cache.put(value,label); | 
					 | 
					 | 
					                        cache.put(value, label); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    }); | 
					 | 
					 | 
					                    }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1049,7 +1049,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private String getColumnName(FormItemResult e) { | 
					 | 
					 | 
					    private String getColumnName(FormItemResult e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return e.getColumnNum() == NumConstant.ZERO? e.getColumnName():e.getColumnName().concat(e.getColumnNum().toString()); | 
					 | 
					 | 
					        return e.getColumnNum() == NumConstant.ZERO ? e.getColumnName() : e.getColumnName().concat(e.getColumnNum().toString()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1120,7 +1120,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public List<DemandUserResDTO> queryDemandUsers(DemandUserFormDTO formDTO) { | 
					 | 
					 | 
					    public List<DemandUserResDTO> queryDemandUsers(DemandUserFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return baseDao.selectDemandUsers(formDTO.getAgencyId(),formDTO.getGridId(),formDTO.getName()); | 
					 | 
					 | 
					        return baseDao.selectDemandUsers(formDTO.getAgencyId(), formDTO.getGridId(), formDTO.getName()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1131,11 +1131,11 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @return | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public IcResiUserDTO getByIdCard(String customerId, String idNum,String icResiUserId) { | 
					 | 
					 | 
					    public IcResiUserDTO getByIdCard(String customerId, String idNum, String icResiUserId) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(StringUtils.isBlank(idNum)&&StringUtils.isBlank(icResiUserId)){ | 
					 | 
					 | 
					        if (StringUtils.isBlank(idNum) && StringUtils.isBlank(icResiUserId)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return null; | 
					 | 
					 | 
					            return null; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return baseDao.selectIdByIdCard(customerId,idNum,icResiUserId); | 
					 | 
					 | 
					        return baseDao.selectIdByIdCard(customerId, idNum, icResiUserId); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1194,40 +1194,40 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public IcResiUserDTO get(String icResiUserId) { | 
					 | 
					 | 
					    public IcResiUserDTO get(String icResiUserId) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        IcResiUserEntity icResiUserEntity=baseDao.selectById(icResiUserId); | 
					 | 
					 | 
					        IcResiUserEntity icResiUserEntity = baseDao.selectById(icResiUserId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return ConvertUtils.sourceToTarget(icResiUserEntity,IcResiUserDTO.class); | 
					 | 
					 | 
					        return ConvertUtils.sourceToTarget(icResiUserEntity, IcResiUserDTO.class); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description 【社区查询】人员预警右侧列表 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formDTO | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param tokenDto | 
					 | 
					 | 
					     * @param tokenDto | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Description 【社区查询】人员预警右侧列表 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @author zxc | 
					 | 
					 | 
					     * @author zxc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2022/1/17 4:25 下午 | 
					 | 
					 | 
					     * @date 2022/1/17 4:25 下午 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public PersonWarnRightListResultDTO personWarnRightList(PersonWarnRightListFormDTO formDTO, TokenDto tokenDto) { | 
					 | 
					 | 
					    public PersonWarnRightListResultDTO personWarnRightList(PersonWarnRightListFormDTO formDTO, TokenDto tokenDto) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); | 
					 | 
					 | 
					        CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (null == staffInfo){ | 
					 | 
					 | 
					        if (null == staffInfo) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            throw new EpmetException(String.format("未查询到此工作人员信息%s",tokenDto.getUserId())); | 
					 | 
					 | 
					            throw new EpmetException(String.format("未查询到此工作人员信息%s", tokenDto.getUserId())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Result<List<CustomerCategoryShowAndWarnListResultDTO>> configListResult = operCustomizeOpenFeignClient.getCustomerCategoryShowAndWarnList(tokenDto.getCustomerId()); | 
					 | 
					 | 
					        Result<List<CustomerCategoryShowAndWarnListResultDTO>> configListResult = operCustomizeOpenFeignClient.getCustomerCategoryShowAndWarnList(tokenDto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!configListResult.success()){ | 
					 | 
					 | 
					        if (!configListResult.success()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            throw new EpmetException("查询居民分类配置失败..."); | 
					 | 
					 | 
					            throw new EpmetException("查询居民分类配置失败..."); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        PersonWarnRightListResultDTO result = new PersonWarnRightListResultDTO(); | 
					 | 
					 | 
					        PersonWarnRightListResultDTO result = new PersonWarnRightListResultDTO(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (CollectionUtils.isEmpty(configListResult.getData())){ | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(configListResult.getData())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return result; | 
					 | 
					 | 
					            return result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<CustomerCategoryShowAndWarnListResultDTO> configListOrigin = configListResult.getData(); | 
					 | 
					 | 
					        List<CustomerCategoryShowAndWarnListResultDTO> configListOrigin = configListResult.getData(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<CustomerCategoryShowAndWarnListResultDTO> configList = new ArrayList<>(); | 
					 | 
					 | 
					        List<CustomerCategoryShowAndWarnListResultDTO> configList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getCategoryCode())){ | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getCategoryCode())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            for (CustomerCategoryShowAndWarnListResultDTO c : configListOrigin) { | 
					 | 
					 | 
					            for (CustomerCategoryShowAndWarnListResultDTO c : configListOrigin) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if (c.getColumnName().equals(formDTO.getCategoryCode())){ | 
					 | 
					 | 
					                if (c.getColumnName().equals(formDTO.getCategoryCode())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    configList.add(c); | 
					 | 
					 | 
					                    configList.add(c); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }else { | 
					 | 
					 | 
					        } else { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            configList = configListOrigin; | 
					 | 
					 | 
					            configList = configListOrigin; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<CustomerCategoryShowAndWarnListResultDTO> finalConfigList = configList; | 
					 | 
					 | 
					        List<CustomerCategoryShowAndWarnListResultDTO> finalConfigList = configList; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1238,8 +1238,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); | 
					 | 
					 | 
					        result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<PersonWarnRightListResultDTO.PersonWarnRightList> userList = disposeCategory(list, configList); | 
					 | 
					 | 
					        List<PersonWarnRightListResultDTO.PersonWarnRightList> userList = disposeCategory(list, configList); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<List<HouseInfoDTO>> houseInfosResult = govOrgOpenFeignClient.queryListHouseInfo(userList.stream().distinct().map(m -> m.getHomeId()).collect(Collectors.toSet()),tokenDto.getCustomerId()); | 
					 | 
					 | 
					        Result<List<HouseInfoDTO>> houseInfosResult = govOrgOpenFeignClient.queryListHouseInfo(userList.stream().distinct().map(m -> m.getHomeId()).collect(Collectors.toSet()), tokenDto.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!houseInfosResult.success()){ | 
					 | 
					 | 
					        if (!houseInfosResult.success()) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            throw new EpmetException("查询房屋信息失败..."); | 
					 | 
					 | 
					            throw new EpmetException("查询房屋信息失败..."); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<HouseInfoDTO> houseInfos = houseInfosResult.getData(); | 
					 | 
					 | 
					        List<HouseInfoDTO> houseInfos = houseInfosResult.getData(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1257,6 +1257,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * Desc: 根据房屋IDs查询房屋下是否有存在居民的 | 
					 | 
					 | 
					     * Desc: 根据房屋IDs查询房屋下是否有存在居民的 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param ids | 
					 | 
					 | 
					     * @param ids | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @author zxc | 
					 | 
					 | 
					     * @author zxc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2022/3/2 10:32 上午 | 
					 | 
					 | 
					     * @date 2022/3/2 10:32 上午 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1295,7 +1296,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Set<String> houseIds = new HashSet<>(); | 
					 | 
					 | 
					            Set<String> houseIds = new HashSet<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<String> houseIdList = list.stream().map(EpidemicPreventionResultDTO::getHomeId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()); | 
					 | 
					 | 
					            List<String> houseIdList = list.stream().map(EpidemicPreventionResultDTO::getHomeId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            houseIds.addAll(houseIdList); | 
					 | 
					 | 
					            houseIds.addAll(houseIdList); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            Result<List<HouseInfoDTO>> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(houseIds,formDTO.getCustomerId()); | 
					 | 
					 | 
					            Result<List<HouseInfoDTO>> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds, formDTO.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            List<HouseInfoDTO> houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>(); | 
					 | 
					 | 
					            List<HouseInfoDTO> houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Map<String, HouseInfoDTO> houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); | 
					 | 
					 | 
					            Map<String, HouseInfoDTO> houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            list.forEach(item -> { | 
					 | 
					 | 
					            list.forEach(item -> { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1319,9 +1320,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); | 
					 | 
					 | 
					        PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<EpidemicPreventionResultDTO> list = new ArrayList<>(); | 
					 | 
					 | 
					        List<EpidemicPreventionResultDTO> list = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (formDTO.getAttentionType().equals(NumConstant.TWO)){ | 
					 | 
					 | 
					        if (formDTO.getAttentionType().equals(NumConstant.TWO)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            list = baseDao.natList(formDTO); | 
					 | 
					 | 
					            list = baseDao.natList(formDTO); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }else if (formDTO.getAttentionType().equals(NumConstant.ONE)){ | 
					 | 
					 | 
					        } else if (formDTO.getAttentionType().equals(NumConstant.ONE)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            list = baseDao.vaccineList(formDTO); | 
					 | 
					 | 
					            list = baseDao.vaccineList(formDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Set<String> homeIds = list.stream().filter(m -> StringUtils.isNotBlank(m.getIdCard())).map(m -> m.getHomeId()).distinct().collect(Collectors.toSet()); | 
					 | 
					 | 
					        Set<String> homeIds = list.stream().filter(m -> StringUtils.isNotBlank(m.getIdCard())).map(m -> m.getHomeId()).distinct().collect(Collectors.toSet()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1403,31 +1404,31 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description  居民分类 和 网格名 处理 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param list | 
					 | 
					 | 
					     * @param list | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param configList | 
					 | 
					 | 
					     * @param configList | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Description 居民分类 和 网格名 处理 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @author zxc | 
					 | 
					 | 
					     * @author zxc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2022/1/18 3:22 下午 | 
					 | 
					 | 
					     * @date 2022/1/18 3:22 下午 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public List<PersonWarnRightListResultDTO.PersonWarnRightList> disposeCategory(List<Map<String, Object>> list,List<CustomerCategoryShowAndWarnListResultDTO> configList){ | 
					 | 
					 | 
					    public List<PersonWarnRightListResultDTO.PersonWarnRightList> disposeCategory(List<Map<String, Object>> list, List<CustomerCategoryShowAndWarnListResultDTO> configList) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        List<PersonWarnRightListResultDTO.PersonWarnRightList> userList = new ArrayList<>(); | 
					 | 
					 | 
					        List<PersonWarnRightListResultDTO.PersonWarnRightList> userList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        list.forEach(l -> { | 
					 | 
					 | 
					        list.forEach(l -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            PersonWarnRightListResultDTO.PersonWarnRightList dto = ConvertUtils.mapToEntity(l, PersonWarnRightListResultDTO.PersonWarnRightList.class); | 
					 | 
					 | 
					            PersonWarnRightListResultDTO.PersonWarnRightList dto = ConvertUtils.mapToEntity(l, PersonWarnRightListResultDTO.PersonWarnRightList.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 分类名字
 | 
					 | 
					 | 
					            // 分类名字
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<String> types = new ArrayList<>(); | 
					 | 
					 | 
					            List<String> types = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            configList.forEach(c -> { | 
					 | 
					 | 
					            configList.forEach(c -> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                l.forEach((k,v) -> { | 
					 | 
					 | 
					                l.forEach((k, v) -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if (c.getColumnName().equals(k) && null != v && v.equals(NumConstant.ONE_STR)){ | 
					 | 
					 | 
					                    if (c.getColumnName().equals(k) && null != v && v.equals(NumConstant.ONE_STR)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                        types.add(c.getLabel()); | 
					 | 
					 | 
					                        types.add(c.getLabel()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                }); | 
					 | 
					 | 
					                }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }); | 
					 | 
					 | 
					            }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 只显示有类别的居民
 | 
					 | 
					 | 
					            // 只显示有类别的居民
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(types)){ | 
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(types)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                dto.setType(types); | 
					 | 
					 | 
					                dto.setType(types); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); | 
					 | 
					 | 
					                GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if (null == gridInfo){ | 
					 | 
					 | 
					                if (null == gridInfo) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new EpmetException(String.format("查询网格信息失败%s",dto.getGridId())); | 
					 | 
					 | 
					                    throw new EpmetException(String.format("查询网格信息失败%s", dto.getGridId())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                dto.setGridName(gridInfo.getGridNamePath()); | 
					 | 
					 | 
					                dto.setGridName(gridInfo.getGridNamePath()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                userList.add(dto); | 
					 | 
					 | 
					                userList.add(dto); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1438,6 +1439,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * 查询志愿者类别options | 
					 | 
					 | 
					     * 查询志愿者类别options | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param customerId | 
					 | 
					 | 
					     * @param customerId | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @return | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1486,7 +1488,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            OptionDataResultDTO dto = new OptionDataResultDTO(); | 
					 | 
					 | 
					            OptionDataResultDTO dto = new OptionDataResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setCode(item.getValue()); | 
					 | 
					 | 
					            dto.setCode(item.getValue()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setLabel(item.getLabel()); | 
					 | 
					 | 
					            dto.setLabel(item.getLabel()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            dto.setValue(null == finalMap.get(item.getValue())?NumConstant.ZERO_STR:finalMap.get(item.getValue())); | 
					 | 
					 | 
					            dto.setValue(null == finalMap.get(item.getValue()) ? NumConstant.ZERO_STR : finalMap.get(item.getValue())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            BigDecimal radio = new BigDecimal("0.00"); | 
					 | 
					 | 
					            BigDecimal radio = new BigDecimal("0.00"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (NumConstant.ZERO != finalTotal) { | 
					 | 
					 | 
					            if (NumConstant.ZERO != finalTotal) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                BigDecimal sum = new BigDecimal(finalTotal); | 
					 | 
					 | 
					                BigDecimal sum = new BigDecimal(finalTotal); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1549,7 +1551,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            OptionDataResultDTO dto = new OptionDataResultDTO(); | 
					 | 
					 | 
					            OptionDataResultDTO dto = new OptionDataResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setCode(item.getValue()); | 
					 | 
					 | 
					            dto.setCode(item.getValue()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setLabel(item.getLabel()); | 
					 | 
					 | 
					            dto.setLabel(item.getLabel()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            dto.setValue(null == finalMap.get(item.getValue())?NumConstant.ZERO_STR:finalMap.get(item.getValue())); | 
					 | 
					 | 
					            dto.setValue(null == finalMap.get(item.getValue()) ? NumConstant.ZERO_STR : finalMap.get(item.getValue())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            BigDecimal radio = new BigDecimal("0.00"); | 
					 | 
					 | 
					            BigDecimal radio = new BigDecimal("0.00"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (NumConstant.ZERO != finalTotal) { | 
					 | 
					 | 
					            if (NumConstant.ZERO != finalTotal) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                BigDecimal sum = new BigDecimal(finalTotal); | 
					 | 
					 | 
					                BigDecimal sum = new BigDecimal(finalTotal); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1653,4 +1655,32 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return userList; | 
					 | 
					 | 
					        return userList; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public List<HomeUserBriefResultDTO> listHomeUserBrief(String houseId, String customerId) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        LambdaQueryWrapper<IcResiUserEntity> lqw = new LambdaQueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        lqw.eq(IcResiUserEntity::getCustomerId, customerId) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                .eq(IcResiUserEntity::getHomeId, houseId) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                .select( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getId, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getHomeId, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getName, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getIsParty, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getYhzgx, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getGender, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getMobile, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getIdCard, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        IcResiUserEntity::getBirthday | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                ) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                .orderByAsc(IcResiUserEntity::getYhzgx); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        List<IcResiUserEntity> homeUserList = baseDao.selectList(lqw); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (CollUtil.isEmpty(homeUserList)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return Lists.newArrayList(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        homeUserList.forEach( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                item -> item.setYhzgx(RelationshipEnum.getEnum(item.getYhzgx()).getName()) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return ConvertUtils.sourceToTarget(homeUserList, HomeUserBriefResultDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |