| | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.entity.UserHouseLabelEntity; |
| | | import org.springblade.modules.house.excel.HouseHoldExcel; |
| | |
| | | boolean flag = false; |
| | | household.setUpdateTime(new Date()); |
| | | household.setUpdateUser(AuthUtil.getUserId()); |
| | | if (!Strings.isBlank(household.getRoleName()) && household.getRoleName().equals("居民")){ |
| | | // 待审核 |
| | | household.setConfirmFlag(0); |
| | | } |
| | | if (null != household.getId()) { |
| | | // 更新 |
| | | flag = updateById(household); |
| | |
| | | List<HouseholdVO> householdVOS = baseMapper.selectHouseholdList(household); |
| | | // 遍历 |
| | | for (HouseholdVO householdVO : householdVOS) { |
| | | if (householdVO.getHouseholdLabelList().size()>0){ |
| | | if (householdVO.getHouseholdLabelList().size() > 0) { |
| | | List<String> labelNameList = householdVO.getHouseholdLabelList().stream().map(householdLabelVO -> householdLabelVO.getLabelName()) |
| | | .collect(Collectors.toList()); |
| | | householdVO.setLabelName(String.join(",",labelNameList)); |
| | | householdVO.setLabelName(String.join(",", labelNameList)); |
| | | } |
| | | } |
| | | // 返回 |
| | | return householdVOS; |
| | | return householdVOS; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<HouseholdVO> getKeynotePersonnelPage(IPage<HouseholdVO> page, HouseholdVO household) { |
| | | StopWatch stopWatch = new StopWatch(); |
| | | stopWatch.start(); |
| | | // Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | // if (null!=dept){ |
| | | // household.setRegionCode(dept.getRegionCode()); |
| | | // } |
| | | List<HouseholdVO> householdVOS = baseMapper.getKeynotePersonnelPage(page, household); |
| | | stopWatch.stop(); |
| | | System.out.println("selectHouseholdPage:" + stopWatch.getTotalTimeMillis()); |
| | | return page.setRecords(householdVOS); |
| | | } |
| | | |
| | | /** |
| | | * 根据人员标签编号集合查询对应的住户(按颜色区分近多少天没有发过任务的住户) |
| | | * @param list |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<HouseholdVO> getHouseholdListByParam(List<Integer> list) { |
| | | return baseMapper.getHouseholdListByParam(list); |
| | | } |
| | | } |