liuxiaolong
2019-05-06 f99bc8c6a1d10610373738edd7d0aa0181c81d99
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
package com.cloud.user.service;
 
import com.cloud.model.common.Page;
import com.cloud.model.sys.SysOrganization;
import com.cloud.user.vo.SysOrganizationVO;
 
import java.util.List;
import java.util.Map;
 
public interface SysOrganizationService {
 
    /**
     * 保存组织结构
     *
     * @param org
     * @return
     */
    Map<String,Object> save(SysOrganizationVO org);
 
    /**
     * 修改组织结构
     *
     * @param org
     * @return
     */
    int update(SysOrganization org);
 
    /**
     * 根据Id查找组织结构
     *
     * @param id
     * @param orgId
     * @return
     */
    SysOrganization findById(Long id,Long orgId);
 
    /**
     * 物理删除
     *
     * @param id
     * @param orgId
     * @return
     */
    int delete(Long id,Long orgId);
 
    /**
     * 获得组织机构分页数据
     *
     * @param params
     * @return
     */
    Page<SysOrganization> findPageByParams(Map<String, Object> params);
 
 
    /**
     * 查找上级第一个指定的机构类型
     * 例如:查找学校
     *
     * @param type 要查找的机构类型
     * @param currentId 指定的机构id,查它之上的机构
     * @return
     */
    SysOrganization findUpByType(Integer type, Long currentId,Long orgId);
 
    /**
     * 查找上级第一个机构(类型为机构)
     * 例如:查找学校
     *
     * @param currentId 指定的机构id,查它之上的机构
     * @return
     */
    SysOrganization findUpById(Long currentId,Long orgId);
 
    /**
     * 查找下级的指定类型的所有机构
     * 例如;查找查找学校所有年级,年级所有的班级
     *
     * @param type 要查找的机构类型
     * @param currentId 指定的机构id,查它之下的机构
     * @return orgId 分库Id
     */
    List<SysOrganization> findDownByType(Integer type, Long currentId,Long orgId);
 
    /**
     * 查找组织树
     * @param params  组织机构ID
     * @return
     */
    List<SysOrganization> findAll(Map<String,Object> params);
 
    List<SysOrganization> findHeadquarters(Long currentId, String type);
 
    List<SysOrganization> findSubOrg(Long headId, boolean isSelf, String type);
 
    Map<String,Object> deleteOrg(Map<String, Object> params);
 
    Map<String,Object> findCheckSchool(Map<String,Object> params);
 
    //获取组织下级所有id集合
    List<Integer> findDownByOffIds(Map<String, Object> param);
 
    //验证此组织是否选择的是班级
    boolean isImportStudentClass(Map<String, Object> param);
 
    //验证此组织是否是学校或者部门
    Map<String,Object> isisImportTeacherOffice(Map<String, Object> param);
 
    //查找组织部门名称
    String findCompactName(Integer officeId);
 
    //根据传来的组织id查找它上级的学校学区orgId集合
    List<Integer> findOrgIds(Integer id);
 
    String findOrgName(Integer id);
}