wsxautonumber.java

来自「Agile PLM公司的二次开发例子。 测试程序也就是二次开发例子。希望大家」· Java 代码 · 共 42 行

JAVA
42
字号
/**
 * @Date: 2005-2-4
 * @Author: jiadongz
 * @E-mail: jiadong.zhu@agile.com
 */
 
package wsx.agile.com;

import java.io.InputStream;
import java.util.Properties;


/**
 * This is a WSX for PX to invoke.
 * read throw the property and get the value
 */
public class WSXAutoNumber {
    
    /*
     * @description
     * load properties, and get the prefix for the autonumber
     */
    public String generateNum() {
        String prefix = "ERR";
        try{
            //	load property	//
            Properties property = new Properties();
            InputStream in = this.getClass().getResourceAsStream("file/number.properties");
            property.load(in);
            in.close();
            //	get the value from the key	//
            prefix = property.getProperty("ZJD"); 
        }catch(Exception e){
            e.printStackTrace();
            return "ERR";
        }
        return prefix;
    }///:~ generaeNum() Ends
    

}///:~ WSXAutoNumber Ends

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?