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);
|
}
|