财务报销管理_第1页
财务报销管理_第2页
财务报销管理_第3页
财务报销管理_第4页
财务报销管理_第5页
已阅读5页,还剩76页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Web 应用开发工程师 案例资源库清华大学计算机与信息管理中心 第 页Web 应用开开发工程师案例手册 财务务报销管理系系统一、项目需求分分析 1、项项目背景描述述某学院的财务部部门,现在感感觉到本院的的财务支出管管理有点混乱乱,对于个别别业务部门存存在任意开支支的现象,所所以希望通过过网上统一登登记报销细目目的形式,财财务主管和院院领导可以随随时掌握学院院的经费支出出情况。学院的财务形式式描述如下:每年学院的的国家拨款及及各类收入都都按照各个业务部门的预预算,划成分分类的账号,所所有的支出都都按照其所发生的业业务性质所属账号号进行报销。各各个账号有相相应的负责人人和出纳,有有的负责人会会有多

2、个账号号的支配权限限,有的出纳纳可以操作多多个账号,只只要业务相关关即可,这些些都是由财务务主管来分配配。用户已经提供原原始表格,一一期任务把该该表格实现网网上填报即可可。财务主管管可以看到全全院所有的报报销信息,财财务助理只能能看到自己录录入的信息。 所有的记记录应可以导导出Exceel表格。2、需求概要分分析(1)、用户和和角色权限部部分:财务主主管维护系统统用户,并为为用户指定角角色,用户的的初始化密码码和证件号相相同,各用户户自己登陆后后可修改密码码。角色分为三类:、出纳:可以对对自己被授权权的账号进行行报销记录的的维护;、账号负责人:可以对自己己被授权的账账号进行查询询,不能做新增增

3、、修改、删除等操作作;、财务主管:可可以查询、维维护全院所有有账号的报销销记录;(2)、报销记记录维护:填写报销记录时时,需要记录录摘要、费用类类型、经办人人、所属账号号、记录人、记记录时间、处处理方式等信信息。参考用用户提供的原原始表格。为规范填写,费费用记录、处处理方式都做做标准化处理理,财务主管管维护代码表表后,出纳录录入时选择录录入。为避免账号填写写错误,出纳纳录入时,账账号信息也是是选择方式录录入,每个出出纳只能列出出自己被授权权的账号。(3)、报销记记录查询根据账号、费用用类型、金额额范围 等字字段进行查询询。出纳和账账号负责人只只能查询到自自己被授权的的账号的报销销记录。财务务主

4、管可以看看到所有账号号的报销记录录。查询结果最下方方,需要对金金额字段做汇汇总。查询结果应该能能导出Exccel3、开发技术参参数数据库采用Orracle;系统架构采用SStrutss + Sppring + HHibernnate ;涉及开发环境和和工具:JDDK1.5、EEclipsse(MyEEclipsse)、Reesin3.0.19(TTomcatt5.5以上上亦可)、DDreamwweaverr、Oraccle数据库库及客户端;二、系统功能设设计1、用户维护 只有财务务主管才有用用户维护的功功能。新加用户按钮 修改用户 删除用户 选择 序号 用户名 角色 C新加用户按钮 修改用户

5、删除用户 选择 序号 用户名 角色 Checkbox 1 2001230001 出纳Checkbox 2 2001580610 账号负责人Checkbox 3 说明:1、选中某条记录,可以进行修改,每次只能修改一条记录; 2、删除可以批量进行,可以选中多条记录进行删除;3、点新加用户按钮后,跳转到下页的新加用户界面;报销维护 账号授权 账号维护 处理方式维护 费用类型维护 用户维护 退出Banner(财务主管) 用户维护新加用户页面新加用户页面用户登陆名:_ 用户姓名:_角色: _(select) 保存按钮说明:1、角色的下拉选项有 出纳、账号负责人 两类;2、保存用户时,应检测该用户名是否已

