Commit 5d6df84f1027a38981efc6d299404d5ab4e52078
1 parent
da7a5004a1
Exists in
master
and in
1 other branch
修改新电子病历
Showing 1 changed file with 4 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
5d6df84
| ... | ... | @@ -618,8 +618,8 @@ |
| 618 | 618 | |
| 619 | 619 | |
| 620 | 620 | //如有角色,则对用户角色中间表新增 |
| 621 | - UserRoleMaps userRoleMaps = new UserRoleMaps(); | |
| 622 | 621 | |
| 622 | + | |
| 623 | 623 | String[] roleArrayIds = roleIds.split(","); |
| 624 | 624 | List<Users> user1 = usersService.queryUsers(usersQuery); |
| 625 | 625 | for (String id : roleArrayIds) { |
| ... | ... | @@ -627,6 +627,7 @@ |
| 627 | 627 | if (roles == null || roles.getYn() == YnEnums.NO.getId()) { |
| 628 | 628 | continue; |
| 629 | 629 | } |
| 630 | + UserRoleMaps userRoleMaps = new UserRoleMaps(); | |
| 630 | 631 | |
| 631 | 632 | if (user1.get(0).getId() != null) { |
| 632 | 633 | userRoleMaps.setRoleId(Integer.valueOf(Integer.valueOf(id))); |
| ... | ... | @@ -765,7 +766,6 @@ |
| 765 | 766 | usersService.addUsers(users); |
| 766 | 767 | |
| 767 | 768 | //如有角色,则对用户角色中间表新增 |
| 768 | - UserRoleMaps userRoleMaps = new UserRoleMaps(); | |
| 769 | 769 | |
| 770 | 770 | String[] roleArrayIds = roleIds.split(","); |
| 771 | 771 | List<Users> user1 = usersService.queryUsers(usersQuery); |
| ... | ... | @@ -774,6 +774,7 @@ |
| 774 | 774 | if (roles == null || roles.getYn() == YnEnums.NO.getId()) { |
| 775 | 775 | continue; |
| 776 | 776 | } |
| 777 | + UserRoleMaps userRoleMaps = new UserRoleMaps(); | |
| 777 | 778 | |
| 778 | 779 | if (user1.get(0).getId() != null) { |
| 779 | 780 | userRoleMaps.setRoleId(Integer.valueOf(Integer.valueOf(id))); |
| ... | ... | @@ -958,7 +959,6 @@ |
| 958 | 959 | |
| 959 | 960 | |
| 960 | 961 | for (String tmp : roleArrayIds) { |
| 961 | - UserRoleMaps userRoleMaps = new UserRoleMaps(); | |
| 962 | 962 | if(StringUtils.isEmpty(tmp)){ |
| 963 | 963 | continue; |
| 964 | 964 | } |
| ... | ... | @@ -967,6 +967,7 @@ |
| 967 | 967 | continue; |
| 968 | 968 | } |
| 969 | 969 | |
| 970 | + UserRoleMaps userRoleMaps = new UserRoleMaps(); | |
| 970 | 971 | if (user.getId() != null) { |
| 971 | 972 | userRoleMaps.setRoleId(Integer.valueOf(Integer.valueOf(tmp))); |
| 972 | 973 | userRoleMaps.setUserId(_userId); |