#HZZX-1# 获取二开的配置信息
parent
42ced099a7
commit
afb607180c
@ -0,0 +1,73 @@
|
||||
package weaver.interfaces.hzzx.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;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*
|
||||
* @param pkey
|
||||
* @return
|
||||
*/
|
||||
public String getUfPropValueStatic(String pkey)
|
||||
{
|
||||
BaseBean baseBean = new BaseBean();
|
||||
if(StringUtils.isEmpty(pkey)){
|
||||
return "";
|
||||
}
|
||||
String 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"));
|
||||
}
|
||||
baseBean.writeLog("pvalue:"+pvalue);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
bb.writeLog("propbean-e:"+e);
|
||||
}
|
||||
return pvalue;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue