| | |
| | | import org.springblade.modules.system.entity.*; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.mapper.UserMapper; |
| | | import org.springblade.modules.system.node.TreeNode; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.IUserOauthService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | import static org.springblade.common.constant.CommonConstant.DEFAULT_PARAM_PASSWORD; |
| | | |
| | |
| | | List<Long> deptIdList = SysCache.getDeptChildIds(deptId); |
| | | return baseMapper.selectUserPageSecurityApply(page, user, null, tenantId); |
| | | } |
| | | |
| | | /** |
| | | * 保安员列表树 安员列表树,帅选无保安证,下拉tree |
| | | * @param user 用户信息 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<TreeNode> getSecurityApplyTree(UserVO user) { |
| | | Map<Long,TreeNode> map = baseMapper.getSecurityApplyTree(user); |
| | | List<TreeNode> tree = new ArrayList<>(); |
| | | if (map.size()>1){ |
| | | map.forEach((id,treeNode) ->{ |
| | | if (map.containsKey(treeNode.getParentId())){ |
| | | map.get(treeNode.getParentId()).getChildren().add(treeNode); |
| | | }else { |
| | | tree.add(treeNode); |
| | | } |
| | | }); |
| | | } |
| | | return tree; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectInr(String deptid) { |
| | | return baseMapper.selectInr(deptid); |
| | | } |
| | | |
| | | /** |
| | | * 查询当前年份已有的保安证编号 |
| | | * @param pre 前缀 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int getSecurityPaperCount(String pre) { |
| | | return baseMapper.getSecurityPaperCount(pre); |
| | | } |
| | | } |