6、经存在,如果存在,则返回本页面并给出相应提示;3、用户名应当是用户证件号;2、账号维护新加账号页面新加账号页面账号:_ 账号名称:_账号负责人:_ 账号状态:_(select)备注:_保存按钮说明:账号状态是指:正常 、关闭两种状态Banner(财务主管)账号维护Banner(财务主管)账号维护报销维护 账号授权 账号维护 处理方式维护 费用类型维护 用户维护 退出新加账号按钮 修改账号 删除账号 选择 序号 账号 账号名称 账号负责人 账号状态 备注 Checkbox 1 1000010001 日常办公账号 张华 正常 Checkbox 2 3000020005 学生活动经费 李军 正常Ch

7、eckbox 3 说明:1、选中某条记录,可以进行修改,每次只能修改一条记录; 2、删除可以批量进行,可以选中多条记录进行删除;3、点新加用户按钮后,跳转到上页的新加账号界面;3、报销处理方方式维护Banner(财务主管)Banner(财务主管)报销处理方式维护报销维护 账号授权 账号维护 处理方式维护 费用类型维护 用户维护 退出新加处理方式按钮 修改 删除 选择 序号 处理方式 Checkbox 1 已领现金Checkbox 2 已领支票Checkbox 3 说明:1、选中某条记录,可以进行修改,每次只能修改一条记录; 2、删除可以批量进行,可以选中多条记录进行删除;3、点新加处理方式按钮

8、后,跳转到下页的新加处理方式界面;新加处理方式新加处理方式页面处理方式:_保存按钮说明:保存的时候,要检测该处理方式是否已经存在,如果已经存在,需要返回本页并给出提示; 4、费用类型维维护Banner(财务主管)费用类型维护Banner(财务主管)费用类型维护报销维护 账号授权 账号维护 处理方式维护 费用类型维护 用户维护 退出新加费用类型按钮 修改 删除 选择 序号 费用代码 费用类型 费用说明Checkbox 1 01 办公费 Checkbox 2 02 邮电费 Checkbox 3 说明:1、选中某条记录,可以进行修改,每次只能修改一条记录; 2、删除可以批量进行,可以选中多条记录进行

9、删除;3、点新加处理方式按钮后,跳转到下页的新加处理方式界面;新加费用类型新加费用类型费用代码:_ 费用类型:_费用说明:_(textarea)保存按钮说明:1、保存的时候,要检测该费用类型是否已经存在,如果已经存在,需要返回本页并给出提示; 2、费用代码、费用类型、费用说明 均为必填项; 5、账号授权报销维护 账号授权报销维护 账号授权 账号维护 处理方式维护 费用类型维护 用户维护 退出Banner(财务主管) 账号授权新加账号授权新加账号授权按钮 修改 删除 账号_ 授权人_查询按钮选择 序号 账号 授权人Checkbox 1 1000010001 张华Checkbox 2 100001

10、0002 李磊说明:1、选中某条记录,可以进行修改,每次只能修改一条记录; 2、删除可以批量进行,可以选中多条记录进行删除;3、点新加按钮后,跳转到下页的新账号授权界面;4、点下查询按钮后,本页显示查询结果;新建账号授权页新建账号授权页账号:_(select) 授权人:_(select) 保存说明:1、账号的下拉框是从账号表中读出; 2、授权人的下拉框是从用户表中读出,显示用户的真实姓名,存盘时存用户的zjh;Banner报销维护首页6、报销维护Banner报销维护首页报销维护报销维护 账号授权 账号维护 处理方式维护 费用类型维护 用户维护 退出新加 修改 删除新加 修改 删除账号:_(se

11、lect) 金额范围_至_ 报销时间_至_ 费用类型:_ (select) 处理方式:_(select) 查询按钮选择 序号 摘要 费用类型 处理方式 金额 经办人 记录人 报销时间 备注 合计: *说明:1、账号是当前用户被授权的所有账号下拉选择;2、费用类型、处理方式 都是下拉列表;3、页面底部是当页的金额合计新加报销记录页新加报销记录页账号:_(select) 金额:_摘要:_费用类型:_(select) 处理方式:_(select)报销时间:_ 经办人:_保存按钮说明:1、存盘的时候,自动保存当前用户为录入人;2、金额框,只能输入数值型;三、数据库设计计1、报销明细表表2、用户表3、费

