| | |
| | | */ |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | private Boolean hasChildren; |
| | | |
| | | private Integer level; |
| | | |
| | | private String categoryNo; |
| | | } |
| | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.label.vo.LabelVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.category.entity.CategoryEntity; |
| | | import org.springblade.modules.category.vo.CategoryVO; |
| | | import org.springblade.modules.category.wrapper.CategoryWrapper; |
| | | import org.springblade.modules.category.service.ICategoryService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 天地图poi 分类表 控制器 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 标签管理 分页 |
| | | */ |
| | | @GetMapping("/tree") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "树形接口", notes = "传入label") |
| | | public R<List<TreeIntegerNode>> tree(CategoryVO category) { |
| | | List<TreeIntegerNode> pages = categoryService.tree(category); |
| | | return R.data( pages); |
| | | } |
| | | |
| | | /** |
| | | * 天地图poi 分类获取 |
| | | */ |
| | | @GetMapping("/getCategory") |
| | |
| | | */ |
| | | package org.springblade.modules.category.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.MapKey; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.modules.category.dto.CategoryDTO; |
| | | import org.springblade.modules.category.entity.CategoryEntity; |
| | | import org.springblade.modules.category.vo.CategoryVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 天地图poi 分类表 Mapper 接口 |
| | |
| | | * @return |
| | | */ |
| | | List<CategoryDTO> selectCategoryList(@Param("category") CategoryDTO categoryDTO); |
| | | |
| | | @MapKey("id") |
| | | Map<Integer, TreeIntegerNode> getTreeList(CategoryVO category); |
| | | } |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getTreeList" resultType="org.springblade.common.node.TreeIntegerNode"> |
| | | SELECT |
| | | jc.category_no AS id, |
| | | jc.category_no, |
| | | jc.parent_no AS parentId, |
| | | jc.category_name AS name, |
| | | jc.`level`, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_place jp |
| | | LEFT JOIN jczz_place_poi_label jppl ON jp.id = jppl.place_id |
| | | WHERE |
| | | jc.category_no = jppl.poi_code |
| | | AND jppl.type = 3 |
| | | ) count |
| | | FROM |
| | | jczz_category jc |
| | | WHERE |
| | | is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.modules.category.dto.CategoryDTO; |
| | | import org.springblade.modules.category.entity.CategoryEntity; |
| | | import org.springblade.modules.category.vo.CategoryVO; |
| | |
| | | * @return |
| | | */ |
| | | List<CategoryDTO> selectCategoryLabelList(CategoryDTO categoryDTO); |
| | | |
| | | List<TreeIntegerNode> tree(CategoryVO category); |
| | | } |
| | |
| | | package org.springblade.modules.category.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.modules.category.dto.CategoryDTO; |
| | | import org.springblade.modules.category.entity.CategoryEntity; |
| | | import org.springblade.modules.category.vo.CategoryVO; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 天地图poi 分类表 服务实现类 |
| | |
| | | public List<CategoryDTO> selectCategoryLabelList(CategoryDTO categoryDTO) { |
| | | return this.baseMapper.selectCategoryList(categoryDTO); |
| | | } |
| | | |
| | | @Override |
| | | public List<TreeIntegerNode> tree(CategoryVO category) { |
| | | Map<Integer, TreeIntegerNode> labelTreeList = baseMapper.getTreeList(category); |
| | | List<TreeIntegerNode> nodeTree = NodeTreeUtil.getNodeTree(labelTreeList); |
| | | nodeTree.forEach(node -> recursion(node)); |
| | | return nodeTree; |
| | | } |
| | | |
| | | private void recursion(TreeIntegerNode node) { |
| | | if (node.getChildren() != null && node.getChildren().size() > 0) { |
| | | node.getChildren().forEach(node2 -> recursion(node2)); |
| | | } else { |
| | | node.setChildren(null); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getUserInfoByPropertyCompanyId") |
| | | @ApiOperation(value = "通过机构查询物业公司人员", notes = "propertyCompanyId") |
| | | public R getUserInfoByPropertyId(@RequestParam("propertyCompanyId") String propertyCompanyId) { |
| | | return R.data(userService.getUserInfoByPropertyId(propertyCompanyId)); |
| | | public R getUserInfoByPropertyId(@RequestParam("propertyCompanyId") String propertyCompanyId,@RequestParam("roleId") String roleId) { |
| | | return R.data(userService.getUserInfoByPropertyId(propertyCompanyId,roleId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.data(userService.handleUserDept()); |
| | | } |
| | | |
| | | /** |
| | | * 处理漏绑定的user_dept |
| | | */ |
| | | @GetMapping("/handleUser") |
| | | public R handleUser() { |
| | | return R.data(userService.handleUser()); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | List<User> getNotBindUserDept(); |
| | | |
| | | List<User> getUserInfoByPropertyId(String deptId); |
| | | List<User> getUserInfoByPropertyId(String deptId,String roleId); |
| | | } |
| | |
| | | |
| | | <select id="getUserInfoByPropertyId" resultType="org.springblade.modules.system.entity.User" |
| | | parameterType="java.lang.String"> |
| | | SELECT * from blade_user bu where bu.dept_id in ( |
| | | SELECT |
| | | * |
| | | FROM |
| | | blade_user bu |
| | | WHERE |
| | | bu.role_id = #{roleId} |
| | | and bu.dept_id IN ( |
| | | SELECT |
| | | id |
| | | FROM |
| | | ( SELECT id, parent_id FROM blade_dept ORDER BY parent_id, id ) org_query, |
| | | ( SELECT @id := #{deptId} ) initialisation |
| | | WHERE |
| | | FIND_IN_SET( parent_id, @id ) > 0 |
| | | AND @id := CONCAT( @id, ',', id ) |
| | | ) or bu.dept_id=#{deptId} |
| | | FIND_IN_SET( parent_id, @id ) > 0 AND @id := CONCAT( @id, ',', id ) |
| | | ) |
| | | |
| | | </select> |
| | | |
| | |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.property.entity.PropertyCompanyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCompanyDistrictService; |
| | | import org.springblade.modules.property.service.IPropertyCompanyService; |
| | |
| | | |
| | | /** |
| | | * 根据手机号查询对应账号和手机号的用户信息 |
| | | * |
| | | * @param phoneNumber |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取用户信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<User> getUserInfoByPropertyId(String propertyCompanyId) { |
| | | public List<User> getUserInfoByPropertyId(String propertyCompanyId, String roleId) { |
| | | // 查询物业公司,获取物业公司的机构 |
| | | IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class); |
| | | PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getId, propertyCompanyId)); |
| | | return baseMapper.getUserInfoByPropertyId(one.getDeptId().toString()); |
| | | return baseMapper.getUserInfoByPropertyId(one.getDeptId().toString(), roleId); |
| | | } |
| | | |
| | | @Override |
| | | public Object handleUser() { |
| | | List<User> list = list(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getDeptId, "1727979636479037441") |
| | | .eq(User::getRoleId, "1717429059648606209")); |
| | | IHouseholdService bean = SpringUtil.getBean(IHouseholdService.class); |
| | | int a = 0; |
| | | for (User user : list) { |
| | | System.out.println("查詢處理啊的人:" + user.getId()); |
| | | HouseholdEntity one = bean.getOne(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | .eq(HouseholdEntity::getAssociatedUserId, user.getId()) |
| | | .eq(HouseholdEntity::getIsDeleted, 0)); |
| | | if (one != null) { |
| | | a++; |
| | | } |
| | | System.out.println("查詢處理啊的人:" + a); |
| | | } |
| | | return null; |
| | | } |
| | | } |