// 获取委托关系的公司和部门
sql.append(" SELECT ").append("\r");
sql.append(" b1.FID department,b2.FID company ").append("\r");
sql.append(" FROM T_BD_PERSON p1 ").append("\r");
sql.append(" JOIN T_ORG_PositionMember p2 ON p1.FID = p2.FPERSONID ").append("\r");
sql.append(" JOIN T_ORG_Position p3 ON p2.FPOSITIONID = p3.FID ").append("\r");
sql.append(" JOIN T_ORG_BaseUnit b1 ON p3.FADMINORGUNITID = b1.FID ").append("\r");
sql.append(" JOIN T_ORG_UnitRelation u1 ON b1.FID = u1.FFROMUNITID ").append("\r");
sql.append(" JOIN T_ORG_BaseUnit b2 ON u1.FTOUNITID = b2.FID ").append("\r");
sql.append(" JOIN T_ORG_TypeRelation t1 ON u1.FTYPERELATIONID = t1.FID ").append("\r");
sql.append(" WHERE p2.FISPRIMAR
金蝶获取申请人主职位部门和公司
最新推荐文章于 2022-03-09 17:01:57 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)