📄 clieatbean.java
字号:
/*
* Created on 2006-6-23
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.funddeal.model.bean.client;
import java.util.Calendar;
import java.util.List;
import com.funddeal.base.interfaces.OperLogInterface;
import com.funddeal.model.bean.operare_log.OperareLogJB;
import com.funddeal.model.dao.client.ClieatDAO;
import com.funddeal.model.pojo.client.Client;
import com.funddeal.model.pojo.custom_entity.OperLogParamEntity;
import net.sf.hibernate.HibernateException;
/**
* @author Administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class ClieatBean {
ClieatDAO clieatDAO=new ClieatDAO();
public boolean add(Client client,OperLogParamEntity olpe){
client.setCreatedDate(Calendar.getInstance());
try {
clieatDAO.addClieat(client);
/*
* 添加相应的日志
*/
//////////////////////////////////////////////////////////////
olpe.setOperResultId(client.getClientNo()); //
olpe.setOperTableName("CLIENT"); //
olpe.setOperType("添加客户帐号"); //
OperLogInterface pif=new OperareLogJB(); //
pif.addOperareLog(olpe); //
//////////////////////////////////////////////////////////////
return true;
} catch (HibernateException e) {
return false;
}
}
public Client exist(String i,String client_no) throws HibernateException{
Client client=clieatDAO.queryClient(i,client_no);
return client;
}
public List existFinancialAcc(String str,String kt) throws HibernateException{
String skt="";
if(str.equals("finacc"))
skt="from FinancialAccount fundaccount where fundaccount.clientNo='"+ kt +"'";
else
skt="from FundAccount fundaccount where fundaccount.financialAccNo='"+ kt +"'";
List list=clieatDAO.exit(skt);
return list;
}
public boolean update(String i,String client_no,String client_name,String id_card_no,String sex,
String phone,String addess,String email,String hobby,OperLogParamEntity olpe) throws HibernateException{
Client client=clieatDAO.queryClient(i,client_no);
if(client!=null){
client.setClientNo(client_no);
client.setClientName(client_name);
client.setCreatedDate(Calendar.getInstance());
client.setIdCardNo(id_card_no);
client.setSex(sex);
client.setPhone(phone);
client.setAddess(addess);
client.setEmail(email);
client.setHobby(hobby);
if(clieatDAO.UpdateClient(client)){
/*
* 添加相应的日志
*/
//////////////////////////////////////////////////////////////
olpe.setOperResultId(client.getClientNo()); //
olpe.setOperTableName("CLIENT"); //
olpe.setOperType("修改客户帐号信息"); //
OperLogInterface pif=new OperareLogJB(); //
pif.addOperareLog(olpe); //
//////////////////////////////////////////////////////////////
return true;
}else{
return false;
}
}
else
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -