职位禁用提示存在生效的下级职位或存在未提交,未审批,审批中的调动单原创
9人赞赏了该文章
60次浏览
未经作者许可,禁止转载编辑于2024年06月11日 09:32:30
问题:职位禁用提示:
1、存在生效的下级职位时,不能禁用职位
2、职位存在未提交、未审批、审批中的调动单
解决方案,通过后台查找引用的数据:
1、查询职位在哪些未审批的单据中(只需要改sql 的编码 就行)
select * from t_hr_affairbizdetail where (FNEWPOSITIONID in (select fid from t_org_position where fnumber in ('8801','906')) or FOLDPOSITIONID in (select fid from t_org_position where fnumber in ('8801','906')) ) and FBILLSTATE <>3
2、查询职位 的下级职位(只需要改sql 的编码 就行)
select * From t_org_position where FPARENTID in (select fid from t_org_position where fnumber ='803')
推荐阅读