12、用类型4、账号5、账号授权四、运行结果实实例用户登录报销记录列表账号授权结果导出Exccel删除之前必须进进行询问与确确认账号维护用户管理报销处理方式的的维护费用类型维护五、重点代码剖剖析Struts-confiig.xmll Web.xmllEnncodeFFilterru.thciic.demmo.utiil.ReqqEncoddeFiltterReequesttEncoddeGGBKEnncodeFFilterr*.do actiion orgg.apacche.sttruts.actioon.ActtionSeervlett conffig /WEEB-INFF/struuts-coo

13、nfig.xml debuug 3 detaail 3 00 actiion *.do indeex.jspp /报销明细的的Actioonpackagee cn.eedu.thhcic.ddemo.aactionn;import javaxx.servvlet.hhttp.HHttpSeervlettRequeest;import javaxx.servvlet.hhttp.HHttpSeervlettRespoonse;import org.aapachee.struuts.acction.ActioonFormm;import org.aapachee.struuts.acction.A

14、ctioonForwward;import org.aapachee.struuts.acction.ActioonMappping;import org.aapachee.struuts.acctionss.DisppatchAActionn;import cn.eddu.thccic.deemo.boo.BxmxxServiice;import cn.eddu.thccic.deemo.boo.ClfssServiice;import cn.eddu.thccic.deemo.boo.FylxxServiice;import cn.eddu.thccic.deemo.boo.ZhsqqSe

15、rviice;import cn.eddu.thccic.deemo.foorm.BxxmxForrm;import cn.eddu.thccic.deemo.voo.Bxmxx;import cn.eddu.thccic.deemo.voo.CwUsser;public classs BxmxxActioon exttends DispaatchAcction /报销明细细的列表publicc ActiionForrward list(ActioonMappping mmappinng, AcctionFForm fform,HttppServlletReqquest requeest, H

16、HttpSeervlettRespoonse rresponnse)getLiistDatta(reqquest);returrn maappingg.finddForwaard(ssuccesss); /获获得列表需要要显示的数据据privatte voiid gettListDData(HHttpSeervlettRequeest reequestt) BxmxSServicce bxmmxServvice = new BxmxSServicce();ZhsqSServicce zhssqServvice = new ZhsqSServicce();FylxSServicce fyllxS

