Commit dec1b09883c7c0caf0dfe1dfb13a18b944a4aff6
1 parent
356ae6d4b6
Exists in
master
and in
1 other branch
add lis pacs check query
Showing 2 changed files with 26 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/v1/HisService.java
View file @
dec1b09
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | check.setTitle(info.getP_TITLE()); |
113 | 113 | check.setAge(info.getP_AGE()); |
114 | 114 | check.setApplyDate(DateUtil.parseYMDHMS(info.getP_CHECKTIME())); |
115 | - check.setApplyDateStr(DateUtil.getyyyy_MM_dd_hms(DateUtil.parseYMDHMS(info.getP_CHECKTIME()))); | |
115 | + check.setApplyDateStr(DateUtil.getyyyy_MM_dd(DateUtil.parseYMDHMS(info.getP_CHECKTIME()))); | |
116 | 116 | check.setCheckDept(info.getP_CHECKDEPARTNAME()); |
117 | 117 | check.setDoctor(info.getP_APPLATIONDOCNAME()); |
118 | 118 | if ("1".equals(info.getP_SEX())) { |
... | ... | @@ -166,7 +166,7 @@ |
166 | 166 | check.setAge(info.getAGE().toString()); |
167 | 167 | } |
168 | 168 | check.setApplyDate(DateUtil.parseYMDHMS(info.getAPPLY_TIME())); |
169 | - check.setApplyDateStr(DateUtil.getyyyy_MM_dd_hms(DateUtil.parseYMDHMS(info.getAPPLY_TIME()))); | |
169 | + check.setApplyDateStr(DateUtil.getyyyy_MM_dd(DateUtil.parseYMDHMS(info.getAPPLY_TIME()))); | |
170 | 170 | check.setCheckDept(info.getAPPLY_DEPT()); |
171 | 171 | check.setDoctor(info.getEXECUTE_MAN()); |
172 | 172 | if ("F".equals(info.getSEX())) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RolesController.java
View file @
dec1b09
... | ... | @@ -371,14 +371,14 @@ |
371 | 371 | @RequestMapping(value = "/userRoles", method = RequestMethod.GET) |
372 | 372 | @ResponseBody |
373 | 373 | @TokenRequired |
374 | - public FrontEndResult getUserList(HttpServletResponse response, | |
374 | + public FrontEndResult getUserList(HttpServletResponse response, HttpServletRequest request, | |
375 | 375 | @RequestParam(value = "keyword", required = false) String keyword, |
376 | 376 | @RequestParam(value = "page", required = false) Integer page, |
377 | 377 | @RequestParam(value = "limit", required = false) Integer limit, |
378 | 378 | @RequestParam(value = "orgIds", required = false) String orgIds, |
379 | 379 | @RequestParam(value = "enable", required = false) Integer enable) { |
380 | 380 | |
381 | - limit = limit == null ? 10 : limit; | |
381 | + limit = 200; | |
382 | 382 | page = page == null ? 1 : page; |
383 | 383 | |
384 | 384 | RolesQuery rolesQuery = new RolesQuery(); |
385 | 385 | |
386 | 386 | |
387 | 387 | |
... | ... | @@ -399,11 +399,30 @@ |
399 | 399 | } |
400 | 400 | rolesQuery.setOrgIds(list); |
401 | 401 | List<Roles> roles = rolesService.queryRoles(rolesQuery); |
402 | + List<Roles> rolesList = new ArrayList<>(); | |
402 | 403 | if (CollectionUtils.isNotEmpty(roles)) { |
404 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
405 | + Users users = usersService.getUsers(loginState.getId()); | |
406 | + if (users.getType() == 2) { | |
407 | + rolesList.addAll(roles); | |
408 | + } else { | |
409 | + UserRoleMapsQuery userRoleMapsQuery = new UserRoleMapsQuery(); | |
410 | + userRoleMapsQuery.setYn(YnEnums.YES.getId()); | |
411 | + userRoleMapsQuery.setUserId(users.getId()); | |
412 | + List<UserRoleMaps> userRoleMapsList = userRoleMapsService.queryUserRoleMaps(userRoleMapsQuery); | |
413 | + List<Integer> onwerRoleIds = new ArrayList<>(); | |
414 | + for (UserRoleMaps maps:userRoleMapsList) { | |
415 | + onwerRoleIds.add(maps.getRoleId()); | |
416 | + } | |
417 | + for (Roles roles1 : roles) { | |
418 | + if (onwerRoleIds.contains(roles1.getId())) { | |
419 | + rolesList.add(roles1); | |
420 | + } | |
421 | + } | |
422 | + } | |
403 | 423 | |
404 | - | |
405 | 424 | List<Permissions> permissionses; |
406 | - for (Roles roles1 : roles) { | |
425 | + for (Roles roles1 : rolesList) { | |
407 | 426 | permissionses = permissionsService.queryPermissionByRoleIds1(roles1.getId()); |
408 | 427 | |
409 | 428 | /* RolePermissionMapsQuery rolePermissionMapsQuery = new RolePermissionMapsQuery(); |
... | ... | @@ -432,7 +451,7 @@ |
432 | 451 | |
433 | 452 | FrontEndResult frontEndResult = new FrontEndResult(); |
434 | 453 | frontEndResult.setPageInfo(rolesQuery.getPageInfo()); |
435 | - frontEndResult.setData(roles); | |
454 | + frontEndResult.setData(rolesList); | |
436 | 455 | frontEndResult.setErrorcode(ErrorCodeConstants.SUCCESS); |
437 | 456 | |
438 | 457 | return frontEndResult; |