Commit 0bb7f394b4152d452e7893d7a0ec6a497e54a477
1 parent
06e9b38295
Exists in
master
and in
1 other branch
bug fix
Showing 2 changed files with 9 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DepartmentsController.java
View file @
0bb7f39
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | import com.lyms.platform.operate.web.result.FrontEndResult; |
12 | 12 | import com.lyms.platform.permission.model.*; |
13 | 13 | import com.lyms.platform.permission.service.*; |
14 | +import org.apache.commons.collections.CollectionUtils; | |
14 | 15 | import org.apache.commons.lang.StringUtils; |
15 | 16 | import org.springframework.beans.factory.annotation.Autowired; |
16 | 17 | import org.springframework.stereotype.Controller; |
... | ... | @@ -18,6 +19,7 @@ |
18 | 19 | |
19 | 20 | import javax.servlet.http.HttpServletRequest; |
20 | 21 | import javax.servlet.http.HttpServletResponse; |
22 | +import java.util.Collections; | |
21 | 23 | import java.util.Date; |
22 | 24 | import java.util.List; |
23 | 25 | |
24 | 26 | |
... | ... | @@ -196,8 +198,13 @@ |
196 | 198 | List<Integer> orgId1 = autoMatchFacade.matchOrgId(loginState.getId()); |
197 | 199 | if(null!=orgId){ |
198 | 200 | departmentsQuery.setOrgId(orgId); |
199 | - }else{ | |
201 | + } else if (CollectionUtils.isNotEmpty(orgId1)){ | |
200 | 202 | departmentsQuery.setOrgList(orgId1); |
203 | + } else { | |
204 | + FrontEndResult frontEndResult = new FrontEndResult(); | |
205 | + frontEndResult.setPageInfo(departmentsQuery.getPageInfo()); | |
206 | + frontEndResult.setErrorcode(ErrorCodeConstants.SUCCESS); | |
207 | + return frontEndResult; | |
201 | 208 | } |
202 | 209 | |
203 | 210 | departmentsQuery.setPage(page); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
0bb7f39
... | ... | @@ -238,7 +238,7 @@ |
238 | 238 | List<Integer> areaId = autoMatchFacade.matchOrgId(loginState.getId()); |
239 | 239 | List<Object> data = new ArrayList<>(); |
240 | 240 | List<Organization> organizations = new ArrayList<>(); |
241 | - PageInfo pageInfo =null; | |
241 | + PageInfo pageInfo = new PageInfo(0,0,0,1); | |
242 | 242 | if (CollectionUtils.isNotEmpty(areaId)) { |
243 | 243 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
244 | 244 | if(null != page && limit != page) { |