#EC-HJ-11# 新增从建模uf_prop表中获取数据的公共方法
parent
012ae8c9c7
commit
9ed5357b2f
@ -0,0 +1,34 @@
|
|||||||
|
package weaver.interfaces.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"));
|
||||||
|
|
||||||
|
public static String getPropName(String pkey)
|
||||||
|
{
|
||||||
|
if(StringUtils.isEmpty(active)){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(pkey)){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String pvalue = "";
|
||||||
|
try{
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String sql = " SELECT DEVVALUE,TESTVALUE,PRODVALUE FROM UF_PROP WHERE PKEY = ?";
|
||||||
|
rs.executeQuery(sql,new Object[]{pkey});
|
||||||
|
if(rs.next()){
|
||||||
|
pvalue = Util.null2String(rs.getString(active+"VALUE"));
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
return pvalue;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue