| | |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DeviceSer> getAllSerByCompanyId(String companyId) { |
| | | return deviceSerRepository.getAllSerByCompanyId(companyId); |
| | | } |
| | | |
| | | /** |
| | | * JPA 查询分机列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DeviceSer> getAllSer() { |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); |
| | |
| | | }else { |
| | | return deviceSerRepository.getDataByParentId(user.getDeptId() + "%"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | if (StringUtils.isEmpty(companyId)) { |
| | | companyId = ContextUtil.getCompanyId(); |
| | | } |
| | | List<DeviceSer> list = this.getAllSer(); |
| | | List<DeviceSer> list = this.getAllSerByCompanyId(companyId); |
| | | this.setCacheSer(list, companyId); |
| | | } |
| | | |