EAS的数据库中有一个自定义函数newbosid,他的传入参数是对应实体的BOSTYPE,输出值是PK.
一般做接口或其他会调用到这个.方式大致如下:
public static void main(String[] paramArrayOfString)
{
// 加载驱动程序
try {
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
// 得到数据库连接
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.195.36.13:1521:kingdee","eas_tst","eas_tst");
CallableStatement cs = conn.prepareCall("{ ?=call newbosid(?)}");
// Register the type of the return value
cs.registerOutParameter(1, Types.VARCHAR );
// Set the value for the IN parameter
cs.setString(2,"E91B6727");