📄 daopersonchange.java.svn-base
字号:
package GDPE.customer.personchange;
import levin.base.*;
import levin.util.DbAccess;
import levin.util.DataSet;
/**
* 个人服务管理 数据库访问类
* <p>Title: 企业合同</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author
* @version 1.0
*/
public class DAOPersonChange extends DAOBase {
public DAOPersonChange() {
}
public static EnENT_PERSONAL_CHANGE[] searchEnPersonChange(DbAccess db,
EnENT_PERSONAL_CHANGE SearchEnPersonChange) throws Exception {
String eENT_PERSONAL_CHANGE = "";
if ((SearchEnPersonChange.getChFollower_Name() != null && SearchEnPersonChange.getChFollower_Name().length() != 0)
|| (SearchEnPersonChange.getDtBegin_Time() != null && SearchEnPersonChange.getDtBegin_Time().length() != 0)
|| (SearchEnPersonChange.getChAnother_Follower_Name() != null && SearchEnPersonChange.getChAnother_Follower_Name().length() != 0)
|| (SearchEnPersonChange.getICustomer_ID()!=0)) {
eENT_PERSONAL_CHANGE = "(select * from ENT_PERSONAL_CHANGE where "
+ GDPE.customer.personchange.DAOPersonChange
.searchSql(SearchEnPersonChange)
+ ") ENT_PERSONAL_CHANGE ";
//System.out.println("0000000000000000000"+SearchEnPersonChange.getChCustomer_ID());
} else {
eENT_PERSONAL_CHANGE = "ENT_PERSONAL_CHANGE";
}
//System.out.println(Auditor);
String sql = "";
//String sql = "select * from Ent_Record_Contract where chContractNo='"+SearchEnContract.getChContractNo()+"'";
sql = sql + " select ENT_PERSONAL_CHANGE.*";
sql = sql + " from " + eENT_PERSONAL_CHANGE;
sql = sql + setDefaultSort();
System.out.println("sq-------------------------" + sql);
EnENT_PERSONAL_CHANGE[] aENT_PERSONAL_CHANGE = null;
aENT_PERSONAL_CHANGE = DAOPersonChange.SetEnPersonChange(db, sql);
return (aENT_PERSONAL_CHANGE);
}
public static String searchSql(
EnENT_PERSONAL_CHANGE eENT_PERSONAL_CHANGE) {
String sql = "";
//System.out.println("++++++++++++++++++"+eENT_PERSONAL_CHANGE.getChCustomer_ID());
int i = 0;
if (eENT_PERSONAL_CHANGE.getChFollower_Name() != null
&& !(eENT_PERSONAL_CHANGE.getChFollower_Name() + "A")
.equals("A")) {
if (i == 0) {
sql = sql
+ " ENT_PERSONAL_CHANGE.chFollower_Name like '%"
+ eENT_PERSONAL_CHANGE.getChFollower_Name()
.trim() + "%'";
i++;
} else {
sql = sql
+ " and ENT_PERSONAL_CHANGE.chFollower_Name like '%"
+ eENT_PERSONAL_CHANGE.getChFollower_Name()
.trim() + "%'";
}
}
if (eENT_PERSONAL_CHANGE.getChAnother_Follower_Name() != null
&& !(eENT_PERSONAL_CHANGE.getChAnother_Follower_Name() + "A").equals("A")) {
if (i == 0) {
sql = sql
+ " ENT_PERSONAL_CHANGE.chAnother_Follower_Name like '%"
+ eENT_PERSONAL_CHANGE.getChAnother_Follower_Name().trim() + "%'";
i++;
} else {
sql = sql
+ " and ENT_PERSONAL_CHANGE.chAnother_Follower_Name like '%"
+ eENT_PERSONAL_CHANGE.getChAnother_Follower_Name().trim() + "%'";
}
}
if (eENT_PERSONAL_CHANGE.getDtBegin_Time() != null
&& !(eENT_PERSONAL_CHANGE.getDtBegin_Time() + "A").equals("A")) {
if (i == 0) {
sql = sql + " ENT_PERSONAL_CHANGE.dtBegin_Time like '%"
+ eENT_PERSONAL_CHANGE.getDtBegin_Time().trim() + "%'";
i++;
} else {
sql = sql + " and ENT_PERSONAL_CHANGE.dtBegin_Time like '%"
+ eENT_PERSONAL_CHANGE.getDtBegin_Time().trim() + "%'";
}
}
if (eENT_PERSONAL_CHANGE.getICustomer_ID() != 0
&& !(eENT_PERSONAL_CHANGE.getICustomer_ID() + "A").equals("A")) {
if (i == 0) {
sql = sql + " ENT_PERSONAL_CHANGE.iCustomer_ID like '%"
+ eENT_PERSONAL_CHANGE.getICustomer_ID() + "%'";
i++;
} else {
sql = sql + " and ENT_PERSONAL_CHANGE.iCustomer_ID like '%"
+ eENT_PERSONAL_CHANGE.getICustomer_ID()+ "%'";
}
}
//String drt=eEnEnt_Record_Contract.getDtRecordTime();
return sql;
}
public static String setDefaultSort() {
String sql = "";
sql = " order by ENT_PERSONAL_CHANGE.id";
return sql;
}
public static EnENT_PERSONAL_CHANGE[] SetEnPersonChange(DbAccess db, String sql)
throws Exception {
DataSet ds = db.executeQuery(sql);
EnENT_PERSONAL_CHANGE[] eENT_PERSONAL_CHANGE = (EnENT_PERSONAL_CHANGE[]) DAOBase.resumeFromDataSet(ds, EnENT_PERSONAL_CHANGE.class.getName());
return eENT_PERSONAL_CHANGE;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -