取分录组织负责人
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-17 00:50:58发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-63639.html