Merge branch 'feature/dxf' into develop

pull/274/head
dxfeng 9 months ago
commit 6ccb4ec3d3

@ -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…
Cancel
Save