数据库毕业课程设计报告汽车租赁管理系统Word下载.docx

上传人:b****2 文档编号:14896758 上传时间:2022-10-25 格式:DOCX 页数:15 大小:170.18KB
下载 相关 举报
数据库毕业课程设计报告汽车租赁管理系统Word下载.docx_第1页
第1页 / 共15页
数据库毕业课程设计报告汽车租赁管理系统Word下载.docx_第2页
第2页 / 共15页
数据库毕业课程设计报告汽车租赁管理系统Word下载.docx_第3页
第3页 / 共15页
数据库毕业课程设计报告汽车租赁管理系统Word下载.docx_第4页
第4页 / 共15页
数据库毕业课程设计报告汽车租赁管理系统Word下载.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

数据库毕业课程设计报告汽车租赁管理系统Word下载.docx

《数据库毕业课程设计报告汽车租赁管理系统Word下载.docx》由会员分享,可在线阅读,更多相关《数据库毕业课程设计报告汽车租赁管理系统Word下载.docx(15页珍藏版)》请在冰豆网上搜索。

数据库毕业课程设计报告汽车租赁管理系统Word下载.docx

超级管理员还可以对公司内部人员的信息进行管理

客户方面:

只能浏览车辆信息和个人用户信息及个人租赁信息。

数据流图如下:

 

2.概念设计

ER图如下所示:

3.逻辑设计

建表语句如下:

用户表:

后为各字段意义声明

createtableuserinfo

pidvarchar(8)primarykey,用户证件号

usernamevarchar(8),用户名

isvipint,用户类型,是否为会员

xingyuint,信誉度,满分100。

passwordvarchar(8)用户登录密码

);

管理员表:

createtablemanager

widvarchar(8)primarykey,管理员工号

typeint,类型,超级管理员(部门经理等)和普通管理员

usernamevarchar(8),管理员用户名

passwordvarchar(8)管理员密码

车辆表:

createtabletaxi

tidvarchar(8)primarykey,车辆编号

typevarchar(8),车辆类型

statevarchar(8),车辆状态,是否可租

widvarchar(8),

yearint,起租年月日

monthint,

dayint,

timeint,

detailinfotext,车辆详细信息

payint租用单价

租车信息表

createtablerentinfo

ridintidentity(1,1)primarykey,交易编号

widvarchar(8),经手人员

pidvarchar(8),客户证件号

tidvarchar(8),车辆号码

yajinint,押金

backmoneyint,返还金额

payint,单价

brokenvarchar(8),破坏情况

outyearint,结束交易时间

outmonthint,

outdayint,

timeint,实际使用时间

statevarchar(8)交易状态

);

--设置外键

BEGINTRANSACTION

altertabledbo.rentinfoaddconstraintFK_rentinfo_tid

foreignkey(tid)

referencesdbo.taxi([tid])

altertabledbo.rentinfoaddconstraintFK_rentinfo_pid

foreignkey(pid)

referencesdbo.userinfo([pid])

altertabledbo.rentinfoaddconstraintFK_rentinfo_wid

foreignkey(wid)

referencesdbo.manager([wid])

COMMITTRANSACTION

4.数据库建立与备份,恢复

在sqlserver2005建立一个数据库,名称为hello,执行以上建表语句即可。

或者将hello.mdf,.setAttribute("

type"

"

1"

session.setAttribute("

pid"

pid);

username"

username);

response.sendRedirect("

user.jsp"

转向客户页面

}

}else{转向管理员页面,以下与上面if语句类似。

Stringsql="

select*frommanagerwhereusername='

"

+username+"

'

+"

andpassword='

+password

+"

andtype="

+type;

System.out.println(sql);

rs=dm.getResult(sql);

if(rs.next()){

Stringwid=rs.getString("

wid"

t);

wid);

manager.jsp"

}

此外,系统具有良好的安全性,对每个页面都有良好的保护措施,如manashare.jsp,usershar.jsp,通过session验证用户有无权限进入该页面,否则跳转到login.jsp页面,重新登录。

三.程序设计

1.含有表单的jsp页面可以通过设置隐藏域的值来提交到本页面,其程序流程如下:

2.财务管理中有个导出execl报表的功能,其实现如下:

从网上下载一个jxl.jar包,该jar包支持生成execl文件的操作,然后建立一个专门的类,用于生成execl,该类源码如下:

packagemy.pkgs;

importjava.io.*;

importjxl.*;

jxl.jar里面的类库

importjxl.write.*;

importjava.sql.*;

publicclassCreateXLS{

publicStringcreate(ResultSetrs,Stringfilename)

{

try{

Filef=newFile(filename);

booleanexist=f.exists();

WritableWorkbookbook=Workbook.createWorkbook(newFile(filename));

生成名为“第一页”的工作表,参数0表示这是第一页

WritableSheetsheet=book.createSheet("

第一页"

0);

在Label对象的构造子中指名单元格位置是第一列第一行(0,0)

以及单元格内容为test

Labellabel0=newLabel(0,0,"

交易号"

Labellabel1=newLabel(1,0,"

经手人员"

Labellabel2=newLabel(2,0,"

客户证号"

Labellabel3=newLabel(3,0,"

车辆号码"

Labellabel4=newLabel(4,0,"

押金(元)"

Labellabel5=newLabel(5,0,"

返还金额(元)"

Labellabel6=newLabel(6,0,"

破坏情况"

Labellabel7=newLabel(7,0,"

开始时间"

Labellabel8=newLabel(8,0,"

实收金额(元)"

sheet.addCell(label0);

sheet.addCell(label1);

sheet.addCell(label2);

sheet.addCell(label3);

sheet.addCell(label4);

sheet.addCell(label5);

sheet.addCell(label6);

sheet.addCell(label7);

sheet.addCell(label8);

inti=1;

while(rs.next()){

jxl.write.Numberlabel01=newjxl.write.Number(0,i,rs.getInt

(1));

Labellabel11=newLabel(1,i,rs.getString

(2));

Labellabel21=newLabel(2,i,rs.getString(3));

Labellabel31=newLabel(3,i,rs.getString(4));

jxl.write.Numberlabel41=newjxl.write.Number(4,i,rs.getInt(5));

jxl.write.Numberlabel51=newjxl.write.Number(5,i,rs.getInt(6));

Labellabel61=newLabel(6,i,rs.getString(8));

Labellabel71=newLabel(7,i,rs.getInt(9)+"

-"

+rs.getInt(10)+"

+rs.getInt(11));

jxl.write.Numberlabel81=newjxl.write.Number(8,i,rs.getInt(5)

-rs.getInt(6));

sheet.addCell(label01);

sheet.addCell(label11);

sheet.addCell(label21);

sheet.addCell(label31);

sheet.addCell(label41);

sheet.addCell(label51);

sheet.addCell(label61);

sheet.addCell(label71);

sheet.addCell(label81);

i++;

}

book.write();

book.close();

}catch(Exceptione){

e.printStackTrace();

return"

ok"

;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1