package com.jcdm.system.service; import java.util.List; import com.jcdm.common.core.domain.TreeSelect; import com.jcdm.common.core.domain.entity.SysDept; /** * éƒ¨é—¨ç®¡ç† æœåС层 * * @author jc */ public interface ISysDeptService { /** * æŸ¥è¯¢éƒ¨é—¨ç®¡ç†æ•°æ® * * @param dept éƒ¨é—¨ä¿¡æ¯ * @return 部门信æ¯é›†åˆ */ public List<SysDept> selectDeptList(SysDept dept); /** * æŸ¥è¯¢éƒ¨é—¨æ ‘ç»“æž„ä¿¡æ¯ * * @param dept éƒ¨é—¨ä¿¡æ¯ * @return éƒ¨é—¨æ ‘ä¿¡æ¯é›†åˆ */ public List<TreeSelect> selectDeptTreeList(SysDept dept); /** * 构建å‰ç«¯æ‰€éœ€è¦æ ‘结构 * * @param depts 部门列表 * @return æ ‘ç»“æž„åˆ—è¡¨ */ public List<SysDept> buildDeptTree(List<SysDept> depts); /** * 构建å‰ç«¯æ‰€éœ€è¦ä¸‹æ‹‰æ ‘结构 * * @param depts 部门列表 * @return ä¸‹æ‹‰æ ‘ç»“æž„åˆ—è¡¨ */ public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts); /** * æ ¹æ®è§’色IDæŸ¥è¯¢éƒ¨é—¨æ ‘ä¿¡æ¯ * * @param roleId 角色ID * @return 选ä¸éƒ¨é—¨åˆ—表 */ public List<Long> selectDeptListByRoleId(Long roleId); /** * æ ¹æ®éƒ¨é—¨IDæŸ¥è¯¢ä¿¡æ¯ * * @param deptId 部门ID * @return éƒ¨é—¨ä¿¡æ¯ */ public SysDept selectDeptById(Long deptId); /** * æ ¹æ®ID查询所有å部门(æ£å¸¸çжæ€ï¼‰ * * @param deptId 部门ID * @return å部门数 */ public int selectNormalChildrenDeptById(Long deptId); /** * 是å¦å˜åœ¨éƒ¨é—¨å节点 * * @param deptId 部门ID * @return 结果 */ public boolean hasChildByDeptId(Long deptId); /** * 查询部门是å¦å˜åœ¨ç”¨æˆ· * * @param deptId 部门ID * @return 结果 true å˜åœ¨ false ä¸å˜åœ¨ */ public boolean checkDeptExistUser(Long deptId); /** * æ ¡éªŒéƒ¨é—¨å称是å¦å”¯ä¸€ * * @param dept éƒ¨é—¨ä¿¡æ¯ * @return 结果 */ public boolean checkDeptNameUnique(SysDept dept); /** * æ ¡éªŒéƒ¨é—¨æ˜¯å¦æœ‰æ•°æ®æƒé™ * * @param deptId 部门id */ public void checkDeptDataScope(Long deptId); /** * 新增ä¿å˜éƒ¨é—¨ä¿¡æ¯ * * @param dept éƒ¨é—¨ä¿¡æ¯ * @return 结果 */ public int insertDept(SysDept dept); /** * 修改ä¿å˜éƒ¨é—¨ä¿¡æ¯ * * @param dept éƒ¨é—¨ä¿¡æ¯ * @return 结果 */ public int updateDept(SysDept dept); /** * åˆ é™¤éƒ¨é—¨ç®¡ç†ä¿¡æ¯ * * @param deptId 部门ID * @return 结果 */ public int deleteDeptById(Long deptId); }