📄 existclientaction.java
字号:
/*
* Created on 2006-6-25
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.funddeal.view.action.client;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.sf.hibernate.HibernateException;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.funddeal.model.bean.client.ClieatBean;
import com.funddeal.model.pojo.client.Client;
import com.funddeal.model.pojo.financial_account.FinancialAccount;
import com.funddeal.model.pojo.fund_account.FundAccount;
import com.funddeal.view.actionform.client.ExistClieatForm;
/**
* @author Administrator
*
*/
public class ExistClientAction extends Action {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) throws HibernateException {
ExistClieatForm form=(ExistClieatForm)actionForm;
/*得到客户基本信息*/
String no=form.getClient_no();
String i=form.getFun();
ClieatBean cbn=new ClieatBean();
Client client=(Client)cbn.exist(i,no);
if(client==null){
servletRequest.setAttribute("errorMsg","您所查找的记录不存在!");
return actionMapping.findForward("Failure");
}
HttpSession session = servletRequest.getSession(true);
session.setAttribute("Client",client);
/*得到客户资金帐户编号*/
String kt=client.getClientNo();
String kk="finacc";
List listfin=cbn.existFinancialAcc(kk,kt);
if(listfin!=null){
FinancialAccount fa=(FinancialAccount) listfin.get(0);
session.setAttribute("finacc",fa);
/*得到客户基金账户编号*/
String zt=fa.getAccountNo();
String zk="funacc";
List listfun=cbn.existFinancialAcc(zk,zt);
if(listfun!=null){
FundAccount fac=(FundAccount) listfun.get(0);
session.setAttribute("funacc",fac);
}
}
return actionMapping.findForward("exist");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -