zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
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
package com.shlanbao.tzsc.pms.sys.org.service;
 
import java.util.List;
 
import com.shlanbao.tzsc.base.model.Tree;
import com.shlanbao.tzsc.pms.sys.org.beans.OrgBean;
import com.shlanbao.tzsc.pms.sys.resource.beans.ResourceBean;
import com.shlanbao.tzsc.pms.sys.user.beans.UserBean;
/**
 * 组织机构业务接口
 * @author Leejean
 * @create 2014年9月16日上午10:41:04
 */
public interface OrgServiceI{
    /**
     * 获得所有未删除组织机构(del=0)
     * @author Leejean
     * @create 2014-8-16下午01:49:06
     * @return
     */
    List<OrgBean> getAllUnDelOrgs() throws Exception;
    /**
     * 获得所有未删除,启用组织机构(del=0 && enable=1)
     * @author Leejean
     * @create 2014-8-16下午01:49:06
     * @return
     */
    List<OrgBean> getAllEnableOrgs() throws Exception;
    /**
     * 获得所有启用的组织机构树
     * @author Leejean
     * @create 2014-8-18下午08:36:38
     * @return
     */
    List<Tree> getAllOrgsTree() throws Exception;
    /**
     * 新增组织机构
     * @author Leejean
     * @create 2014年9月3日上午11:42:27
     * @param orgBean
     * @return 1:已经存在根节点,0:正常添加
     * @throws Exception
     */
    public Long addOrg(OrgBean orgBean) throws Exception;
    /**
     * 删除组织机构
     * @author Leejean
     * @create 2014年8月22日下午7:21:04
     * @param id
     * @throws Exception
     */
    public void deleteOrg(String id) throws Exception;
    /**
     * 批量删除组织机构
     * @author Leejean
     * @create 2014年8月22日下午7:21:07
     * @param ids
     * @throws Exception
     */
    public void batchDeleteOrg(String ids) throws Exception;
    /**
     * 编辑组织机构
     * @author Leejean
     * @create 2014年8月22日下午7:21:13
     * @param OrgBean
     * @throws Exception
     */
    public void editOrg(OrgBean orgBean) throws Exception;
    /**
     * 根据id获取组织机构
     * @param id
     * @return
     */
    public OrgBean getOrgById(String id) throws Exception;
    /**
     * 获得所有组织机构 (新增或修改组织机构时,选择父组织机构)del=0 enable=1
     * @param id
     * @return
     */
    public List<Tree> getAllOrgsSelfNotIn(String id) throws Exception;
    /**
     * 根据当前组织机构加载该组织机构拥有的资源列表
     * @author Leejean
     * @create 2014年8月25日下午9:40:23
     * @param id 组织机构id
     * @return 资源列表
     */
    public List<ResourceBean> getResourcesByOrg(String id) throws Exception;
    /**
     * 给组织机构配权限
     * @author Leejean
     * @create 2014-8-21上午09:04:05
     * @param id 组织机构id
     * @param ids 资源id串
     * @return
     */
    public void assignResourceToOrg(String id, String ids) throws Exception;
    /**
     * 查询待分配的机构用户
     * @author Leejean
     * @create 2014年8月25日下午9:41:58
     * @param id 组织机构id
     * @return
     */
    public List<UserBean> getOrgUnAssignedUsers(String oid,String name) throws Exception;
    /**
     * 查询已分配的机构用户
     * @author Leejean
     * @create 2014年8月28日下午6:46:37
     * @param oid
     * @param pageParams
     * @return
     */
    public List<UserBean> getOrgAssignedUsers(String oid) throws Exception;
    /**
     * 给机构分配用户
     * @author Leejean
     * @create 2014年8月29日上午11:38:43
     * @param id 机构id
     * @param ids 用户ids
     * @return
     */
    public void assignUsersToOrg(String id, String ids) throws Exception;
    ////////////////////////
    /**
     * 获得用户的机构
     * @author Leejean
     * @create 2014-8-18下午08:36:38
     * @param id 用户id
     * @return
     */
    List<Tree> getOrgsByUser(String id) throws Exception;
    /**
     * 给用户分配组织机构
     * @author Leejean
     * @create 2014-8-20上午09:27:20
     * @param id 用户id
     * @param ids 组织机构id
     * @return
     */
    void assignOrg(String id, String ids);
    /**
     * 用户组织机构批量分配
     * @author Leejean
     * @create 2014-8-19下午07:22:22
     * @param uids 用户ids
     * @param oids 角色ids
     * @return
     */
    void batchAssignOrg(String uids, String oids);
}