| | |
| | | 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() + "%"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据ID查询库区信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Dept getDeptById(String id) { |
| | | |
| | | return coreDeptMapper.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新库区信息 |
| | | * @param sysDept |
| | | * @param isAdd |