| 
						
						
							
								
							
						
						
					 | 
					@ -39,7 +39,9 @@ import com.epmet.commons.tools.exception.EpmetException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.ExceptionUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.ExceptionUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.GridInfoCache; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ExcelPoiUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ExcelPoiUtils; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -48,11 +50,9 @@ import com.epmet.constant.UserDemandConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constants.ImportTaskConstants; | 
					 | 
					 | 
					import com.epmet.constants.ImportTaskConstants; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.IcPartyUnitDao; | 
					 | 
					 | 
					import com.epmet.dao.IcPartyUnitDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.IcPartyUnitDTO; | 
					 | 
					 | 
					import com.epmet.dto.IcPartyUnitDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import com.epmet.dto.form.ImportTaskCommonFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.form.*; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.PartyActivityFormDTO; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.PartyUnitFormDTO; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.PartyUnitListbriefFormDTO; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.demand.ServiceQueryFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.form.demand.ServiceQueryFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.dto.result.PartyTypepercentResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.PartyUnitDistributionResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.result.PartyUnitDistributionResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.PartyUnitListbrieResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.result.PartyUnitListbrieResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.UploadImgResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.result.UploadImgResultDTO; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -128,10 +128,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
					 | 
					 | 
					        List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); | 
					 | 
					 | 
					        PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); | 
					 | 
					 | 
					        List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<Map<String, String>> unitTypeMap =  epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); | 
					 | 
					 | 
					        Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
 | 
					 | 
					 | 
					        //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); | 
					 | 
					 | 
					        List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); | 
					 | 
					 | 
					        Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //获取单位积分
 | 
					 | 
					 | 
					        //获取单位积分
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); | 
					 | 
					 | 
					        Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dtoList.forEach(item -> { | 
					 | 
					 | 
					        dtoList.forEach(item -> { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -142,12 +142,12 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					            } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                item.setServiceMatterList(new ArrayList<>()); | 
					 | 
					 | 
					                item.setServiceMatterList(new ArrayList<>()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if(StringUtils.isBlank(item.getSatisfaction())){ | 
					 | 
					 | 
					            if (StringUtils.isBlank(item.getSatisfaction())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                item.setSatisfaction(StrConstant.HYPHEN); | 
					 | 
					 | 
					                item.setSatisfaction(StrConstant.HYPHEN); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					            } else { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2,BigDecimal.ROUND_HALF_UP).toString()); | 
					 | 
					 | 
					                item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId())); | 
					 | 
					 | 
					            item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new PageData<>(dtoList, pageInfo.getTotal()); | 
					 | 
					 | 
					        return new PageData<>(dtoList, pageInfo.getTotal()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -164,10 +164,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); | 
					 | 
					 | 
					        wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
					 | 
					 | 
					        List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); | 
					 | 
					 | 
					        List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<Map<String, String>> unitTypeMap =  epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); | 
					 | 
					 | 
					        Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
 | 
					 | 
					 | 
					        //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); | 
					 | 
					 | 
					        List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); | 
					 | 
					 | 
					        Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //获取单位积分
 | 
					 | 
					 | 
					        //获取单位积分
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); | 
					 | 
					 | 
					        Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dtoList.forEach(item -> { | 
					 | 
					 | 
					        dtoList.forEach(item -> { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -178,13 +178,13 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					            } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                item.setServiceMatterList(new ArrayList<>()); | 
					 | 
					 | 
					                item.setServiceMatterList(new ArrayList<>()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId())); | 
					 | 
					 | 
					            item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return dtoList; | 
					 | 
					 | 
					        return dtoList; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    private QueryWrapper<IcPartyUnitEntity> getWrapper(Map<String, Object> params){ | 
					 | 
					 | 
					    private QueryWrapper<IcPartyUnitEntity> getWrapper(Map<String, Object> params) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String id = (String)params.get(FieldConstant.ID_HUMP); | 
					 | 
					 | 
					        String id = (String) params.get(FieldConstant.ID_HUMP); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        QueryWrapper<IcPartyUnitEntity> wrapper = new QueryWrapper<>(); | 
					 | 
					 | 
					        QueryWrapper<IcPartyUnitEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -200,14 +200,14 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //获取单位积分
 | 
					 | 
					 | 
					            //获取单位积分
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); | 
					 | 
					 | 
					            Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); | 
					 | 
					 | 
					            dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            dto.setScore(null == pointMap.get(id)?NumConstant.ZERO:pointMap.get(id)); | 
					 | 
					 | 
					            dto.setScore(null == pointMap.get(id) ? NumConstant.ZERO : pointMap.get(id)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return dto; | 
					 | 
					 | 
					        return dto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public void save(TokenDto tokenDto,  IcPartyUnitDTO dto) { | 
					 | 
					 | 
					    public void save(TokenDto tokenDto, IcPartyUnitDTO dto) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class); | 
					 | 
					 | 
					        IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        CustomerStaffInfoCacheResult staff = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); | 
					 | 
					 | 
					        CustomerStaffInfoCacheResult staff = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        entity.setAgencyId(staff.getAgencyId()); | 
					 | 
					 | 
					        entity.setAgencyId(staff.getAgencyId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -219,7 +219,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(IcPartyUnitEntity::getAgencyId, entity.getAgencyId()); | 
					 | 
					 | 
					        wrapper.eq(IcPartyUnitEntity::getAgencyId, entity.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(IcPartyUnitEntity::getUnitName, entity.getUnitName()); | 
					 | 
					 | 
					        wrapper.eq(IcPartyUnitEntity::getUnitName, entity.getUnitName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
					 | 
					 | 
					        List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(StringUtils.isBlank(entity.getId())) { | 
					 | 
					 | 
					        if (StringUtils.isBlank(entity.getId())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(list)) { | 
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(list)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                throw new EpmetException(EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getCode(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg()); | 
					 | 
					 | 
					                throw new EpmetException(EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getCode(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -258,19 +258,19 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) { | 
					 | 
					 | 
					            if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); | 
					 | 
					 | 
					                agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					            } else { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                //当前用户属于第二级组织的人,不会有:
 | 
					 | 
					 | 
					                //当前用户属于第二级组织的人,不会有:
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                agencyIds.add(staffInfoCacheResult.getAgencyPIds()); | 
					 | 
					 | 
					                agencyIds.add(staffInfoCacheResult.getAgencyPIds()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        agencyIds.add(staffInfoCacheResult.getAgencyId()); | 
					 | 
					 | 
					        agencyIds.add(staffInfoCacheResult.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); | 
					 | 
					 | 
					        resultList = baseDao.selectListByAgencyId(agencyIds, formDTO.getServiceName(), formDTO.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        return resultList; | 
					 | 
					 | 
					        return resultList; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description 获取组织下单位列表 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param dto | 
					 | 
					 | 
					     * @param dto | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Description 获取组织下单位列表 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Return {@link List< OptionDTO>} | 
					 | 
					 | 
					     * @Return {@link List< OptionDTO>} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Author zhaoqifeng | 
					 | 
					 | 
					     * @Author zhaoqifeng | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Date 2021/11/22 14:35 | 
					 | 
					 | 
					     * @Date 2021/11/22 14:35 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -347,8 +347,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (null == staffInfoCache) { | 
					 | 
					 | 
					        if (null == staffInfoCache) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new EpmetException(8000, "获取用户缓存失败"); | 
					 | 
					 | 
					            throw new EpmetException(8000, "获取用户缓存失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); | 
					 | 
					 | 
					        List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); | 
					 | 
					 | 
					        Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //1.数据校验
 | 
					 | 
					 | 
					        //1.数据校验
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Iterator<IcPartyUnitImportExcel> iterator = result.iterator(); | 
					 | 
					 | 
					        Iterator<IcPartyUnitImportExcel> iterator = result.iterator(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        while (iterator.hasNext()) { | 
					 | 
					 | 
					        while (iterator.hasNext()) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -519,6 +519,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException(result.getInternalMsg()); | 
					 | 
					 | 
					            throw new RenException(result.getInternalMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formDTO | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description 按类型统计单位数量 | 
					 | 
					 | 
					     * @Description 按类型统计单位数量 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -543,7 +544,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            OptionDataResultDTO dto = new OptionDataResultDTO(); | 
					 | 
					 | 
					            OptionDataResultDTO dto = new OptionDataResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setLabel(item.getLabel()); | 
					 | 
					 | 
					            dto.setLabel(item.getLabel()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setCode(item.getValue()); | 
					 | 
					 | 
					            dto.setCode(item.getValue()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            dto.setValue(null == map.get(item.getValue())?NumConstant.ZERO_STR:map.get(item.getValue())); | 
					 | 
					 | 
					            dto.setValue(null == map.get(item.getValue()) ? NumConstant.ZERO_STR : map.get(item.getValue())); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return dto; | 
					 | 
					 | 
					            return dto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }).collect(Collectors.toList()); | 
					 | 
					 | 
					        }).collect(Collectors.toList()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -559,7 +560,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO) { | 
					 | 
					 | 
					    public List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<Map<String, String>> unitTypeMap =  epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); | 
					 | 
					 | 
					        Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        List<PartyUnitDistributionResultDTO> list = baseDao.getDistribution(formDTO.getAgencyId()); | 
					 | 
					 | 
					        List<PartyUnitDistributionResultDTO> list = baseDao.getDistribution(formDTO.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (CollectionUtils.isEmpty(list)) { | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(list)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return Collections.emptyList(); | 
					 | 
					 | 
					            return Collections.emptyList(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -573,35 +574,49 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * 计算区域化党建单位的群众满意度 | 
					 | 
					 | 
					     * 计算区域化党建单位的群众满意度 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * 总分➗需求个数 | 
					 | 
					 | 
					     * 总分➗需求个数 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formDTO | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO) { | 
					 | 
					 | 
					    public void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        log.info("收到消息内容啦...." + JSON.toJSONString(formDTO)); | 
					 | 
					 | 
					        log.info("收到消息内容啦...." + JSON.toJSONString(formDTO)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<ServiceStatDTO> list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(),formDTO.getServiceType()); | 
					 | 
					 | 
					        List<ServiceStatDTO> list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(), formDTO.getServiceType()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        for (ServiceStatDTO serviceStatDTO : list) { | 
					 | 
					 | 
					        for (ServiceStatDTO serviceStatDTO : list) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (0 != serviceStatDTO.getDemandCount()) { | 
					 | 
					 | 
					            if (0 != serviceStatDTO.getDemandCount()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP); | 
					 | 
					 | 
					                BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                baseDao.updateSatisfaction(serviceStatDTO.getServerId(),result); | 
					 | 
					 | 
					                baseDao.updateSatisfaction(serviceStatDTO.getServerId(), result); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public List<IcPartyUnitEntity> queryListById(List<String> partyUnitIds) { | 
					 | 
					 | 
					    public List<IcPartyUnitEntity> queryListById(List<String> partyUnitIds) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(CollectionUtils.isNotEmpty(partyUnitIds)){ | 
					 | 
					 | 
					        if (CollectionUtils.isNotEmpty(partyUnitIds)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return baseDao.selectBatchIds(partyUnitIds); | 
					 | 
					 | 
					            return baseDao.selectBatchIds(partyUnitIds); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return Collections.EMPTY_LIST; | 
					 | 
					 | 
					        return Collections.EMPTY_LIST; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public PageData getListbrief(PartyUnitListbriefFormDTO form,TokenDto tokenDto) { | 
					 | 
					 | 
					    public PageData getListbrief(PartyUnitListbriefFormDTO form, TokenDto tokenDto) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            PageHelper.startPage(form.getPageNo(),form.getPageSize()); | 
					 | 
					 | 
					        PageHelper.startPage(form.getPageNo(), form.getPageSize()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            List<PartyUnitListbrieResultDTO> dto = baseDao.getListbrief(form,tokenDto.getCustomerId()); | 
					 | 
					 | 
					        List<PartyUnitListbrieResultDTO> dto = baseDao.getListbrief(form, tokenDto.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            PageInfo<PartyUnitListbrieResultDTO> info = new PageInfo<>(dto); | 
					 | 
					 | 
					        PageInfo<PartyUnitListbrieResultDTO> info = new PageInfo<>(dto); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            return new PageData<>(dto,info.getTotal()); | 
					 | 
					 | 
					        return new PageData<>(dto, info.getTotal()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public List<PartyTypepercentResultDTO> getTypepercent(PartyTypepercentFormDTO form) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        List<PartyTypepercentResultDTO> dto = baseDao.getTypepercent(form.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        int total = 0; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        for (PartyTypepercentResultDTO item : dto) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            total = Integer.parseInt(item.getValue()) + total; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        for (PartyTypepercentResultDTO item : dto) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            item.setPercent((Integer.parseInt(item.getValue()) * 100) / total + "%"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return dto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private String getServiceMatter(Map<String, String> map, String matter) { | 
					 | 
					 | 
					    private String getServiceMatter(Map<String, String> map, String matter) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |