📄 prodfunbean.java
字号:
package com.doone.fj1w.fjmgr.sysmgr;
import com.doone.data.DacClient;
import com.doone.data.DataRow;
import com.doone.data.DataTable;
import com.doone.fj1w.fj1w.login.app.CommitDate;
import com.doone.util.FileLogger;
public class ProdfunBean {
public static final String FUNAUTO_0 = "自助";
public static final String FUNAUTO_1 = "人工干涉";
public static final String PWDLEVEL_0 = "初始密码";
public static final String PWDLEVEL_1 = "高级密码";
public static final String CALLERTYPE_1 = "游客";
public static final String CALLERTYPE_2 = "网上注册客户,但没有与产品关联";
public static final String CALLERTYPE_3 = "网上注册客户,但与产品关联";
public static final String SETUPSTATE_1 = "不需要设置";
public static final String SETUPSTATE_2 = "需要设置";
public static final String FUNSTATE_E = "在用";
public static final String FUNSTATE_D = "禁用";
public static final String OUTPUT_0 = "禁止";
public static final String OUTPUT_1 = "开放";
public static final String FUNTYPE_C = "程控";
public static final String FUNTYPE_N = "新业务";
public static final String PAGEATTEMPERPARE_1 = "此字段在是否需要程控设置字段值为1时,才有用到";
public static final String PAGEATTEMPERPARE_2 = "此字段由新东网维护";
DataRow repositoryInfo;
private DacClient _dbClient;
private String FunCode;
private String FunName;
private String FunAuto;
private String PwdLevel;
private String CallerType;
private String SetupState;
private String FunDesc;
private String FunState;
private String Output;
private String FunType;
public ProdfunBean() {
}
/**
* 找出某地区的某种程控产品的所有程控功能
* @param dbClient
* @return
*/
public DataTable getProdfunByProductId(DacClient dbClient,String sProductId,String sCity) {
try {
StringBuffer sql = new StringBuffer();
sql.append("select ");
sql.append("PRODUCTID, ");
sql.append("FUNCODE, ");
sql.append("FUNNAME, ");
sql.append("FUNAUTO, ");
sql.append("PwdLevel, ");
sql.append("CallerType, ");
sql.append("SetupState, ");
sql.append("FunDesc, ");
sql.append("FunState, ");
sql.append("Output, ");
sql.append("FunType, ");
sql.append("PageAttemperPara ");
sql.append(" from ");
sql.append("Td_Prodfun");
sql.append(" where PRODUCTID=?");
sql.append(" and CITYCODE =?");
Object[] aParam = new Object[2];
aParam[0] = sProductId;
if(sCity == null || sCity.equals(""))
aParam[1] = "0591";
else
aParam[1] = sCity;
DataTable dt = dbClient.executeQuery(sql.toString(),aParam);
return dt;
}
catch (Exception ex) {
FileLogger.getLogger().warn(ex);
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
/**
* 根据FunCode找到程控功能
* @param dbClient
* @param sProdfunId
*/
public DataTable getProdfunByFunCode(DacClient dbClient,String sProdfunId) {
try {
StringBuffer sql = new StringBuffer();
sql.append("select ");
sql.append("PRODUCTID, ");
sql.append("FUNCODE, ");
sql.append("FUNNAME, ");
sql.append("FUNAUTO, ");
sql.append("PwdLevel, ");
sql.append("CallerType, ");
sql.append("SetupState, ");
sql.append("FunDesc, ");
sql.append("FunState, ");
sql.append("Output, ");
sql.append("FunType, ");
sql.append("PageAttemperPara ");
sql.append(" from ");
sql.append("Td_Prodfun");
sql.append(" where FUNCODE=?");
Object[] aParam = new Object[1];
aParam[0] = sProdfunId;
DataTable dt = dbClient.executeQuery(sql.toString(),aParam);
return dt;
}
catch (Exception ex) {
FileLogger.getLogger().warn(ex);
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
/**
* 根据FunCode修改程控功能
* @param sProdfunId
*/
public void UpdateProdfunByFunCode(String sProdfunId) {
try {
StringBuffer sql = new StringBuffer();
CommitDate cd = CommitDate.getInstance();
sql.append("update ");
sql.append("Td_Prodfun ");
sql.append("set ");
sql.append("PwdLevel=?,");
sql.append("CallerType=?,");
sql.append("FunDesc=?,");
sql.append("Output=?");
sql.append(" where FUNCODE='"+sProdfunId+"'");
Object[] aParam = new Object[4];
aParam[0] = PwdLevel;
aParam[1] = CallerType;
aParam[2] = FunDesc;
aParam[3] = Output;
cd.commitUpdateDate(sql.toString(),aParam);
}
catch (Exception ex) {
FileLogger.getLogger().warn(ex);
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
public String getProductName() {
return repositoryInfo.getString("productName");
}
public String getPwdLevel(String sPwdLevel) {
int iPwdLevel = Integer.parseInt(sPwdLevel);
if(iPwdLevel == 1)
return ProdfunBean.PWDLEVEL_1;
else
return ProdfunBean.PWDLEVEL_0;
}
public String getFunState(String sState) {
if(sState.equals("E"))
return ProdfunBean.FUNSTATE_E;
else
return ProdfunBean.FUNSTATE_D;
}
public String getFunType(String sFunType) {
if(sFunType.equals("C"))
return ProdfunBean.FUNTYPE_C;
else
return ProdfunBean.FUNTYPE_N;
}
public void setProductName(String productName) {
repositoryInfo.setValue("productName", productName);
}
public void setFunCode(String FunCode) {
this.FunCode = FunCode;
}
public void setFunName(String FunName) {
this.FunName = FunName;
}
public void setFunAuto(String FunAuto) {
this.FunAuto = FunAuto;
}
public void setPwdLevel(String PwdLevel) {
this.PwdLevel = PwdLevel;
}
public void setCallerType(String CallerType) {
this.CallerType = CallerType;
}
public void setSetupState(String SetupState) {
this.SetupState = SetupState;
}
public void setFunDesc(String FunDesc) {
this.FunDesc = FunDesc;
}
public void setFunState(String FunState) {
this.FunState = FunState;
}
public void setOutput(String Output) {
this.Output = Output;
}
public void setFunType(String FunType) {
this.FunType = FunType;
}
private static DataTable _entityStruct = null;
protected DataTable get_entityStruct() {
return _entityStruct;
}
protected void set_entityStruct(DataTable struct) {
_entityStruct = struct;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -