智慧保安后台管理-外网项目备份
zhongrj
2023-06-28 d12835aa2e4f45c9100af13a0ea98406c4827b9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.system.mapper;
 
import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import org.springblade.modules.experience.entity.Experience;
import org.springblade.modules.system.excel.SecurityExcel;
import org.springblade.modules.system.excel.UserExcel;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.node.TreeNode;
import org.springblade.modules.system.vo.UserVO;
 
import java.util.List;
import java.util.Map;
 
/**
 * Mapper 接口
 *
 * @author Chill
 */
public interface UserMapper extends BaseMapper<User> {
 
    /**
     * 自定义分页,带坐标
     *
     * @param page
     * @param user
     * @return
     */
    @SqlParser(filter = true)
    List<UserVO> selectUserPages(IPage<UserVO> page, @Param("user") UserVO user);
 
    /**
     * 自定义分页,带坐标
     *
     * @param page
     * @param user
     * @return
     */
    @SqlParser(filter = true)
    List<UserVO> selectUserPagesByAge(IPage<UserVO> page, @Param("user") UserVO user);
 
 
    /**
     * 自定义分页
     *
     * @param page
     * @param user
     * @param deptIdList
     * @param tenantId
     * @return
     */
    List<UserVO> selectUserPage(IPage<UserVO> page, @Param("user") User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
 
    /**
     * 获取用户
     *
     * @param tenantId
     * @param account
     * @param password
     * @return
     */
    User getUser(String tenantId, String account, String password);
 
    /**
     * 获取导出用户数据
     *
     * @param queryWrapper
     * @return
     */
    List<UserExcel> exportUser(@Param("ew") Wrapper<User> queryWrapper);
 
    /**
     * 通过 身份证号查询用户信息
     * @param idCardNo 身份证号
     * @return
     */
    User getUserInfoByIdCardNo(String idCardNo);
    /**
     * 自定义用户列表(只有保安员)
     */
    List<User> selectUserPageSecurity(IPage<User> page, @Param("user") User user);
 
    /**
     * 保安员列表,帅选无保安证
     * @param page
     * @param user
     * @return
     */
    IPage<UserVO> selectUserPageSecurityApply(IPage<UserVO> page,@Param("user") UserVO user);
 
    /**
     * 保安员列表树 安员列表树,帅选无保安证,下拉tree
     * @param user 用户信息
     * @return
     */
    @MapKey(value = "id")
    @SqlParser(filter=true)
    Map<Long, TreeNode> getSecurityApplyTree(@Param("user") UserVO user);
 
 
    /**
     * 派遣保安员列表树 安员列表树,帅选无保安证,下拉tree
     * @param user 用户信息
     * @return
     */
    @MapKey(value = "id")
    @SqlParser(filter=true)
    Map<Long, TreeNode> getSecurityDispatcherTree(@Param("user") UserVO user);
 
 
    List<Map<Object,Object>> selectInr(String deptid);
 
    /**
     * 查询当前年份已有的保安证编号
     * @param pre 前缀
     * @return
     */
    int getSecurityPaperCount(@Param("pre") String pre);
 
    /**
     * 查询当前公司未持证保安没有报名的人员
     * @param deptId
     * @return
     */
    List<User> getNotApplyIdList(@Param("deptId")String deptId);
 
    /**
     * 计算保安人员年龄
     * @param userId
     * @return
     */
    UserVO getUserAgeById(@Param("userId") Long userId);
 
    List<Map<String, Object>> selectUser();
 
 
    /**
     * 派遣人员
     * @param deptid
     * @param jurisdiction
     * @return
     */
    List<Map<String, Object>> getDispaterInfo(@Param("deptid")String deptid,
                                    @Param("jurisdiction")String jurisdiction);
 
    /**
     * 工作汇报人员
     * @param deptid
     * @param jurisdiction
     * @return
     */
    List<Map<String, Object>> getWorkReportInfo(@Param("type")String type,
                                                @Param("deptid")String deptid,
                                                @Param("jurisdiction")String jurisdiction);    /**
     * 工作汇报人员(向民警)
     * @param deptid
     * @param jurisdiction
     * @return
     */
    List<Map<String, Object>> getWorkReportInfos(@Param("type")String type,
                                                @Param("deptid")String deptid,
                                                @Param("jurisdiction")String jurisdiction);
 
    /**
     * 根据保安员编码查询保安信息
     * @param securityNumber 保安证编码
     * @return
     */
    UserVO getUserInfoBySecurityNumber(@Param("securityNumber") String securityNumber,@Param("cardid") String cardid);
 
    /**
     * 保安员信息
     * @param user
     * @return
     */
    UserVO getUserDetails(@Param("user") User user);
 
 
    DispatcherVO getDispatcherInfoByUserId(Long userId);
 
    /**
     * 查询账号相同的用户数量
     * @param account
     * @return
     */
    Integer selectCountAccount(@Param("account") String account);
 
    /**
     * 查询当前部门名称及父级部门名称
     * @param deptId 部门名称
     * @return
     */
    @SqlParser(filter = true)
    List<String> getDeptName(@Param("deptId") String deptId);
 
    /**
     * 查询用户表中未删除,未离职的用户信息
     * @param username
     * @return
     */
    User getUserInfo(@Param("account") String username);
 
    /**
     * 现场检查获取保安员
     * @param jurisdiction
     * @return
     */
    List<Map<String, Object>> getSecurityInfo(@Param("jurisdiction")String jurisdiction);
 
    /**
     * 导出保安员信息
     * @param user
     * @return
     */
    List<SecurityExcel> exportSecurityInfo(@Param("user") UserVO user);
    /**
     * 查询押运人员编码不为null的保安信息
     * @return
     */
    List<Map<String, Object>> selectEquipent();
 
    /**
     * 查詢派遣信息
     * @param id 用戶id
     * @return
     */
    DispatcherVO getUserDispatcherInfo(Long id);
 
    /**
     * 用户批量导入
     * @param userList
     */
    void batchUserList(@Param("list") List<User> userList);
 
    /**
     * 从业记录批量导入
     * @param experienceList
     */
    void batchExperienceList(@Param("list") List<Experience> experienceList);
 
    /**
     * 年龄分布查询
     * @return
     */
    List<Integer> getAgeStatistics(@Param("user") UserVO user);
 
    /**
     * 根据用户 id 查询用户信息
     * @param id
     * @return
     */
    User getUserById(long id);
 
    /**
     * 根据手机号获取用户信息
     * @param tenantId
     * @param phone
     * @return
     */
    User getUserByPhone(@Param("tenantId")String tenantId,@Param("phone") String phone);
}