|
|
|
@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.DictListFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.FormItemTypeEnum; |
|
|
|
import com.epmet.commons.tools.enums.GenderEnum; |
|
|
|
import com.epmet.commons.tools.enums.HouseTypeEnum; |
|
|
|
import com.epmet.commons.tools.enums.RelationshipEnum; |
|
|
|
import com.epmet.commons.tools.dto.result.DictListResultDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; |
|
|
|
import com.epmet.commons.tools.enums.*; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
@ -54,10 +54,7 @@ import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.IcResiUserEntity; |
|
|
|
import com.epmet.excel.support.ExportResiUserItemDTO; |
|
|
|
import com.epmet.feign.EpmetHeartOpenFeignClient; |
|
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
|
import com.epmet.feign.*; |
|
|
|
import com.epmet.service.IcResiUserService; |
|
|
|
import com.epmet.service.UserService; |
|
|
|
import com.github.pagehelper.Page; |
|
|
|
@ -102,6 +99,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
private RedisUtils redisUtils; |
|
|
|
@Autowired |
|
|
|
private UserService userService; |
|
|
|
@Autowired |
|
|
|
private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; |
|
|
|
|
|
|
|
private QueryWrapper<IcResiUserEntity> getWrapper(Map<String, Object> params){ |
|
|
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
|
|
|
@ -883,4 +882,106 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
public IcResiUserBriefDTO findFamilyMem(String icResiUserId) { |
|
|
|
return baseDao.selectIcResuUser(icResiUserId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 党员年龄范围统计 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @Param formDTO |
|
|
|
* @Return {@link List< OptionDataResultDTO >} |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2021/12/10 15:54 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<OptionDataResultDTO> partyMemberAgeStatistics(PartyMemberStatisticsFormDTO formDTO) { |
|
|
|
//获取年龄范围字典
|
|
|
|
DictListFormDTO dictFormDTO = new DictListFormDTO(); |
|
|
|
dictFormDTO.setDictType(DictTypeEnum.AGE_GROUP.getCode()); |
|
|
|
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFormDTO); |
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
//统计组织下各年龄范围人数
|
|
|
|
List<OptionDataResultDTO> list = baseDao.getPartyMemberAgeStatistics(formDTO.getOrgType(), formDTO.getOrgId()); |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
map = list.stream().collect(Collectors.toMap(OptionDataResultDTO::getCode, OptionDataResultDTO::getValue)); |
|
|
|
} |
|
|
|
Map<String, String> finalMap = map; |
|
|
|
return dictResult.getData().stream().map(item -> { |
|
|
|
OptionDataResultDTO dto = new OptionDataResultDTO(); |
|
|
|
dto.setCode(item.getValue()); |
|
|
|
dto.setLabel(item.getLabel()); |
|
|
|
dto.setValue(null == finalMap.get(item.getValue())?NumConstant.ZERO_STR:finalMap.get(item.getValue())); |
|
|
|
return dto; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取年龄范围内党员列表 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @Param formDTO |
|
|
|
* @Return {@link List< PartyMemberAgeResultDTO>} |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2021/12/10 17:40 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageData<PartyMemberAgeResultDTO> getPartyMemberAgeList(PartyMemberListFormDTO formDTO) { |
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|
|
|
List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode()); |
|
|
|
PageInfo<PartyMemberAgeResultDTO> pageInfo = new PageInfo<>(list); |
|
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 党员文化程度统计 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @Param formDTO |
|
|
|
* @Return {@link List< OptionDataResultDTO>} |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2021/12/10 17:40 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<OptionDataResultDTO> partyMemberEducationStatistics(PartyMemberStatisticsFormDTO formDTO) { |
|
|
|
//获取文化程度字典
|
|
|
|
DictListFormDTO dictFormDTO = new DictListFormDTO(); |
|
|
|
dictFormDTO.setDictType(DictTypeEnum.EDUCATION.getCode()); |
|
|
|
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFormDTO); |
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
//统计组织下文化程度党员人数
|
|
|
|
List<OptionDataResultDTO> list = baseDao.getPartyMemberEducationStatistics(formDTO.getOrgType(), formDTO.getOrgId()); |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
map = list.stream().collect(Collectors.toMap(OptionDataResultDTO::getCode, OptionDataResultDTO::getValue)); |
|
|
|
} |
|
|
|
Map<String, String> finalMap = map; |
|
|
|
return dictResult.getData().stream().map(item -> { |
|
|
|
OptionDataResultDTO dto = new OptionDataResultDTO(); |
|
|
|
dto.setCode(item.getValue()); |
|
|
|
dto.setLabel(item.getLabel()); |
|
|
|
dto.setValue(null == finalMap.get(item.getValue())?NumConstant.ZERO_STR:finalMap.get(item.getValue())); |
|
|
|
return dto; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 按教育程度获取党员列表 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @Param formDTO |
|
|
|
* @Return {@link List< PartyMemberEducationResultDTO>} |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2021/12/10 17:40 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageData<PartyMemberEducationResultDTO> getPartyMemberEducationList(PartyMemberListFormDTO formDTO) { |
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|
|
|
List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode()); |
|
|
|
Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode()); |
|
|
|
PageInfo<PartyMemberEducationResultDTO> pageInfo = new PageInfo<>(list); |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
list.forEach(item -> { |
|
|
|
item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation())); |
|
|
|
}); |
|
|
|
} |
|
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
|
} |
|
|
|
} |
|
|
|
|