| | |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.property.entity.PropertyCompanyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCompanyDistrictService; |
| | | import org.springblade.modules.property.service.IPropertyCompanyService; |
| | | import org.springblade.modules.system.entity.*; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.mapper.UserMapper; |
| | |
| | | // 根据用户id 获取用户详情信息 |
| | | UserDetailVO userVO = baseMapper.getUserInfo(userId); |
| | | if (null!=userVO){ |
| | | // 设置机构 |
| | | userVO.setPassword(null); |
| | | } |
| | | // 返回 |
| | |
| | | |
| | | @Override |
| | | public List<UserEntity> getUserInfoByCode(String houseCode, String type) { |
| | | if (type.equals("1")) { |
| | | if (type.equals("0")) { |
| | | IGridmanService bean = SpringUtil.getBean(IGridmanService.class); |
| | | return bean.getGridManByCode(houseCode); |
| | | } else { |
| | |
| | | return bean1.getDistictUserByCode(houseCode); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<UserEntity> getUserInfoByDistrictId(String districtId, String building) { |
| | | return baseMapper.getUserInfoByDistrictId(districtId, building); |
| | | } |
| | | |
| | | /** |
| | | * 处理漏绑定的user_dept |
| | | */ |
| | | @Override |
| | | public Object handleUserDept() { |
| | | // 查询没有匹配的数据 |
| | | List<User> list = baseMapper.getNotBindUserDept(); |
| | | // 遍历处理 |
| | | for (User user : list) { |
| | | UserDept userDept = new UserDept(); |
| | | userDept.setUserId(user.getId()); |
| | | userDept.setDeptId(Long.parseLong(user.getDeptId())); |
| | | // 保存 |
| | | userDeptService.save(userDept); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<User> getUserInfoByPropertyId(String propertyCompanyId) { |
| | | // 查询物业公司,获取物业公司的机构 |
| | | IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class); |
| | | PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getId, propertyCompanyId)); |
| | | return baseMapper.getUserInfoByPropertyId(one.getDeptId().toString()); |
| | | } |
| | | } |