| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import liquibase.repackaged.org.apache.commons.lang3.StringUtils; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.constant.CommonConstant; |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | |
| | | import org.springblade.modules.house.vo.HouseholdLabelVO; |
| | | import org.springblade.modules.house.vo.HouseholdOtherVO; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.label.entity.LabelEntity; |
| | | import org.springblade.modules.label.service.ILabelService; |
| | | import org.springblade.modules.label.vo.LabelVO; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | | import org.springblade.modules.place.service.IPlaceService; |
| | | import org.springblade.modules.system.entity.DictBiz; |
| | |
| | | |
| | | // List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | // Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | |
| | | // 重点人员与关注人员 |
| | | if (Objects.nonNull(household.getLabelType())) { |
| | | extracted(household); |
| | | } |
| | | List<HouseholdVO> householdVOS = baseMapper.selectHouseholdPage(page, household, commonParamSet.getIsAdministrator(), |
| | | commonParamSet.getRegionChildCodesList(), commonParamSet.getGridCodeList()); |
| | | stopWatch.stop(); |
| | | // System.out.println("selectHouseholdPage:" + stopWatch.getTotalTimeMillis()); |
| | | return page.setRecords(householdVOS); |
| | | } |
| | | |
| | | /** |
| | | * 重点人员与关注人员 |
| | | * @param household |
| | | */ |
| | | private void extracted(HouseholdVO household) { |
| | | ILabelService iLabelService = SpringUtils.getBean(ILabelService.class); |
| | | if (CommonConstant.NUMBER_ONE.equals(household.getLabelType())) { |
| | | List<LabelEntity> list = iLabelService.list(Wrappers.<LabelEntity>lambdaQuery().eq(LabelEntity::getParentId, 103)); |
| | | List<Integer> collect = list.stream().map(item -> |
| | | item.getId() |
| | | ).collect(Collectors.toList()); |
| | | household.setLabelIdList(collect); |
| | | } else if (CommonConstant.NUMBER_TWO.equals(household.getLabelType())) { |
| | | List<LabelEntity> list = iLabelService.list(Wrappers.<LabelEntity>lambdaQuery().eq(LabelEntity::getParentId, 1032)); |
| | | List<Integer> collect = list.stream().map(item -> |
| | | item.getId() |
| | | ).collect(Collectors.toList()); |
| | | household.setLabelIdList(collect); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer statistics(Long userId, String neiCode,Integer confirmFlag) { |
| | | public Integer statistics(Long userId, String neiCode, Integer confirmFlag) { |
| | | HouseholdVO householdVO = new HouseholdVO(); |
| | | householdVO.setConfirmFlag(confirmFlag); |
| | | householdVO.setNeiCode(neiCode); |
| | | CommonParamSet commonParamSet = new CommonParamSet().invoke(HouseholdVO.class, householdVO); |
| | | |
| | | return baseMapper.statistics(householdVO,commonParamSet.getIsAdministrator(), |
| | | return baseMapper.statistics(householdVO, commonParamSet.getIsAdministrator(), |
| | | commonParamSet.getRegionChildCodesList(), commonParamSet.getGridCodeList()); |
| | | } |
| | | |