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{
public Boolean isExceedLevel(Integer id) {
int level=1;
SysOrganization sysOrganization = orgDao.selectByPrimaryKey(id);
if (sysOrganization != null) {
level++;
isExceedLevel(sysOrganization.getParentId());
boolean isExceed = level > 3 ? true : false;
if(isExceed){
return isExceed;
public Boolean isExceedLevel(Integer id) {
SysOrganization parentOrganization = orgDao.selectByPrimaryKey(id);
SysOrganization organization = orgDao.selectByPrimaryKey(parentOrganization.getParentId());
if (organization != null) {
SysOrganization grandOrganization = orgDao.selectByPrimaryKey(organization.getParentId());
if (grandOrganization != null) {
SysOrganization rootOrganization = orgDao.selectByPrimaryKey(organization.getParentId());
if (rootOrganization != null) {
return true;
}
}
}
return false;
}
/**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!