Commit 308976e2 by zhengxj

finish 解决组织新增超过四层问题 on 20190313 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18477 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 8197d9f4
...@@ -99,19 +99,20 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{ ...@@ -99,19 +99,20 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{
public Boolean isExceedLevel(Integer id) { public Boolean isExceedLevel(Integer id) {
int level=1; SysOrganization parentOrganization = orgDao.selectByPrimaryKey(id);
SysOrganization sysOrganization = orgDao.selectByPrimaryKey(id); SysOrganization organization = orgDao.selectByPrimaryKey(parentOrganization.getParentId());
if (sysOrganization != null) { if (organization != null) {
level++; SysOrganization grandOrganization = orgDao.selectByPrimaryKey(organization.getParentId());
isExceedLevel(sysOrganization.getParentId()); if (grandOrganization != null) {
boolean isExceed = level > 3 ? true : false; SysOrganization rootOrganization = orgDao.selectByPrimaryKey(organization.getParentId());
if(isExceed){ if (rootOrganization != null) {
return isExceed; return true;
}
} }
} }
return false; return false;
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!