




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、郑州轻工业学院暑期实习报告设计题目清扬员工管理系统专业、班级:计算机科学与技术 10-1姓名、学号:指导教师:钱慎一、闫红岩、朱颢东、郑远攀2013年7月6日-2013年7月17日目录1. 需求分析 21.1. 系统分析说明: 21.1.1. 主要功能: 21.1.2. 开发方法 21.1.3. 员工信息管理需求 21.2 市场需求分析 31.2.1. 用户需求 31.2.2. 市场需求 31.2.3. 项目成本 31.3. 系统可行性分析: 31.3.1. 技术及资源可行性: 31.3.2. 社会可行性: 41.4. 非功能性需求 41.4.1. 性能需求 41.4.2. 安全性需求 41.
2、4.3. 可用性需求 42. 数据库 53. 流程图 73.1. 总体框架模块 73.2. 学员管理 74 功能界面 84.1.登陆界面 84.2. 登录系统后 84.3. 学员管理 94.4. 教师管理 94.5. 班级信息列表 104.6. 用户信息列表 104.7. 删除信息 114.8. 修改操作 114.9. 添加信息 124.10. 信息的录入 125. 代码 135.1.连接池 135.2. 实体定义 145.3. 数据操作 156. 项目分工 377. 心得总结 381. 需求分析1.1. 系统分析说明:1.1.1. 主要功能:a. 学员管理;b. 班级管理;c. 试听管理;d
3、. 教师管理e. 就业管理f. 考勤管理g. 用户管理 基本可涵盖现阶段小型公司所需所有业务流程的管理。1.1.2. 开发方法系统采用面向对象的程序开发方法, 同时按照模块化的编程思想编写, 将系 统各个功能划分为各个子模块。1.1.3. 员工信息管理需求支持多条件查询 ; 修改、添加、查询、删除数据方便简单,数据稳定性好。 本系统可以对员工基本信息进行添加,修改,删除,查询操作,还可以对员工的 调动信息进行添加,删除,修改,查询等操作。 真正实现了员工信息管理的自 动化和信息化。1.2 市场需求分析1.2.1. 用户需求当前市场可提供的信息管理系统虽然涵盖了大部分的公司业务管理功能, 但 是
4、,无法满足特定用户的指定功能。本系统,可以随用户的定义,自定义该系统 的功能模块, 并且,能够对不同层次的用户给予不同的系统。 满足了公司自定义 需求及公司的信息的安全性。1.2.2. 市场需求当前市场上存在的信息系统,大多系统功能复杂,不易操作,同时,难以维 护,对于对于系统的培训时间较长。而本系统,结构简单,易于操作,并且,直 观明了。对于本系统的操作培训需要时间短, 便于公司将该系统转化为生产力。1.2.3. 项目成本对于市场上现存的信息管理系统, 大多定价高昂。 对于才开始进行运作的小 公司来说,成本较高。而本系统由于成本较低,能够获得大量的用户。1.3. 系统可行性分析:1.3.1.
5、 技术及资源可行性:该系统所需硬件设备,如 PC机、打印机及网络配件等,市场上有销售且价 格较低,能满足系统功能要求。软件上,操作系统采用WindowsXF及以上,数据库管理系统采用Mysql,这些软件在 MIS开发中已被大量应用,技术上都比 较成熟。因此技术上是可行的。1.3.2. 社会可行性:随着信息化的进程, 很多企业使用电子设备协助公司管理, 从而产生了大量 的数据,使得在公司中使用信息辅助公司管理成了一个趋势。 在人力成本飞升的 今天,公司也乐于使用管理系统软件来减去不必要的人力成本。该在软件维护及操作人员培训方面由开发方负责, 企业只需要操作即可。 公 司所需成本低。1.4. 非功
6、能性需求1.4.1. 性能需求客户端一般响应时间(除数据导入)不超过 1 秒。1.4.2. 安全性需求权限控制 本系统角色只有一个(管理员) , 拥有所有权限。1.4.3. 可用性需求a. 方便操作,操作流程合理 尽量从用户角度出发,以方便使用本产品。b. 支持没有计算机使用经验、 计算机使用经验较少及有较多计算机使用经验 的用户均能方便地使用本系统。c. 容错能力 系统具有一定的容错和抗干扰能力, 在非硬件故障或非通讯故 障时,系统能够保证正常运行, 并有足够的提示信息帮助用户有效正确地完成任 务。2. 数据库attendance tab 表名称类型长度小数点允许为空主键atte ndan
7、ce Idint110Vatte ndan ce Stude ntldint110Vatte ndan ce Datevarchar100Vatte ndance_Mornin gArriveTimevarchar80Vatte ndance Mornin gLeaveTimevarchar80Vatte ndan ce After noon ArriveTimevarchar80Vatte ndan ce After noon LeaveTimevarchar80Vclass tab 表名称类型长度小数点允许为空主键classdvarchar40Vclass Stude ntNumberin
8、t110Vclass Teachervarchar200Vclass Headervarchar200Vclass Coursevarchar200Vclass StartTimedatetime00Vclass E ndTimedatetime00Vemploy tab 表名称类型长度小数点允许为空主键employ Stuvarchar100Vemploy Timevarchar200Vemploy Addvarchar200Vemploy Da nwvarchar200Vemploy Xi nsdouble102Vemploy Zhiwvarchar200Vemploy Qkvarchar
9、200Vstudent tab 表名称类型长度小数点允许为空主键stude nt_ldint110Vstude nt_Namevarchar200Vstude nt Sexvarchar10Vstude nt Ageint110Vstude nt Classvarchar40Vstude nt Ph on eNumbervarchar110Vstude nt Addressvarchar500Vteacher tab 表名称类型长度小数点允许为空主键stude nt ldint110Vstude nt Namevarchar200Vstude nt Sexvarchar10Vstude nt
10、Classvarchar40Vteacher Coursevarchar100Vstude nt Ph on eNumbervarchar110Vstude nt Addressvarchar500Vtryleston tab 表名称类型长度小数点允许为空主键trylestondint100Vtrylest on Namevarchar200Vtrylest on Jiesrvarchar200Vtrylest on Pho nevarchar200Vtrylest on丄Beginvarchar200Vtrylest on Endvarchar200Vtrylest on Xgvarchar
11、100Vuser tab 表名称类型长度小数点允许为空主键user Idint110Vuser Namevarchar200Vuser Passvarchar200Vuser Statevarchar200V3.流程图3.1.总体框架模块员工管理系统32学员管理学员管理4功能界面4.1.登陆界面dear soft员工管理察统42登录系统后43学员管理清杨斑工誉理菟统T T Jr9 J-3:旳 巳出些.畀1;1“斡耳|$莊空 n-A 缸*fk3丰鹫FEZBO女 男HFM1S3):O:(plhff-jr 二hrafishzuIff pft旳:听00吒?22EMI1333W:u:(l.-Eg xhe
12、ixzhu-Eng*ELEW閱帧CXItcFssrijjririu詡穴歸血3咗血审JQHElrC卑W EMS皿迪胡強ZCfiE. UCTTU5ba.314.4. 教师管理rH*v* HfPlft.tHH-IPimur* ItjHTV* 1MVb fllFfl1”匸丄.确用尸1141扎手n号亟班住n!pa i t13eU:4JteMfi ihffiSdMuiima:*-MhVi 4HMA4BmEldfSScwi-Jhm& LwrheBBCSfg価:宦E3电JlCEiA:i L!UDSEqfl昕豊列喪山圣鼻 卫1叨-IE 15 T1 JI f _4.5.班级信息列表46用户信息列表4.7. 删除信
13、息丰够号性别Tift擁cm2013CW1zhaos眦】曲帰0询血Pxner. dxrzzhoradnrIB戦201X)70002fhajojn却E0C11 闘丸 OOflQOOhmar zhErgztoi樂鏗:Q13C7:(XMdint眦】lMSUWOOlkoiff. zhndiHJi a* 血4m孚戏JiwHoreliIM8血禅 luoyang20130?0011tkw1厨MU伽ho何删除之石桂flfi:備阪曩址庄筑:朝W0Lshoe叵B1loncoohenaa zlm第dncu $!汕赛IM:O13O7DOft2zhao22MCI13*000000hmai zhrrizhuL;IM膛2O1
14、30?KID4ding另ZL5XLlWQCOlhnaa zh申sixu ;薛zkg典堪4.8. 修改操作糊期Wffl Lwm 3Lac taizhan少U-CT-0fiMUM-H1创11Jm2B13-i6MMHS*asdcngiowtojid迦匕呦啪和3划即Ml:5din删地dinglint剜奶W2OJ3-Of-1TiUK班辍欄:呷班驶心用i布玫玫珂H cjLn52013-W-Wzht蹲gi pctinuxbcAEziuqin)njMri血01 pzoicu4.10 信息的录入諏诲容:教师性别:言男O女 所帝班蜒:匚二Zzanciocop讣盘EEK迥P :册 EZSQEc5XZjlE-ILEZ
15、tlDJ Z ICXJJlIU5. 代码5.1. 连接池package com.db;import java.sql.Connection;import java.sql.SQLException;import mons.dbcp.BasicDataSource;public class DBConn static BasicDataSource basic;staticbasic=new BasicDataSource(); basic.setDriverClassName(com.mysql.jdbc.Driver); basic.setUrl(jdbc:mysql:/localhost:
16、3306/sms_sys); basic.setUsername(root);basic.setPassword(123456);basic.setMaxActive(30); basic.setInitialSize(10);basic.setMinIdle(5); basic.setMaxWait(3000);public static Connection getConn()Connection conn = null;try conn = basic.getConnection(); catch (SQLException e) e.printStackTrace();return c
17、onn;public static void closeConn(Connection conn)try conn.close(); catch (SQLException e) e.printStackTrace();5.2. 实体定义对实体定义相关代码举例如下 : package com.bean;public class Student private int studentID;private String studentName; private String studentSex; private int studentAge;private String studentClass
18、; private String studentPhoneNumber; private String studentAddress; public int getStudentID() return studentID;public void setStudentID(int studentID) this.studentID = studentID;public String getStudentName() return studentName;public void setStudentName(String studentName) this.studentName = studen
19、tName;public String getStudentSex() return studentSex;public void setStudentSex(String studentSex) this.studentSex = studentSex;public int getStudentAge() return studentAge;public void setStudentAge(int studentAge) this.studentAge = studentAge;public String getStudentClass() return studentClass;publ
20、ic void setStudentClass(String studentClass) this.studentClass = studentClass;public String getStudentPhoneNumber() return studentPhoneNumber;public void setStudentPhoneNumber(String studentPhoneNumber) this.studentPhoneNumber = studentPhoneNumber;public String getStudentAddress() return studentAddr
21、ess;public void setStudentAddress(String studentAddress) this.studentAddress = studentAddress;5.3. 数据操作对数据的操作相关代码举例如下 package com.db.dao;import java.sql.Connection;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.util.ArrayList;import java.util.Lis
22、t;import com.bean.Attendance;import com.bean.Classes;import com.bean.Employ;import com.bean.Student;import com.bean.Teacher;import com.bean.Tryleston;import com.bean.User;import com.db.DBConn;public class DBDao / 登陆判断public boolean checkLogin(String name,String pass)Connection conn = DBConn.getConn(
23、);try wherePreparedStatement ps=conn.prepareStatement(select * from user_ user_Name=? and user_Pass=?);ps.setString(1,name);ps.setString(2,pass);ResultSet rs = ps.executeQuery();if(rs.next()DBConn.closeConn(conn);return true;elseDBConn.closeConn(conn);return false; catch (SQLException e) e.printStac
24、kTrace();return false;/ 用户信息处理/ 查询全部用户信息public List SelectAllUser()List listUser = new ArrayList();Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(select * from user_tab);ResultSet rs=ps.executeQuery();while(rs.next()User user =new User();user.setUserID(rs.getInt(u
25、ser_Id); user.setUserName(rs.getString(user_Name); user.setUserPass(rs.getString(user_Pass); user.setUserState(rs.getString(user_State);listUser.add(user);DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();return listUser;/ 添加用户信息public void InsertUser(User user)Connection conn = DBC
26、onn.getConn();try PreparedStatement ps= conn.prepareStatement(insert into user_tab(user_Name,user_Pass,user_State) values(?,?,?);ps.setString(1, user.getUserName();ps.setString(2, user.getUserPass();ps.setString(3, user.getUserState();ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e)
27、 e.printStackTrace();/ 删除用户信息public void DeleteUser(int id)Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(delete from user_tab where user_Id=?);ps.setInt(1, id);ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 查询某一用户信息public
28、User FindUser(int id)Connection conn = DBConn.getConn();User user =new User();try PreparedStatement ps= conn.prepareStatement(select * from user_tab whereuser_Id=?); ps.setInt(1,id);ResultSet rs=ps.executeQuery();while(rs.next()user.setUserID(rs.getInt(user_Id);user.setUserName(rs.getString(user_Nam
29、e);user.setUserPass(rs.getString(user_Pass);user.setUserState(rs.getString(user_State);DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();return user;/ 修改用户信息public void UpdateUser(User user)Connection conn = DBConn.getConn();try setPreparedStatement ps= conn.prepareStatement(update
30、user_tab user_Name=?,user_Pass=?,user_State=? where user_Id=?);ps.setString(1, user.getUserName();ps.setString(2, user.getUserPass();ps.setString(3, user.getUserState();ps.setInt(4, user.getUserID();ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 学员信息处理/ 查询全部学
31、员信息public List SelectAllStudent()List listStudent = new ArrayList();Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(select * from student_tab);ResultSet rs=ps.executeQuery();while(rs.next()Student student =new Student(); student.setStudentID(rs.getInt(student_Id);
32、student.setStudentName(rs.getString(student_Name); student.setStudentSex(rs.getString(student_Sex); student.setStudentAge(rs.getInt(student_Age); student.setStudentClass(rs.getString(student_Class); student.setStudentPhoneNumber(rs.getString(student_PhoneNumber); student.setStudentAddress(rs.getStri
33、ng(student_Address);listStudent.add(student);DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();return listStudent;/ 添加学员信息public void InsertStudent(Student student)Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(insert into student_tab(student_Name
34、,student_Sex,student_Age,student_Class,student_PhoneNumber,stud ent_Address) values(?,?,?,?,?,?);ps.setString(1, student.getStudentName();ps.setString(2, student.getStudentSex();ps.setInt(3, student.getStudentAge();ps.setString(4, student.getStudentClass();ps.setString(5, student.getStudentPhoneNumb
35、er();ps.setString(6, student.getStudentAddress();ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 删除学员信息public void DeleteStudent(int id)Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(delete from student_tab wherestudent_Id=?
36、);ps.setInt(1, id);ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 查找某个学员信息public Student FindStudent(int id)Connection conn = DBConn.getConn();Student student =new Student();try PreparedStatement ps= conn.prepareStatement(select * from student_tab wherestuden
37、t_Id=?);ps.setInt(1,id);ResultSet rs=ps.executeQuery();while(rs.next()student.setStudentID(rs.getInt(student_Id); student.setStudentName(rs.getString(student_Name); student.setStudentSex(rs.getString(student_Sex); student.setStudentAge(rs.getInt(student_Age); student.setStudentClass(rs.getString(stu
38、dent_Class); student.setStudentPhoneNumber(rs.getString(student_PhoneNumber); student.setStudentAddress(rs.getString(student_Address);DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();return student;/ 修改学员信息public void UpdateStudent(Student student)Connection conn = DBConn.getConn()
39、;try PreparedStatement ps= conn.prepareStatement(update student_tab set student_Name=?,student_Sex=?,student_Age=?,student_Class=?,student_PhoneNumber=?,stud ent_Address=? where student_ID=?);ps.setString(1, student.getStudentName();ps.setString(2, student.getStudentSex();ps.setInt(3, student.getStu
40、dentAge();ps.setString(4, student.getStudentClass();ps.setString(5, student.getStudentPhoneNumber();ps.setString(6, student.getStudentAddress();ps.setInt(7, student.getStudentID();ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 学员信息处理/ 查询全部学员信息public List Sele
41、ctAllStudent()List listStudent = new ArrayList();Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(select * from student_tab);ResultSet rs=ps.executeQuery();while(rs.next()Student student =new Student(); student.setStudentID(rs.getInt(student_Id); student.setStudentN
42、ame(rs.getString(student_Name); student.setStudentSex(rs.getString(student_Sex); student.setStudentAge(rs.getInt(student_Age); student.setStudentClass(rs.getString(student_Class); student.setStudentPhoneNumber(rs.getString(student_PhoneNumber); student.setStudentAddress(rs.getString(student_Address)
43、;listStudent.add(student);DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();return listStudent;/ 添加学员信息public void InsertStudent(Student student)Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(insert into student_tab(student_Name,student_Sex,studen
44、t_Age,student_Class,student_PhoneNumber,stud ent_Address) values(?,?,?,?,?,?);ps.setString(1, student.getStudentName();ps.setString(2, student.getStudentSex();ps.setInt(3, student.getStudentAge();ps.setString(4, student.getStudentClass();ps.setString(5, student.getStudentPhoneNumber();ps.setString(6
45、, student.getStudentAddress();ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 删除学员信息public void DeleteStudent(int id)Connection conn = DBConn.getConn();try PreparedStatement ps= conn.prepareStatement(delete from student_tab where student_Id=?);ps.setInt(1, id)
46、;ps.executeUpdate();DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();/ 查找某个学员信息public Student FindStudent(int id)Connection conn = DBConn.getConn();Student student =new Student();try PreparedStatement ps= conn.prepareStatement(select * from student_tab wherestudent_Id=?); ps.setInt
47、(1,id);ResultSet rs=ps.executeQuery();while(rs.next()student.setStudentID(rs.getInt(student_Id); student.setStudentName(rs.getString(student_Name); student.setStudentSex(rs.getString(student_Sex); student.setStudentAge(rs.getInt(student_Age); student.setStudentClass(rs.getString(student_Class); stud
48、ent.setStudentPhoneNumber(rs.getString(student_PhoneNumber); student.setStudentAddress(rs.getString(student_Address);DBConn.closeConn(conn); catch (SQLException e) e.printStackTrace();return student;/ 修改学员信息public void UpdateStudent(Student student)Connection conn = DBConn.getConn();try PreparedStat
49、ement ps= conn.prepareStatement(update student_tab set student_Name=?,student_Sex=?,student_Age=?,student_Class=?,student_PhoneNumber=?,stud ent_Address=? where student_ID=?);ps.setString(1, student.getStudentName();ps.setString(2, student.getStudentSex();ps.setInt(3, student.getStudentAge();ps.setString(4, student.getStudentClass();ps.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025光伏发电系统采购合同
- 2025混凝土工程施工合同范本
- 2025节能服务合同模板
- 2025高空建筑外墙清洁保养合同
- 2025授权印刷合同范本
- 2025冰箱销售正规合同范本
- 2025存量房屋租赁合同范本
- 2025维修仓库租赁合同范本
- 2025合同意向书合同意向书的法律效力
- 2025办公室装修水电施工合同范本 办公室水电施工合同格式
- GB/T 4008-2024锰硅合金
- 中国肺血栓栓塞诊治与预防指南解读专家讲座
- 2024急性脑梗死溶栓规范诊治指南(附缺血性脑卒中急诊急救专家共识总结归纳表格)
- 《鸿门宴》公开课一等奖创新教学设计 统编版高中语文必修下册
- DZ∕T 0202-2020 矿产地质勘查规范 铝土矿(正式版)
- 二年级三位数加减法竖式计算
- 安全生产投入台账(模板)
- 清华大学领军计划语文试题强基计划
- 医疗欠款欠条范本
- 母亲节健康科普知识
- 《奥尔夫音乐教学法》课程标准
评论
0/150
提交评论