?? nszx_sjbh.java
字號:
package app.controller.internet.nszx;import frame.db.DBConnection;import frame.config.Const;import java.sql.*;/** * <p>Title: 出口退稅登記序號</p> * <p>Description: 出口退稅登記序號</p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: DigitalChina</p> * @author * @version 1.0 */public class Nszx_sjbh { /** * 調用數據庫存儲過程產生一個唯一標識的字符串,作為發布后數據的數據編號。 * @return 發布序號。 */ public String getSjbh() { Connection conn = null; try { conn = DBConnection.getConnection(Const.IS_INTERNET, Const.IS_AUTOCOMMIT); Statement sm=conn.createStatement(); ResultSet rs=sm.executeQuery("select SEQ_NSZX_SJBH.nextval from dual"); String xh=""; if(rs.next()) { xh=rs.getString(1); int lengthofxh=10-xh.length(); for (int i=0;i<lengthofxh;i++) { xh="0"+xh; } xh="DJ"+xh; } rs.close(); sm.close(); return xh; }catch(Exception e){ return null; }finally{ try { conn.close(); }catch(Exception e){} } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -