|  | @ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.NumConstant; |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.StrConstant; |  |  | import com.epmet.commons.tools.constant.StrConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.commons.tools.enums.DictTypeEnum; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetException; |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.ExceptionUtils; |  |  | import com.epmet.commons.tools.exception.ExceptionUtils; | 
			
		
	
	
		
		
			
				
					|  | @ -43,6 +44,7 @@ import com.epmet.entity.IcCommunitySelfOrganizationEntity; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; |  |  | import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.excel.CommunitySelfOrgImportExcel; |  |  | import com.epmet.excel.CommunitySelfOrgImportExcel; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.excel.ImportCommunitySelfOrganization; |  |  | import com.epmet.excel.ImportCommunitySelfOrganization; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.feign.EpmetAdminOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |  |  | import com.epmet.feign.EpmetCommonServiceOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.feign.OssFeignClient; |  |  | import com.epmet.feign.OssFeignClient; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; |  |  | import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; | 
			
		
	
	
		
		
			
				
					|  | @ -51,6 +53,7 @@ import com.github.pagehelper.PageHelper; | 
			
		
	
		
		
			
				
					|  |  | import com.github.pagehelper.PageInfo; |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
		
			
				
					|  |  | 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.collections4.MapUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.fileupload.FileItem; |  |  | import org.apache.commons.fileupload.FileItem; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.fileupload.FileItemFactory; |  |  | import org.apache.commons.fileupload.FileItemFactory; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.fileupload.disk.DiskFileItemFactory; |  |  | import org.apache.commons.fileupload.disk.DiskFileItemFactory; | 
			
		
	
	
		
		
			
				
					|  | @ -93,6 +96,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo | 
			
		
	
		
		
			
				
					|  |  |     private OssFeignClient ossFeignClient; |  |  |     private OssFeignClient ossFeignClient; | 
			
		
	
		
		
			
				
					|  |  |     @Autowired |  |  |     @Autowired | 
			
		
	
		
		
			
				
					|  |  |     private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; |  |  |     private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     @Autowired | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     private EpmetAdminOpenFeignClient adminOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public PageData<IcCommunitySelfOrganizationDTO> page(Map<String, Object> params) { |  |  |     public PageData<IcCommunitySelfOrganizationDTO> page(Map<String, Object> params) { | 
			
		
	
	
		
		
			
				
					|  | @ -313,6 +318,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo | 
			
		
	
		
		
			
				
					|  |  |         formDTO.setCustomerId(tokenDto.getCustomerId()); |  |  |         formDTO.setCustomerId(tokenDto.getCustomerId()); | 
			
		
	
		
		
			
				
					|  |  |         final int[] i = {(formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize() + NumConstant.ONE}; |  |  |         final int[] i = {(formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize() + NumConstant.ONE}; | 
			
		
	
		
		
			
				
					|  |  |         CommunitySelfOrganizationListResultDTO result = new CommunitySelfOrganizationListResultDTO(); |  |  |         CommunitySelfOrganizationListResultDTO result = new CommunitySelfOrganizationListResultDTO(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         //获取分类名称字典
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         Result<Map<String, String>> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         if (formDTO.getIsPage()){ |  |  |         if (formDTO.getIsPage()){ | 
			
		
	
		
		
			
				
					|  |  |             PageInfo<CommunitySelfOrganizationListDTO> objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); |  |  |             PageInfo<CommunitySelfOrganizationListDTO> objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); | 
			
		
	
		
		
			
				
					|  |  |             result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); |  |  |             result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); | 
			
		
	
	
		
		
			
				
					|  | @ -321,6 +331,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo | 
			
		
	
		
		
			
				
					|  |  |                     l.setSort(i[NumConstant.ZERO]); |  |  |                     l.setSort(i[NumConstant.ZERO]); | 
			
		
	
		
		
			
				
					|  |  |                     i[NumConstant.ZERO]++; |  |  |                     i[NumConstant.ZERO]++; | 
			
		
	
		
		
			
				
					|  |  |                     l.setScore(null == pointMap.get(l.getOrgId()) ? NumConstant.ZERO : pointMap.get(l.getOrgId())); |  |  |                     l.setScore(null == pointMap.get(l.getOrgId()) ? NumConstant.ZERO : pointMap.get(l.getOrgId())); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     //赋值分类名称
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     l.setCategoryName(dictMap.get(l.getCategoryCode())); | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |                 result.setList(objectPageInfo.getList()); |  |  |                 result.setList(objectPageInfo.getList()); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
	
		
		
			
				
					|  | @ -333,6 +345,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo | 
			
		
	
		
		
			
				
					|  |  |             for (CommunitySelfOrganizationListDTO r : resultDTOs) { |  |  |             for (CommunitySelfOrganizationListDTO r : resultDTOs) { | 
			
		
	
		
		
			
				
					|  |  |                 r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); |  |  |                 r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); | 
			
		
	
		
		
			
				
					|  |  |                 r.setScore(null == pointMap.get(r.getOrgId()) ? NumConstant.ZERO : pointMap.get(r.getOrgId())); |  |  |                 r.setScore(null == pointMap.get(r.getOrgId()) ? NumConstant.ZERO : pointMap.get(r.getOrgId())); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 //赋值分类名称
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 r.setCategoryName(dictMap.get(r.getCategoryCode())); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             result.setList(resultDTOs); |  |  |             result.setList(resultDTOs); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
	
		
		
			
				
					|  | @ -538,7 +552,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo | 
			
		
	
		
		
			
				
					|  |  |                         iterator.remove(); |  |  |                         iterator.remove(); | 
			
		
	
		
		
			
				
					|  |  |                     } |  |  |                     } | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |                 Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |                 Map<String, String> categoryMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); | 
			
		
	
		
		
			
				
					|  |  |                 list.forEach(l -> { |  |  |                 list.forEach(l -> { | 
			
		
	
		
		
			
				
					|  |  |                     IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(l, IcCommunitySelfOrganizationEntity.class); |  |  |                     IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(l, IcCommunitySelfOrganizationEntity.class); | 
			
		
	
		
		
			
				
					|  |  |                     e.setCustomerId(tokenDto.getCustomerId()); |  |  |                     e.setCustomerId(tokenDto.getCustomerId()); | 
			
		
	
	
		
		
			
				
					|  | @ -547,7 +562,13 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo | 
			
		
	
		
		
			
				
					|  |  |                     e.setPid(agencyInfo.getPid()); |  |  |                     e.setPid(agencyInfo.getPid()); | 
			
		
	
		
		
			
				
					|  |  |                     e.setPids(agencyInfo.getPids()); |  |  |                     e.setPids(agencyInfo.getPids()); | 
			
		
	
		
		
			
				
					|  |  |                     e.setOrganizationCreatedTime(DateUtils.parse(l.getOrganizationCreatedTime(), DATE_PATTERN)); |  |  |                     e.setOrganizationCreatedTime(DateUtils.parse(l.getOrganizationCreatedTime(), DATE_PATTERN)); | 
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |                     //赋值分类编码,excel输入的是分类名称,需要找到admin字典库中的key
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |                     for (String key : categoryMap.keySet()) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         if (StringUtils.isNotBlank(categoryMap.get(key)) && categoryMap.get(key).equals(e.getCategoryCode())) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                             e.setCategoryCode(categoryMap.get(key)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                             break; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					|  |  |                     List<IcCommunitySelfOrganizationPersonnelEntity> persons = new ArrayList<>(); |  |  |                     List<IcCommunitySelfOrganizationPersonnelEntity> persons = new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |                     AtomicReference<Boolean> bl = new AtomicReference<>(false); |  |  |                     AtomicReference<Boolean> bl = new AtomicReference<>(false); | 
			
		
	
		
		
			
				
					|  |  |                     StringBuffer msg = new StringBuffer(""); |  |  |                     StringBuffer msg = new StringBuffer(""); | 
			
		
	
	
		
		
			
				
					|  | 
 |