chenshudong hai 2 meses
pai
achega
d47d598a45

+ 69 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/LargeScreenHomePageUserInfoSqlDto.java

@@ -0,0 +1,69 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import lombok.Data;
4
+
5
+/**
6
+ * 首页-用户信息
7
+ *
8
+ * @author ruoyi
9
+ * @date 2025-09-07
10
+ */
11
+@Data
12
+public class LargeScreenHomePageUserInfoSqlDto {
13
+
14
+    /**
15
+     * 用户ID
16
+     */
17
+    private Long userId;
18
+
19
+    /**
20
+     * 用户账号
21
+     */
22
+    private String userName;
23
+
24
+    /**
25
+     * 用户昵称
26
+     */
27
+    private String nickName;
28
+
29
+    /**
30
+     * 班组ID
31
+     */
32
+    private Long teamId;
33
+
34
+    /**
35
+     * 班组名称
36
+     */
37
+    private String teamName;
38
+
39
+    /**
40
+     * 科室ID
41
+     */
42
+    private Long departmentId;
43
+
44
+    /**
45
+     * 科室名称
46
+     */
47
+    private String departmentName;
48
+
49
+    /**
50
+     * 大队ID
51
+     */
52
+    private Long brigadeId;
53
+
54
+    /**
55
+     * 大队名称
56
+     */
57
+    private String brigadeName;
58
+
59
+    /**
60
+     * 站ID
61
+     */
62
+    private Long stationId;
63
+
64
+    /**
65
+     * 站名称
66
+     */
67
+    private String stationName;
68
+
69
+}

+ 8 - 0
airport-system/src/main/java/com/sundot/airport/system/mapper/SysUserMapper.java

@@ -2,6 +2,7 @@ package com.sundot.airport.system.mapper;
2 2
 
3 3
 import java.util.List;
4 4
 
5
+import com.sundot.airport.common.core.domain.LargeScreenHomePageUserInfoSqlDto;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 import com.sundot.airport.common.core.domain.entity.SysUser;
7 8
 
@@ -212,4 +213,11 @@ public interface SysUserMapper {
212 213
      * @return 用户信息集合
213 214
      */
214 215
     public List<SysUser> selectUserByDeptIdAndRoleKeyList(@Param("deptId") Long deptId, @Param("list") List<String> list);
216
+
217
+    /**
218
+     * 首页-用户信息
219
+     *
220
+     * @return 首页-用户信息
221
+     */
222
+    public List<LargeScreenHomePageUserInfoSqlDto> homePageUserInfo();
215 223
 }

+ 8 - 0
airport-system/src/main/java/com/sundot/airport/system/service/ISysUserService.java

@@ -3,6 +3,7 @@ package com.sundot.airport.system.service;
3 3
 import java.util.List;
4 4
 
5 5
 import com.sundot.airport.common.core.domain.BaseLargeScreenQueryParamDto;
6
+import com.sundot.airport.common.core.domain.LargeScreenHomePageUserInfoSqlDto;
6 7
 import com.sundot.airport.common.core.domain.ResetUserRoleDto;
7 8
 import com.sundot.airport.common.core.domain.entity.SysUser;
8 9
 import com.sundot.airport.system.domain.SysLargeScreenCooperationDto;
@@ -295,4 +296,11 @@ public interface ISysUserService {
295 296
      * @return 用户信息集合信息
296 297
      */
297 298
     public List<SysUser> selectUserAll();
299
+
300
+    /**
301
+     * 首页-用户信息
302
+     *
303
+     * @return 首页-用户信息
304
+     */
305
+    public List<LargeScreenHomePageUserInfoSqlDto> homePageUserInfo();
298 306
 }

+ 11 - 0
airport-system/src/main/java/com/sundot/airport/system/service/impl/SysUserServiceImpl.java

@@ -18,6 +18,7 @@ import cn.hutool.core.collection.CollectionUtil;
18 18
 import cn.hutool.core.util.ObjUtil;
19 19
 import cn.hutool.core.util.StrUtil;
20 20
 import com.sundot.airport.common.core.domain.BaseLargeScreenQueryParamDto;
21
+import com.sundot.airport.common.core.domain.LargeScreenHomePageUserInfoSqlDto;
21 22
 import com.sundot.airport.common.core.domain.ResetUserRoleDto;
22 23
 import com.sundot.airport.common.core.domain.entity.SysDept;
23 24
 import com.sundot.airport.common.core.domain.entity.SysDictData;
@@ -1129,4 +1130,14 @@ public class SysUserServiceImpl implements ISysUserService {
1129 1130
                 .findFirst()
1130 1131
                 .orElse(null);
1131 1132
     }
1133
+
1134
+    /**
1135
+     * 首页-用户信息
1136
+     *
1137
+     * @return 首页-用户信息
1138
+     */
1139
+    @Override
1140
+    public List<LargeScreenHomePageUserInfoSqlDto> homePageUserInfo() {
1141
+        return userMapper.homePageUserInfo();
1142
+    }
1132 1143
 }

+ 23 - 0
airport-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -987,4 +987,27 @@
987 987
             #{item}
988 988
         </foreach>
989 989
     </select>
990
+
991
+    <select id="homePageUserInfo" resultType="com.sundot.airport.common.core.domain.LargeScreenHomePageUserInfoSqlDto">
992
+        select su.user_id      userId,
993
+               su.user_name    userName,
994
+               su.nick_name    nickName,
995
+               sd_bz.dept_id   teamId,
996
+               sd_bz.dept_name teamName,
997
+               sd_ks.dept_id   departmentId,
998
+               sd_ks.dept_name departmentName,
999
+               sd_dd.dept_id   brigadeId,
1000
+               sd_dd.dept_name brigadeName,
1001
+               sd_zj.dept_id   stationId,
1002
+               sd_zj.dept_name stationName
1003
+        from sys_user su
1004
+                 inner join sys_user_role sur on sur.user_id = su.user_id
1005
+                 inner join sys_role sr on sr.role_id = sur.role_id
1006
+                 inner join sys_dept sd_bz on sd_bz.dept_id = su.dept_id
1007
+                 inner join sys_dept sd_ks on sd_ks.dept_id = sd_bz.parent_id
1008
+                 inner join sys_dept sd_dd on sd_dd.dept_id = sd_ks.parent_id
1009
+                 inner join sys_dept sd_zj on sd_zj.dept_id = sd_dd.parent_id
1010
+        where 1 = 1
1011
+          and sr.role_key in ('banzuzhang', 'SecurityCheck')
1012
+    </select>
990 1013
 </mapper>