| | |
| | | if(StringUtils.isNotBlank(parentId)){ |
| | | queryWrapper.likeRight("id", parentId); |
| | | } |
| | | |
| | | queryWrapper.orderByAsc("id"); |
| | | return coreDeptMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<Dept> getDeptData() { |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); |
| | | if (Constant.DEPT_TYPE_20.equals(userDept.getType())) { |
| | | if (Constant.USER_TYPE_30.equals(user.getUserType())) { |
| | | return this.listDept(ContextUtil.subDeptId(user),null,null); |
| | | }else { |
| | | return this.listDept(null,null,user.getDeptId() + "%"); |
| | |
| | | return; |
| | | } |
| | | Dept dept = new Dept(); |
| | | dept.setId(sysDept.getDeptId() + ""); |
| | | String deptId = sysDept.getDeptId() + ""; |
| | | dept.setId(deptId); |
| | | dept.setParentId(deptId.substring(0, deptId.length() - 3)); |
| | | dept.setKqmc(sysDept.getDeptName()); |
| | | dept.setCompanyId(sysDept.getCompanyId()); |
| | | |