Commit fac942b2 authored by 鲁鑫's avatar 鲁鑫

根据业务主表id和业务表名查询对应申请人的直接领导

parent 47bf80b9
......@@ -264,4 +264,17 @@ public class Function extends AbstractDaoFunction {
String sql = this.getSqlByname("queryStationLeaders");
return this.sqlExecutorDao.queryToList(sql, OrgUnit.class, bizId);
}
/**
* 根据业务主表id和业务表名查询对应申请人的直接领导
* @param bizId
* @param tableName
* @return
*/
public List<OrgUnit> findbmjl(String bizId,String tableName){
Assert.hasText(bizId, "参数id不能为空。");
String sql = this.getSqlByname("querybmjl");
sql = sql.replace("%s",tableName);
return this.sqlExecutorDao.queryToList(sql, OrgUnit.class,bizId);
}
}
......@@ -234,6 +234,13 @@
)
AND sa.CODE = ?;
</sql>
<!--根据物料主数据查询创建人的直接上级-->
<sql name="querybmjl">
SELECT o.FULL_ID, o.FULL_NAME
FROM sa_oporg o WHERE o.PARENT_ID IN (
SELECT o.PARENT_ID FROM sa_oporg o WHERE o.id IN ( SELECT o.PARENT_ID FROM sa_oporg o LEFT JOIN %s pro ON o.id = pro.person_member_id WHERE pro.id = ? ) )
AND o.CODE IN ( 'JL', 'ZZ', 'KZ', 'FL', 'FKZ' );
</sql>
</query>
</query-mappings>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment