财务报表管理财务报销管理财务报销管理Word下载.docx
《财务报表管理财务报销管理财务报销管理Word下载.docx》由会员分享,可在线阅读,更多相关《财务报表管理财务报销管理财务报销管理Word下载.docx(61页珍藏版)》请在冰豆网上搜索。
![财务报表管理财务报销管理财务报销管理Word下载.docx](https://file1.bdocx.com/fileroot1/2023-2/2/7f545fab-b779-4aa8-b35e-0a1350abb8f5/7f545fab-b779-4aa8-b35e-0a1350abb8f51.gif)
查询结果应该能导出Excel
3、开发技术参数
数据库采用Oracle;
系统架构采用Struts+Spring+Hibernate;
涉及开发环境和工具:
JDK1.5、Eclipse(MyEclipse)、Resin3.0.19(Tomcat5.5以上亦可)、Dreamweaver、Oracle数据库及客户端;
二、系统功能设计
1、用户维护
只有财务主管才有用户维护的功能。
2、账号维护
新加账号页面
账号:
_____________账号名称:
__________
账号负责人:
_______账号状态:
__________(select)
备注:
_______________________________________________
保存按钮
说明:
账号状态是指:
正常、关闭两种状态
3、报销处理方式维护
新加处理方式页面
处理方式:
保存的时候,要检测该处理方式是否已经存在,如果已经存在,需要返回本页并给出提示;
4、费用类型维护
5、账号授权
Banner(财务主管)---账号授权
报销维护账号授权账号维护处理方式维护费用类型维护用户维护退出
新加账号授权按钮修改删除
账号_______授权人______查询按钮
选择序号账号授权人
Checkbox11000010001张华
Checkbox21000010002李磊
1、选中某条记录,可以进行修改,每次只能修改一条记录;
2、删除可以批量进行,可以选中多条记录进行删除;
3、点新加按钮后,跳转到下页的新账号授权界面;
4、点下查询按钮后,本页显示查询结果;
6、报销维护页
新加报销记录页
________(select)金额:
____________
摘要:
________
费用类型:
______(select)处理方式:
________(select)
报销时间:
____________经办人:
_____________
1、存盘的时候,自动保存当前用户为录入人;
2、金额框,只能输入数值型;
三、数据库设计
1、报销明细表
2、用户表
3、费用类型
4、账号
四、运行结果实例
用户登录
报销记录列表
账号授权
结果导出Excel
删除之前必须进行询问与确认
账号维护
用户管理
报销处理方式的维护
费用类型维护
五、重点代码剖析
Struts-config.xml
<
?
xmlversion="
1.0"
encoding="
UTF-8"
>
!
DOCTYPEstruts-configPUBLIC"
-//ApacheSoftwareFoundation//DTDStrutsConfiguration1.2//EN"
"
http:
//struts.apache.org/dtds/struts-config_1_2.dtd"
struts-config>
<
data-sources/>
form-beans>
form-beanname="
loginForm"
type="
cn.edu.thcic.demo.form.LoginForm"
/>
zhForm"
cn.edu.thcic.demo.form.ZhForm"
bxListForm"
cn.edu.thcic.demo.form.BxListForm"
fylxForm"
cn.edu.thcic.demo.form.FylxForm"
clfsForm"
cn.edu.thcic.demo.form.ClfsForm"
zhsqForm"
cn.edu.thcic.demo.form.ZhsqForm"
bxmxForm"
cn.edu.thcic.demo.form.BxmxForm"
cwUserForm"
cn.edu.thcic.demo.form.CwUserForm"
testForm"
cn.edu.thcic.demo.form.TestForm"
/form-beans>
global-exceptions/>
global-forwards/>
action-mappings>
action
attribute="
input="
/login.jsp"
name="
path="
/login"
scope="
request"
cn.edu.thcic.demo.action.LoginAction"
forwardname="
loginSuccess"
/bxmx.do?
method=list"
loginError"
/error.jsp"
/action>
/bxmxList.jsp"
parameter="
method"
/bxmx"
cn.edu.thcic.demo.action.BxmxAction"
success"
/zh"
cn.edu.thcic.demo.action.ZhAction"
/zh.jsp"
/fylxAdd.jsp"
/fylx"
cn.edu.thcic.demo.action.FylxAction"
/fylx.jsp"
/clfsadd.jsp"
/clfs"
cn.edu.thcic.demo.action.ClfsAction"
/clfs.jsp"
/zhsq.jsp"
/zhsq"
cn.edu.thcic.demo.action.ZhsqAction"
/cwUserAdd.jsp"
/cwUser"
cn.edu.thcic.demo.action.CwUserAction"
>
/user.jsp"
/action-mappings>
message-resourcesparameter="
cn.edu.thcic.demo.ApplicationResources"
/struts-config>
Web.xml
web-app>
--设置请求编码过滤器-->
filter>
<
filter-name>
EncodeFilter<
/filter-name>
filter-class>
cn.edu.thcic.demo.util.ReqEncodeFilter<
/filter-class>
init-param>
<
--设置请求编码类型-->
param-name>
RequestEncode<
/param-name>
param-value>
GBK<
/param-value>
/init-param>
/filter>
--请求编码过滤器与网址映射-->
filter-mapping>
url-pattern>
*.do<
/url-pattern>
/filter-mapping>
servlet>
servlet-name>
action<
/servlet-name>
servlet-class>
org.apache.struts.action.ActionServlet<
/servlet-class>
config<
/WEB-INF/struts-config.xml<
debug<
3<
detail<
load-on-startup>
0<
/load-on-startup>
/servlet>
servlet-mapping>
/servlet-mapping>
welcome-file-list>
welcome-file>
index.jsp<
/welcome-file>
/welcome-file-list>
/web-app>
//报销明细的Action
packagecn.edu.thcic.demo.action;
importjavax.servlet.http.HttpServletRequest;
importjavax.servlet.http.HttpServletResponse;
importorg.apache.struts.action.ActionForm;
importorg.apache.struts.action.ActionForward;
importorg.apache.struts.action.ActionMapping;
importorg.apache.struts.actions.DispatchAction;
importcn.edu.thcic.demo.bo.BxmxService;
importcn.edu.thcic.demo.bo.ClfsService;
importcn.edu.thcic.demo.bo.FylxService;
importcn.edu.thcic.demo.bo.ZhsqService;
importcn.edu.thcic.demo.form.BxmxForm;
importcn.edu.thcic.demo.vo.Bxmx;
importcn.edu.thcic.demo.vo.CwUser;
publicclassBxmxActionextendsDispatchAction{
//报销明细的列表
publicActionForwardlist(ActionMappingmapping,ActionFormform,
HttpServletRequestrequest,HttpServletResponseresponse){
getListData(request);
returnmapping.findForward("
);
}
//获得列表需要显示的数据
privatevoidgetListData(HttpServletRequestrequest){
BxmxServicebxmxService=newBxmxService();
ZhsqServicezhsqService=newZhsqService();
FylxServicefylxService=newFylxService();
ClfsServiceclfsService=newClfsService();
CwUseruser=(CwUser)request.getSession().getAttribute("
user"
//找到当前用户有权限看到的所有报销记录
request.setAttribute("
bxmxList"
bxmxService.getUserBxmx(user));
//找到当前用户被授权的全部账号
zhList"
zhsqService.getUserZhList(user));
//费用类型列表
fylxList"
fylxService.getAllFylxList());
//处理方式列表
clfsList"
clfsService.getAllClfsList());
//新加报销明细
publicActionForwardsaveOrUpdate(ActionMappingmapping,ActionFormform,
BxmxFormbxmxForm=(BxmxForm)form;
//把form里的属性赋值给mx实体
Bxmxmx=newBxmx();
if(bxmxForm.getId()!
=null&
&
bxmxForm.getId().trim()!
="
"
&
bxmxForm.getId().length()>
0){
mx.setId(Long.parseLong(bxmxForm.getId()));
}
mx.setFylx(bxmxForm.getFylx());
mx.setJe(Double.parseDouble(bxmxForm.getJe()));
mx.setBxsj(bxmxForm.getBxsj());
mx.setClfs(bxmxForm.getClfs());
mx.setBz(bxmxForm.getBz());
mx.setJbr(bxmxForm.getJbr());
mx.setJlr(((CwUser)request.getSession().getAttribute("
)).getUsername());
mx.setZh(bxmxForm.getZh());
mx.setZy(bxmxForm.getZy());
newBxmxService().saveOrUpdateClfs(mx);
//做好返回数据准备
this.getListData(request);
bxmxForm.reset(mapping,request);
//删除报销明细
publicActionForwarddelete(ActionMappingmapping,ActionFormform,
Stringid=request.getParameter("
id"
Bxmxmx=bxmxService.getBxmxById(id);
bxmxService.delBxmx(mx);
/**
*编辑某条记录
**/
publicActionForwardtoEdit(ActionMappingmapping,ActionFormform,
HttpServletRequestrequest,HttpServletResponseresponse){
bxmxForm.setBxsj(mx.getBxsj());
bxmxForm.setBz(mx.getBz());
bxmxForm.setClfs(mx.getClfs());
bxmxForm.setFylx(mx.getFylx());
bxmxForm.setId(String.valueOf(mx.getId()));
bxmxForm.setJbr(mx.getJbr());
bxmxForm.setJe(String.valueOf(mx.getJe()));
bxmxForm.setJlr(mx.getJlr());
bxmxForm.setZy(mx.getZy());
bxmxForm.setZh(mx.getZh());
}
importor