| | |
| | | return fail("单位代码含有非法字符", null); |
| | | } |
| | | |
| | | String filter = "1=1"; |
| | | String filters = "1=1"; |
| | | if (!StringHelper.isEmpty(depcode)) { |
| | | filter += String.format(" and depid like '%s%%'", depcode); |
| | | filters += String.format(" and depid like '%s%%'", depcode); |
| | | } |
| | | dirs = DataLibService.copeCodes(dirs, "dircode"); |
| | | dirs = DataLibService.copeCodes(dirs, "dirid"); |
| | | if (dirs != null) { |
| | | filter += String.format(" and (%s)", dirs); |
| | | filters += String.format(" and (%s)", dirs); |
| | | } |
| | | filter = filter.replace("1=1 and ", ""); |
| | | |
| | | int count = baseQueryService.selectTabsForCount(tab, filter); |
| | | int count = baseQueryService.selectTabsForCount(tab); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<TabEntity> rs = baseQueryService.selectTabsByPage(tab, filter, pageSize, pageSize * (pageIndex - 1)); |
| | | List<TabEntity> rs = baseQueryService.selectTabsByPage(tab, filters, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |