Просмотр исходного кода

Merge branch 'master' of http://git.sundot.cn/haikou/meilan-server

simonlll месяцев назад: 4
Родитель
Сommit
a2dc9d9e24

+ 4 - 1
airport-admin/src/main/java/com/sundot/airport/web/core/cache/UserCache.java

@@ -85,12 +85,15 @@ public class UserCache {
85
         }
85
         }
86
         Collections.reverse(deptList);
86
         Collections.reverse(deptList);
87
         SysDept teams = deptList.stream().filter(x -> StrUtil.equals(DeptType.TEAMS.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
87
         SysDept teams = deptList.stream().filter(x -> StrUtil.equals(DeptType.TEAMS.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
88
-        SysDept department = deptList.stream().filter(x -> StrUtil.equals(DeptType.DEPARTMENT.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
88
+        SysDept department = deptList.stream().filter(x -> StrUtil.equals(DeptType.MANAGER.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
89
+        SysDept brigade = deptList.stream().filter(x -> StrUtil.equals(DeptType.BRIGADE.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
89
         SysDept station = deptList.stream().filter(x -> StrUtil.equals(DeptType.STATION.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
90
         SysDept station = deptList.stream().filter(x -> StrUtil.equals(DeptType.STATION.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
90
         userInfo.setTeamsId(teams.getDeptId());
91
         userInfo.setTeamsId(teams.getDeptId());
91
         userInfo.setTeamsName(teams.getDeptName());
92
         userInfo.setTeamsName(teams.getDeptName());
92
         userInfo.setDepartmentId(department.getDeptId());
93
         userInfo.setDepartmentId(department.getDeptId());
93
         userInfo.setDepartmentName(department.getDeptName());
94
         userInfo.setDepartmentName(department.getDeptName());
95
+        userInfo.setBrigadeId(brigade.getDeptId());
96
+        userInfo.setBrigadeName(brigade.getDeptName());
94
         userInfo.setStationId(station.getDeptId());
97
         userInfo.setStationId(station.getDeptId());
95
         userInfo.setStationName(station.getDeptName());
98
         userInfo.setStationName(station.getDeptName());
96
     }
99
     }

+ 10 - 0
airport-common/src/main/java/com/sundot/airport/common/dto/UserInfo.java

@@ -62,6 +62,16 @@ public class UserInfo {
62
     private String departmentName;
62
     private String departmentName;
63
 
63
 
64
     /**
64
     /**
65
+     * 大队 id
66
+     */
67
+    private Long brigadeId;
68
+
69
+    /**
70
+     * 大队名称
71
+     */
72
+    private String brigadeName;
73
+
74
+    /**
65
      * 机构站 id
75
      * 机构站 id
66
      */
76
      */
67
     private Long stationId;
77
     private Long stationId;

+ 8 - 3
airport-system/src/main/java/com/sundot/airport/system/service/impl/SysUserServiceImpl.java

@@ -543,20 +543,25 @@ public class SysUserServiceImpl implements ISysUserService {
543
         }
543
         }
544
         Collections.reverse(deptList);
544
         Collections.reverse(deptList);
545
         SysDept teams = deptList.stream().filter(x -> StrUtil.equals(DeptType.TEAMS.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
545
         SysDept teams = deptList.stream().filter(x -> StrUtil.equals(DeptType.TEAMS.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
546
-        SysDept department = deptList.stream().filter(x -> StrUtil.equals(DeptType.DEPARTMENT.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
546
+        SysDept department = deptList.stream().filter(x -> StrUtil.equals(DeptType.MANAGER.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
547
+        SysDept brigade = deptList.stream().filter(x -> StrUtil.equals(DeptType.BRIGADE.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
547
         SysDept station = deptList.stream().filter(x -> StrUtil.equals(DeptType.STATION.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
548
         SysDept station = deptList.stream().filter(x -> StrUtil.equals(DeptType.STATION.getCode(), x.getDeptType())).findFirst().orElse(new SysDept());
548
         userInfo.setTeamsId(teams.getDeptId());
549
         userInfo.setTeamsId(teams.getDeptId());
549
         userInfo.setTeamsName(teams.getDeptName());
550
         userInfo.setTeamsName(teams.getDeptName());
550
         userInfo.setDepartmentId(department.getDeptId());
551
         userInfo.setDepartmentId(department.getDeptId());
551
         userInfo.setDepartmentName(department.getDeptName());
552
         userInfo.setDepartmentName(department.getDeptName());
553
+        userInfo.setBrigadeId(brigade.getDeptId());
554
+        userInfo.setBrigadeName(brigade.getDeptName());
552
         userInfo.setStationId(station.getDeptId());
555
         userInfo.setStationId(station.getDeptId());
553
         userInfo.setStationName(station.getDeptName());
556
         userInfo.setStationName(station.getDeptName());
554
 
557
 
555
         Long deptId;
558
         Long deptId;
556
         if (StrUtil.equals(DeptType.TEAMS.getCode(), deptType)) {
559
         if (StrUtil.equals(DeptType.TEAMS.getCode(), deptType)) {
557
             deptId = userInfo.getTeamsId();
560
             deptId = userInfo.getTeamsId();
558
-        } else if (StrUtil.equals(DeptType.DEPARTMENT.getCode(), deptType)) {
561
+        } else if (StrUtil.equals(DeptType.MANAGER.getCode(), deptType)) {
559
             deptId = userInfo.getDepartmentId();
562
             deptId = userInfo.getDepartmentId();
563
+        } else if (StrUtil.equals(DeptType.BRIGADE.getCode(), deptType)) {
564
+            deptId = userInfo.getBrigadeId();
560
         } else if (StrUtil.equals(DeptType.STATION.getCode(), deptType)) {
565
         } else if (StrUtil.equals(DeptType.STATION.getCode(), deptType)) {
561
             deptId = userInfo.getStationId();
566
             deptId = userInfo.getStationId();
562
         } else {
567
         } else {
@@ -607,7 +612,7 @@ public class SysUserServiceImpl implements ISysUserService {
607
     public List<SysUser> selectUserListByRoleKey(List<String> roleKeyList) {
612
     public List<SysUser> selectUserListByRoleKey(List<String> roleKeyList) {
608
         return userMapper.selectUserListByRoleKey(roleKeyList);
613
         return userMapper.selectUserListByRoleKey(roleKeyList);
609
     }
614
     }
610
-    
615
+
611
     @Override
616
     @Override
612
     public List<SysUser> selectUserListByRoleKeyAndDeptId(List<String> roleKeyList, Long stationId) {
617
     public List<SysUser> selectUserListByRoleKeyAndDeptId(List<String> roleKeyList, Long stationId) {
613
         return userMapper.selectUserListByRoleKeyAndDeptId(roleKeyList, stationId);
618
         return userMapper.selectUserListByRoleKeyAndDeptId(roleKeyList, stationId);