1.定义一个内码类型的变量billid,一个外部类型变量posarray
2.在提交节点设置输出单据id到变量billid
3.在提交节点后置脚本放以下脚本
4.使用费用类型名称做分支条件时直接把:( posarray [N]== "差旅费") 复制到连接弧脚本编辑里,N从0开始算,posarray [0]代表第一条分录费用类型名称,posarray [1]代表第二条分录费用类型名称
java . lang . StringBuffer Sql1 = new java . lang . StringBuffer ( ) ;
Sql1 . append ( "select Fname_l2 from T_BC_ExpenseType where fid in (select FEXPENSETYPEID from T_BC_BizAccountBillentry where fbillid ='" +billid+"')" ) ;
java . sql1 . Connection con = com . kingdee . bos . framework . ejb . EJBFactory . getConnection ( __bosContext ) ;
java . sql1 . Statement batchStatement = con . createStatement ( ) ;
java . sql1 . ResultSet rst1 = batchStatement . executeQuery ( Sql1 . toString ( ) ) ;
java . util . ArrayList list1 = new java . util . ArrayList ( ) ;
while ( rst1 . next ( ) ) { list1 . add ( rst1 . getString ( "Fname_l2" ) . toString ( ) ) ; }
posarray = new String [ list1 . size ( ) ] ;
for ( int i = 0 ; i < list1 . size ; i ++ ) { posarray [ i ] = list1 . get ( i ) . toString ( ) ; }
return posarray;
推荐阅读