大连交通大学2012届本科毕业设计(论文)
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { TechContentForm form = (TechContentForm) actionForm; IdentityBean idBean = this.getIdBean(request); List list = null; String forward = \ list = DBController.getAssetList(idBean.getUserId(), form.getCreateDate(), form.getEndDate(),form.getType()); float total = 0; if (list != null && !list.isEmpty()) { for (int i = 0; i < list.size(); i++) { TechContentForm form2 = (TechContentForm) list.get(i); if (form2.getTypeId().equals(\ total = total - new Float(form2.getFee()); }else{ total = total + new Float(form2.getFee()); } } } form.setTechList(list); form.setTotalFee( String.valueOf(total)); return actionMapping.findForward(\
图5-5 资产管理页面截图
4.5.1资产添加
点击“添加内容”添加资产内容,页面跳转到“enterAddAssetAction.do?path=Y”
选择日期(系统自动弹出日期选择对话框),选择资产变更日期,选择买入(减少资产),卖出(添加资产),输入金额,填写收支原因,点击“添加”提交表格。如果输入值不
26
大连交通大学2012届本科毕业设计(论文)
存在则显示所有资产信息。选择收支条目,进行删除操作。 如图4-5.1所示 关键代码:
public class AddAssetAction extends BaseAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { TechContentForm form = (TechContentForm) actionForm; IdentityBean idBean = this.getIdBean(request); if (StringUtils.isEmpty(form.getNoId())) { DBController.addAsset(Integer.parseInt(idBean.getUserId()),form); } else { DBController.updateAsset(form); }
if (\
return actionMapping.findForward(\ } return actionMapping.findForward(\
图4-5.1 资产添加截图
4.6债券投资管理模块
债券投资列表页面:债券投资主要是对债券的买入金额和收益率的记录,通过买入金额和收益率得出盈利金额。输入日期范围(系统自动弹出日期选择对话框,选择查询债券日期,输入债券代码,债券名称查询债券信息。点击“查询债券”提交表格显示查询信息。输入值不存在则显示所有债券信息。选择资产条目,进行删除操作。如图4-6所示:
关键代码:
27
大连交通大学2012届本科毕业设计(论文)
public class SearchBondAction extends BaseAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { TechContentForm form = (TechContentForm) actionForm; IdentityBean idBean = this.getIdBean(request); List list = null; String forward = \ list = DBController.getBondList(idBean.getUserId(), form.getCreateDate(), form.getEndDate(),form.getCode(),form.getName());
// if (list != null && !list.isEmpty()) { // TechContentForm form2 = (TechContentForm) list.get(list.size() - 1); // form.setTotalFee(form2.getTotalFee()); // form.setTotalRate(form2.getTotalRate()); // } form.setTechList(list); return actionMapping.findForward(\
}
图4-6 债券信息查询截图
4.6.1债券信息添加
点击“投资债券”添加债券。页面跳转到“web/enterAddBondkAction.do?path=Y”
选择日期(系统自动弹出日期选择对话框),选择资产变更日期,输入债券代码(数字),债券名称,买入金额,收益率(单位%),点击“提交”提交表格。点击“后退”取消添加信息。如图4-6.1所示 : 关键代码 :
28
大连交通大学2012届本科毕业设计(论文)
public class AddBondAction extends BaseAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { TechContentForm form = (TechContentForm) actionForm; IdentityBean idBean = this.getIdBean(request); if (StringUtils.isEmpty(form.getNoId())) { DBController.addBound(Integer.parseInt(idBean.getUserId()),form); } else { DBController.updateBond(form); }
if (\
return actionMapping.findForward(\ } return actionMapping.findForward(\
图4-6.1 债券投资列表页面截图
4.7保险投入管理模块
保险投入列表页面:保险投入页面主要是对个人保险买入的记录。输入日期范围(系统自动弹出日期选择对话框)选择查询保险日期,选择保险类型商业保险、社会保险,点击“查询保险”提交表格显示查询信息 。输入值不存在则显示所有保险信息 。选择保险条目,进行删除操作。如图4-7所示: 关键代码:
public class SearchInsAction extends BaseAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { TechContentForm form = (TechContentForm) actionForm;
29
大连交通大学2012届本科毕业设计(论文)
IdentityBean idBean = this.getIdBean(request); List list = null; String forward = \list = DBController.getInsList(idBean.getUserId(), form.getCreateDate(), form.getEndDate(),form.getType()); if (list != null && !list.isEmpty()) { TechContentForm form2 = (TechContentForm) list.get(list.size() - 1); form.setTotalFee(form2.getTotalFee()); form.setTotalRate(form2.getTotalRate()); }
form.setTechList(list);
return actionMapping.findForward(\
图4-7保险信息查询截图
4.7.1保险信息添加
点击“添加保险”添加保险内容,页面跳转到“web/enterAddInsAction.do?path=Y”
选择日期(系统自动弹出日期选择对话框),选择保险投保日期,输入保险名称,保险类型:社会保险、商业保险 。输入金额。点击“提交”提交表格。点击“后退”取消添加信息。如图4-7.1所示: 关键代码 :
public class AddInsAction extends BaseAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { TechContentForm form = (TechContentForm) actionForm; IdentityBean idBean = this.getIdBean(request); if (StringUtils.isEmpty(form.getNoId())) { DBController.addIns(Integer.parseInt(idBean.getUserId()),form); } else { DBController.updateIns(form);
30