public static int IOCmd(String devNum,String carNum,String[] reason) throws SQLException{
//DbKit.getConfig().getDataSource().getConnection();数据源中获取
Connection conn = DbKit.getConfig().getConnection();
CallableStatement proc = conn.prepareCall("call proc_ioservice(?,?,?,?,?,?)");
proc.setString(1, devNum);
proc.setString(2, carNum);
proc.registerOutParameter(3, java.sql.Types.TINYINT);//设置返回值类型
proc.registerOutParameter(4, java.sql.Types.TINYINT);//设置返回值类型
proc.registerOutParameter(5, java.sql.Types.TINYINT);//设置返回值类型
proc.registerOutParameter(6, java.sql.Types.FLOAT);//设置返回值类型
proc.execute();
int lType = proc.getInt(3);
int lRet = proc.getInt(4);
int lReason = proc.getInt(5);
float lMoney = proc.getInt(6);
reason[0] = "进出类型:"+ fDevType[lType];
reason[1] = "开闸结果:"+ fOpenRet[lRet];
if (lType==1){
reason[2] = "原因:"+ fInReason[lReason];
}else if (lType==2){
reason[2] = "原因:"+ fOutReason[lReason];
}
if (lMoney>0 ){
reason[3] = "收费:"+lMoney;
}
return lRet;
}
请问波总,这样使用会不会有冲突?