Merge branch 'develop' of http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization into feature/cl
This commit is contained in:
commit
868a973bc5
|
|
@ -22,6 +22,7 @@ public class CompanyTreePO {
|
|||
private boolean isLeaf;
|
||||
private String key;
|
||||
private boolean disabled;
|
||||
private String type;
|
||||
|
||||
public boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
|
|
@ -38,4 +39,11 @@ public class CompanyTreePO {
|
|||
public String getValue() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
if(id.startsWith("d")){
|
||||
return "2";
|
||||
}
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import com.engine.organization.util.*;
|
|||
import com.engine.organization.util.browser.OrganizationBrowserUtil;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.engine.organization.util.detach.DetachUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
|
|
@ -284,6 +285,12 @@ public class StaffPlanServiceImpl extends Service implements StaffPlanService {
|
|||
if (null != forbiddenTag) {
|
||||
sqlWhere += " AND t.forbidden_tag = '" + forbiddenTag + "'";
|
||||
}
|
||||
// 分权
|
||||
DetachUtil detachUtil = new DetachUtil(user);
|
||||
if (detachUtil.isDETACH()) {
|
||||
String ids = detachUtil.getJclRoleLevels();
|
||||
sqlWhere += " AND t.ec_company in (" + ids + ")";
|
||||
}
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.engine.organization.util.*;
|
|||
import com.engine.organization.util.browser.OrganizationBrowserUtil;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.engine.organization.util.detach.DetachUtil;
|
||||
import com.engine.organization.util.excel.ExcelUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
|
@ -437,6 +438,12 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
sqlWhere += " AND t.plan_id in ( select id from jcl_org_staffplan where plan_name " + dbType.like(staffName) + ") ";
|
||||
}
|
||||
|
||||
// 分权
|
||||
DetachUtil detachUtil = new DetachUtil(user);
|
||||
if (detachUtil.isDETACH()) {
|
||||
String ids = detachUtil.getJclRoleLevels();
|
||||
sqlWhere += " AND t.ec_company in (" + ids + ")";
|
||||
}
|
||||
return sqlWhere;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue