class DeptService extends BaseService<Dept,Long,DeptRepository> {

    public void deleteDept(Long deptId) {
        Dept dept = get(deptId);

        List<Dept> subDepts = deptRepository.findByPidsLike("%[" + dept.getId() + "]%");
        deptRepository.deleteAll(subDepts);
        deptRepository.delete(dept);
    }

}