业务场景:工作流中判断节点
1.供应商是否重复
2.是否多收款人
java . sql . Connection con = com . kingdee . bos . framework . ejb . EJBFactory . getConnection ( __bosContext ) ;
java . sql . Statement batchStatement = con . createStatement ( ) ;
java . lang . StringBuffer Sql = new java . lang . StringBuffer ( ) ;
Sql . append ( "select count(*) " + "from T_BC_TravelAccountBCE " + "where FBILLID = '" + id + "'" ) ; 2.//sql语句查出收款人数量,从而在分支中判断是否多收款人
java . sql . ResultSet rst = batchStatement . executeQuery ( Sql . toString ( ) ) ;
if ( rst . next ( ) ) { payers = rst . getString ( 1 ) . toString ( ) ; }
com . kingdee . util . db . SQLUtils . cleanup ( batchStatement , con ) ;