17、ervvice = new FylxSServicce();ClfsSServicce clffsServvice = new ClfsSServicce();CwUseer useer = (CwUseer)reqquest.getSeessionn().geetAttrributee(useer);/找到当当前用户有权权限看到的所所有报销记录录requeest.seetAttrributee(bxmmxListt, bxxmxSerrvice.getUsserBxmmx(useer);/找到当当前用户被授授权的全部账账号requeest.seetAttrributee(zhLList, z

18、hsqqServiice.geetUserrZhLisst(useer);/费用类类型列表requeest.seetAttrributee(fyllxListt, fyylxSerrvice.getAlllFylxxList();/处理方方式列表requeest.seetAttrributee(clffsListt, cllfsSerrvice.getAlllClfssList() );/新加报销销明细publicc ActiionForrward saveOOrUpdaate(AcctionMMappinng mappping, ActiionForrm forrm,HttppServlle

19、tReqquest requeest, HHttpSeervlettRespoonse rresponnse)BxmxFForm bbxmxFoorm = (BxmxxForm)form;/把foorm里的属属性赋值给mmx实体Bxmx mx = new BBxmx();if(bxxmxForrm.gettId() != nuull & bxmxxForm.getIdd().trrim() != & bbxmxFoorm.geetId().lenggth()0) mx.seetId(LLong.pparseLLong(bbxmxFoorm.geetId();mx.seetFylxx(bxmxx

20、Form.getFyylx();mx.seetJe(DDoublee.parsseDoubble(bxxmxForrm.gettJe();mx.seetBxsjj(bxmxxForm.getBxxsj();mx.seetClfss(bxmxxForm.getCllfs();mx.seetBz(bbxmxFoorm.geetBz();mx.seetJbr(bxmxFForm.ggetJbrr();mx.seetJlr(CwUUser)rrequesst.gettSessiion().getAtttribuute(uuser).gettUsernname();mx.seetZh(bbxmxFoor

21、m.geetZh();mx.seetZy(bbxmxFoorm.geetZy();new BBxmxSeervicee().saaveOrUUpdateeClfs(mx);/做好返返回数据准备备this.getLiistDatta(reqquest);bxmxFForm.rreset(mappiing, rrequesst);returrn mappping.findFForwarrd(suuccesss);/删除报销销明细publicc ActiionForrward delette(ActtionMaappingg mappping, ActioonFormm formm,HttppSer

22、vlletReqquest requeest, HHttpSeervlettRespoonse rresponnse)BxmxSServicce bxmmxServvice = new BxmxSServicce();Strinng id = reqquest.getPaarametter(iid);Bxmx mx = bxmxSServicce.gettBxmxBById(iid);bxmxSServicce.dellBxmx(mx);this.getLiistDatta(reqquest);returrn mappping.findFForwarrd(suuccesss);/* * 编辑某

23、某条记录 * */publicc ActiionForrward toEdiit(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) BxmxFForm bbxmxFoorm = (BxmxxForm)form;BxmxSServicce bxmmxServvice = new BxmxSServicce();Strinng id = reqquest.getPaarametter(iid);Bxmx mx = bxmx

24、SServicce.gettBxmxBById(iid);bxmxFForm.ssetBxssj(mx.getBxxsj();bxmxFForm.ssetBz(mx.geetBz();bxmxFForm.ssetClffs(mx.getCllfs();bxmxFForm.ssetFyllx(mx.getFyylx();bxmxFForm.ssetId(Strinng.vallueOf(mx.geetId();bxmxFForm.ssetJbrr(mx.ggetJbrr();bxmxFForm.ssetJe(Strinng.vallueOf(mx.geetJe();bxmxFForm.ssetJ

25、lrr(mx.ggetJlrr();bxmxFForm.ssetZy(mx.geetZy();bxmxFForm.ssetZh(mx.geetZh();this.getLiistDatta(reqquest);returrn mappping.findFForwarrd(suuccesss);packagee cn.eedu.thhcic.ddemo.aactionn;import javaxx.servvlet.hhttp.HHttpSeervlettRequeest;import javaxx.servvlet.hhttp.HHttpSeervlettRespoonse;import or

26、g.aapachee.struuts.acction.ActioonFormm;import org.aapachee.struuts.acction.ActioonForwward;import org.aapachee.struuts.acction.ActioonMappping;import org.aapachee.struuts.acctionss.DisppatchAActionn;import cn.eddu.thccic.deemo.boo.ClfssServiice;import cn.eddu.thccic.deemo.foorm.CllfsForrm;import cn

27、.eddu.thccic.deemo.voo.Clfss;public classs ClfssActioon exttends DispaatchAcction publicc ActiionForrward list(ActioonMappping mmappinng, AcctionFForm fform,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) ClfsFForm cclfsFoorm = (ClfssForm) formm;ClfsSServicce clffsServvice = new

28、ClfsSServicce();requeest.seetAttrributee(clffsListt, cllfsSerrvice.getAlllClfssList();returrn mappping.findFForwarrd(suuccesss);publicc ActiionForrward saveOOrUpdaate(AcctionMMappinng mappping, ActiionForrm forrm,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) ClfsFForm cclfsFoor

29、m = (ClfssForm) formm;ClfsSServicce clffsServvice = new ClfsSServicce();Clfs clfs = neww Clfss();clfs.setCllfs(cllfsForrm.gettClfs();if(cllfsForrm.gettId() != nuull & clfssForm.getIdd().trrim() != & cclfsFoorm.geetId().lenggth()0) clfs.setIdd(Longg.parsseLongg(clfssForm.getIdd();clfsSServicce.savveO

30、rUppdateCClfs(cclfs);requeest.seetAttrributee(clffsListt, cllfsSerrvice.getAlllClfssList();clfsFForm.rreset(mappiing, rrequesst);returrn mappping.findFForwarrd(suuccesss);/* * 编辑某某条记录 * */publicc ActiionForrward toEdiit(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requeest, HH

31、ttpSeervlettRespoonse rresponnse) ClfsFForm cclfsFoorm = (ClfssForm) formm;ClfsSServicce clffsServvice = new ClfsSServicce();Strinng id = reqquest.getPaarametter(iid);Clfs clfs = clffsServvice.ggetClffsByIDD(id);clfsFForm.ssetClffs(clffs.gettClfs();clfsFForm.ssetId(Strinng.vallueOf(clfs.getIdd();req

32、ueest.seetAttrributee(clffsListt, cllfsSerrvice.getAlllClfssList();returrn mappping.findFForwarrd(suuccesss);publicc ActiionForrward delette(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) ClfsFForm cclfsFoorm = (ClfssForm) formm;Clfs

33、SServicce clffsServvice = new ClfsSServicce();Strinng id = reqquest.getPaarametter(iid);Clfs clfs = clffsServvice.ggetClffsByIDD(id);clfsSServicce.dellClfs(clfs);requeest.seetAttrributee(clffsListt, cllfsSerrvice.getAlllClfssList();clfsFForm.rreset(mappiing, rrequesst);returrn mappping.findFForwarrd

34、(suuccesss);packagee cn.eedu.thhcic.ddemo.aactionn;import javaxx.servvlet.hhttp.HHttpSeervlettRequeest;import javaxx.servvlet.hhttp.HHttpSeervlettRespoonse;import org.aapachee.struuts.acction.ActioonFormm;import org.aapachee.struuts.acction.ActioonForwward;import org.aapachee.struuts.acction.Actioon

35、Mappping;import org.aapachee.struuts.acctionss.DisppatchAActionn;import cn.eddu.thccic.deemo.boo.UserrServiice;import cn.eddu.thccic.deemo.foorm.CwwUserFForm;import cn.eddu.thccic.deemo.voo.CwUsser;public classs CwUsserActtion eextendds DisspatchhActioon /用户列表表publicc ActiionForrward list(ActioonMap

36、pping mmappinng, AcctionFForm fform,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) CwUseerFormm cwUsserForrm = (CwUseerFormm) forrm;UserSServicce useerServvice = new UserSServicce();requeest.seetAttrributee(useerListt, usserSerrvice.getUsserLisst();returrn mappping.findFForwarrd

37、(suuccesss);/新加用户户publicc ActiionForrward saveOOrUpdaate(AcctionMMappinng mappping, ActiionForrm forrm,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) CwUseerFormm cwUsserForrm = (CwUseerFormm) forrm;UserSServicce useerServvice = new UserSServicce();CwUseer useer = nnew CwwUser()

38、;if(cwwUserFForm.ggetId() != null & cwwUserFForm.ggetId().triim() != & cwwUserFForm.ggetId().lenngth()0)userr.setIId(Lonng.parrseLonng(cwUUserFoorm.geetId();user.setUssernamme(cwUUserFoorm.geetUserrname();user.setReealnamme(cwUUserFoorm.geetReallname();user.setRoole(cwwUserFForm.ggetRolle();userSSer

39、vicce.savveOrUppdate(user);requeest.seetAttrributee(useerListt, usserSerrvice.getUsserLisst();cwUseerFormm.reseet(mappping, requuest);returrn mappping.findFForwarrd(suuccesss);/* * 编辑某某条记录 * */publicc ActiionForrward toEdiit(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requees

40、t, HHttpSeervlettRespoonse rresponnse) CwUseerFormm cwUsserForrm = (CwUseerFormm) forrm;UserSServicce useerServvice = new UserSServicce();Strinng id = reqquest.getPaarametter(iid);CwUseer useer = uuserSeervicee.getUUserByyId(idd);cwUseerFormm.setUUsernaame(usser.geetUserrname();cwUseerFormm.setRReal

41、naame(usser.geetReallname();cwUseerFormm.setRRole(uuser.ggetRolle();requeest.seetAttrributee(useerListt, usserSerrvice.getUsserLisst();returrn mappping.findFForwarrd(suuccesss);/删除用户户publicc ActiionForrward delette(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requeest, HHttpSe

42、ervlettRespoonse rresponnse) CwUseerFormm cwUsserForrm = (CwUseerFormm) forrm;UserSServicce useerServvice = new UserSServicce();Strinng id = reqquest.getPaarametter(iid);CwUseer useer = uuserSeervicee.getUUserByyId(idd);userSServicce.dellUser(user);requeest.seetAttrributee(useerListt, usserSerrvice.

43、getUsserLisst();cwUseerFormm.reseet(mappping, requuest);returrn mappping.findFForwarrd(suuccesss);packagee cn.eedu.thhcic.ddemo.aactionn;import javaxx.servvlet.hhttp.HHttpSeervlettRequeest;import javaxx.servvlet.hhttp.HHttpSeervlettRespoonse;import org.aapachee.struuts.acction.ActioonFormm;import or

44、g.aapachee.struuts.acction.ActioonForwward;import org.aapachee.struuts.acction.ActioonMappping;import org.aapachee.struuts.acctionss.DisppatchAActionn;import cn.eddu.thccic.deemo.boo.FylxxServiice;import cn.eddu.thccic.deemo.foorm.FyylxForrm;import cn.eddu.thccic.deemo.voo.Fylxx;public classs FylxxA

45、ctioon exttends DispaatchAcction publicc ActiionForrward list(ActioonMappping mmappinng, AcctionFForm fform,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) FylxFForm ffylxFoorm = (FylxxForm) formm;getFyylxLisst(reqquest);returrn mappping.findFForwarrd(suuccesss);privatte voiid ge

46、ttFylxLList(HHttpSeervlettRequeest reequestt) /获得所所有费用类型型的列表FylxSServicce fyllxServvice = new FylxSServicce();requeest.seetAttrributee(fyllxListt, fyylxSerrvice.getAlllFylxxList();publicc ActiionForrward saveOOrUpdaate(AcctionMMappinng mappping, ActiionForrm forrm,HttppServlletReqquest requeest, HHt

47、tpSeervlettRespoonse rresponnse) FylxFForm ffylxFoorm = (FylxxForm) formm;Fylx fylx = neww Fylxx();if(fyylxForrm.gettId() != nuull & fylxxForm.getIdd().trrim() != & ffylxFoorm.geetId().lenggth()0)fylxx.setIId(Lonng.parrseLonng(fyllxFormm.getIId();fylx.setFyylx(fyylxForrm.gettFylx();fylx.setFyylxsm(f

48、ylxFForm.ggetFyllxsm();FylxSServicce fyllxServvice = new FylxSServicce();fylxSServicce.savveOrUppdate(fylx);getFyylxLisst(reqquest);returrn mappping.findFForwarrd(suuccesss);publicc ActiionForrward delette(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requeest, HHttpSeervlettRe

49、spoonse rresponnse) FylxFForm ffylxFoorm = (FylxxForm) formm;FylxSServicce fyllxServvice = new FylxSServicce();Strinng id = reqquest.getPaarametter(iid); Fylxx fylxx = fyylxSerrvice.getFyylxByIId(id);fylxSServicce.dellFylx(fylx);getFyylxLisst(reqquest);returrn mappping.findFForwarrd(suuccesss);/* *

50、编辑某某条记录 * */publicc ActiionForrward toEdiit(ActtionMaappingg mappping, ActioonFormm formm,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse) FylxFForm ffylxFoorm = (FylxxForm) formm;FylxSServicce fyllxServvice = new FylxSServicce();Strinng id = reqquest.getPaarametter(iid); Fylxx fy

51、lxx = fyylxSerrvice.getFyylxByIId(id); fylxxForm.setFyylx(fyylx.geetFylxx(); fylxxForm.setFyylxsm(fylx.getFyylxsm(); fylxxForm.setIdd(Striing.vaalueOff(fylxx.getIId(); getFFylxLiist(reequestt);returrn mappping.findFForwarrd(suuccesss);packagee cn.eedu.thhcic.ddemo.aactionn;import javaxx.servvlet.hht

52、tp.HHttpSeervlettRequeest;import javaxx.servvlet.hhttp.HHttpSeervlettRespoonse;import org.aapachee.struuts.acction.Actioon;import org.aapachee.struuts.acction.ActioonFormm;import org.aapachee.struuts.acction.ActioonForwward;import org.aapachee.struuts.acction.ActioonMappping;import cn.eddu.thccic.de

53、emo.boo.UserrServiice;import cn.eddu.thccic.deemo.foorm.LooginFoorm;import cn.eddu.thccic.deemo.voo.CwUsser;public classs LogiinActiion exxtendss Actiion publicc ActiionForrward execuute(AcctionMMappinng mappping, ActiionForrm forrm,HttppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse)

54、 LoginnForm loginnForm = (LooginFoorm) fform;UserSServicce useerServvice = new UserSServicce(); /构造造VO实体CwUseer useer = nnew CwwUser();user.setUssernamme(logginForrm.gettUsernname();user.setPaassworrd(logginForrm.gettPasswword();if(usserSerrvice.isCwUUser(uuser)/如果果是财务报销销系统的用户户,得到完整整的用户对象象,装入seessio

55、nnrequuest.ggetSesssion().settAttriibute(userr, usserSerrvice.getCwwUser(user);retuurn maappingg.finddForwaard(lloginSSuccesss);elseerequuest.ggetSesssion().settAttriibute(erroorMesssage, 登陆用用户名或密码码错误!);retuurn maappingg.finddForwaard(lloginEError);packagee cn.eedu.thhcic.ddemo.aactionn;import javax

56、x.servvlet.hhttp.HHttpSeervlettRequeest;import javaxx.servvlet.hhttp.HHttpSeervlettRespoonse;import org.aapachee.struuts.acction.ActioonFormm;import org.aapachee.struuts.acction.ActioonForwward;import org.aapachee.struuts.acction.ActioonMappping;import org.aapachee.struuts.acctionss.DisppatchAAction

57、n;import cn.eddu.thccic.deemo.boo.ZhSeervicee;import cn.eddu.thccic.deemo.foorm.ZhhForm;import cn.eddu.thccic.deemo.voo.Zh;public classs ZhAcction extennds DiispatcchActiion publicc ActiionForrward list(ActioonMappping mmappinng, AcctionFForm fform,HttppServlletReqquest requeest, HHttpSeervlettRespo

58、onse rresponnse) ZhForrm zhFForm = (ZhFForm) form;ZhSerrvice zhSerrvice = neww ZhSeervicee();requeest.seetAttrributee(zhLList, zhSeervicee.getAAllZhLList();returrn mappping.findFForwarrd(suuccesss);/* * 账号新新加 * */publicc ActiionForrward saveOOrUpdaate(AcctionMMappinng mappping, ActiionForrm forrm,Ht

59、tppServlletReqquest requeest, HHttpSeervlettRespoonse rresponnse)ZhForrm zhFForm = (ZhFForm) form;ZhSerrvice zhSerrvice = neww ZhSeervicee();Zh zhh = neew Zh();zh.seetBz(zzhFormm.getBBz();zh.seetZh(zzhFormm.getZZh();zh.seetZhfzzr(zhFForm.ggetZhffzr();zh.seetZhmcc(zhFoorm.geetZhmcc();zh.seetZhztt(zhF

60、oorm.geetZhztt();if(zhhForm.getIdd() != nulll & zzhFormm.getIId().ttrim() != & zhForrm.gettId().lengtth()00)zh.ssetId(Long.parseeLong(zhForrm.gettId();zhSerrvice.saveOOrUpdaate(zhh);requeest.seetAttrributee(zhLList, zhSeervicee.getAAllZhLList();zhForrm.resset(maappingg, reqquest);returrn mappping.fi

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论