SysDepartMapper.java
4.8 KB
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
package com.skua.modules.system.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.skua.modules.system.entity.SysDepart;
import com.skua.modules.system.vo.DepartTree;
import com.skua.modules.system.vo.SysDeptUserVO;
import com.skua.tool.annotation.Anonymous;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* 部门 Mapper 接口
*/
public interface SysDepartMapper extends BaseMapper<SysDepart> {
/**
* 根据用户ID查询部门集合
*/
public List<SysDepart> queryUserDeparts(@Param("userId") String userId);
@Select("select * from sys_depart where org_code = #{orgCode}")
public List<SysDepart> getDeptIdByCode(@Param("orgCode") String orgCode);
/**
* <pre>
* 根据厂id获取机构人员树
* </pre>
*
* @param departId
* @return
* @author Li Yuanyuan, 2020年8月31日 上午9:52:46
*/
public List<SysDeptUserVO> queryDeptAndEmpTreeList(@Param("departId") String departId);
/**
* 获取厂区树
*
* @return
*/
public List<SysDeptUserVO> queryFactoryTreeList();
List<SysDepart> getFactoryList();
List<SysDepart> getCmpyList();
List<SysDepart> getDepartTree(@Param("orgCode") String orgCode);
List<SysDepart> getDepartTreeByJt(@Param("orgCode") String orgCode);
List<SysDepart> getDepartTreeByJt2(@Param("orgCode") String orgCode);
List<SysDepart> getCenterByJt(@Param("orgCode") String orgCode);
List<SysDepart> getJtList();
List<SysDepart> getDepartList(@Param("orgCode") String orgCode);
List<SysDepart> getAllDepartList();
List<SysDepart> getSuperDepartTree();
List<SysDeptUserVO> queryDeptUserTreeList(@Param("id") String id);
/**
* <pre>
* 获取该节点及父级部门树
* </pre>
*
* @param id
* @return
* @author Li Yuanyuan, 2020年9月2日 下午5:44:08
*/
public List<SysDepart> getParentDepartTree(@Param("id") String id);
/**
* 获取片区
*
* @return
*/
public List<SysDepart> getAreaList(@Param("areaIds") String areaIds);
/**
* 根据片区id获取水厂数据
*
* @param areaId
* @return
*/
public List<SysDepart> queryDepartListByAreaId(String areaId, String[] departIds);
public Map<String, Object> getAreaIdByDepartId(@Param("departId") String departId);
List<SysDepart> queryDeptInfo(String userId);
/**
* @return java.util.List<com.skua.modules.system.entity.SysDepart>
* @Description 获取所有分中心列表
* @Date 2020-10-28 10:44
* @Param []
**/
List<SysDepart> getCenterAllList(@Param("centers") List<String> centers);
/**
* 实时数据片区列表获取
*
* @param areaIds
* @return
*/
public List<SysDepart> getAreaListForMonitor(@Param("areaIds") String areaIds);
/**
* 实时数据厂区列表获取
*
* @param userId
* @return
*/
public List<SysDepart> queryUserDepartsForMonitor(@Param("userId") String userId);
/**
* 实时数据集团用户厂区列表获取
*
* @param orgCode
* @return
*/
public List<SysDepart> getDepartTreeByJtForMonitor(@Param("orgCode") String orgCode);
String queryDepartNameById(@Param("departId") String departId);
@Select("select a.id as departId,a.depart_name as departName,b.device_id as deviceId,b.device_status as deviceStatus from sys_depart a " +
"left join sys_factory_device b on a.id= b.depart_id ${ew.customSqlSegment} ")
List<Map<String, Object>> queryFactoryDevice(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
public Map<String,Object> queryUserDepartsMap(@Param("userId") String userId);
String getDepartTreeByParentDepartId(@Param("parentDepartId")String parentDepartId);
String getChildDepartId(@Param("departIds") String departIds);
List<SysDeptUserVO> queryDeptAndUserTreeList(@Param("departId") String departId);
List<SysDeptUserVO> queryDeptAndSystemTreeList(@Param("departId") String departId);
@Anonymous
List<DepartTree> getJimuDepartTree(@Param("pid") String pid);
@Anonymous
List<DepartTree> getJimuDepartTreeFY(@Param("pid") String pid, @Param("departIds") String departIds);
@Anonymous
List<DepartTree> getJimuDepartTreeL(@Param("pid") String pid, @Param("departIds") String departIds);
@Anonymous
List<DepartTree> getJimuDepartTreeELSE(@Param("departIds") String departIds);
@Anonymous
SysDepart getById(@Param("pid") String pid);
List<SysDepart> getChildDepartList(@Param("departIds") String departIds);
List<SysDepart> queryDepartsByIds(@Param("ids") String ids);
}