#SSKJ-1# 增加建模参数配置功能,通过方法来获取建模配置的参数
parent
75621184a0
commit
0c023fa03b
@ -0,0 +1,43 @@
|
||||
package weaver.interfaces.sskj.comInfo;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
public class PropBean {
|
||||
|
||||
public static BaseBean bb = new BaseBean();
|
||||
public static String active = Util.null2String(bb.getPropValue("developProp","active")).toUpperCase();
|
||||
|
||||
/***
|
||||
*
|
||||
* @param pkey
|
||||
* @return
|
||||
*/
|
||||
public static String getUfPropValue(String pkey)
|
||||
{
|
||||
BaseBean baseBean = new BaseBean();
|
||||
if(StringUtils.isEmpty(pkey)){
|
||||
return "";
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(active)){
|
||||
active = Util.null2String(baseBean.getPropValue("developProp","active")).toUpperCase();
|
||||
}
|
||||
|
||||
String pvalue = "";
|
||||
try{
|
||||
RecordSet rs = new RecordSet();
|
||||
String sql = " SELECT DEVVALUE,TESTVALUE,PRODVALUE FROM UF_PROP WHERE PKEY = ?";
|
||||
rs.executeQuery(sql,new Object[]{pkey.trim()});
|
||||
if(rs.next()){
|
||||
pvalue = Util.null2String(rs.getString(active+"VALUE"));
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
bb.writeLog("propbean-e:"+e);
|
||||
}
|
||||
return pvalue;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue