费用报销单如何设置分录的费用支付部门的负责人审批
概述
可以通过脚本取到每个分录的部门负责人去参与审批;具体脚本可以参考:
1.定义一个内码型变量id,两个外部类型变量posarray、userarray。
2.在提交节点将单据id输到变量id.
3.提交节点的后置脚本放以下脚本
4.审批节点参与人设置为变量userarray
java . lang . StringBuffer sql1 = new java . lang . StringBuffer ( ) ;
sql1 . append ( "select distinct FCostCenterId from T_BC_BizAccountBillentry where FBillID ='"+id+"'") ;
com.kingdee.jdbc.rowset.IRowSet rst= com.kingdee.eas.util.app.DbUtil.executeQuery(__bosContext,sql1.toString());
java . util . ArrayList list1 = new java . util . ArrayList ( ) ;
while ( rst . next ( ) ) { list1 . add ( rst . getString ( "FCostCenterId" ) . toString ( ) ) ; }
posarray = new String [ list1 . size ( ) ] ;
userarray = new String [ list1 . size ( ) ] ;
for ( int i = 0 ; i < list1 . size ; i ++ ) { posarray [ i ] = list1 . get ( i ) . toString ( ) ;
java . lang . StringBuffer sql2 = new java . lang . StringBuffer ( ) ;
sql2 . append ( "select FID from T_PM_USER where Fpersonid in(select Fpersonid from T_ORG_PositionMember where fpositionid in ( select FID from T_ORG_Position where FIsRespPosition = '1' and FAdminOrgUnitID = '" + posarray [ i ] + "'))" ) ;
com.kingdee.jdbc.rowset.IRowSet row= com.kingdee.eas.util.app.DbUtil.executeQuery(__bosContext,sql2.toString());
while ( row . next ( ) ) { FYCDBM_FZR_ID= row . getString ( "FID" ) ; }
if ( null == FYCDBM_FZR_ID|| "" . equals ( FYCDBM_FZR_ID) )
return null ;
userarray [ i ] = FYCDBM_FZR_ID ; }
return userarray;
费用报销单如何设置分录的费用支付部门的负责人审批
本文2024-09-22 18:38:18发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-102063.html