薪酬管理-数据库课程设计职工工资javasqlseverXXXX_第1页
薪酬管理-数据库课程设计职工工资javasqlseverXXXX_第2页
薪酬管理-数据库课程设计职工工资javasqlseverXXXX_第3页
薪酬管理-数据库课程设计职工工资javasqlseverXXXX_第4页
薪酬管理-数据库课程设计职工工资javasqlseverXXXX_第5页
已阅读5页,还剩24页未读 继续免费阅读

下载本文档

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

文档简介

分:课程设计报告工资管理系统--职工考勤管理系统姓名班级学号课程名称 数 据 库 原 理 及 应 用指导教师 乔平安20XX 年6月20日目 录1功能1功能划1功能描述 1性能1数据流图 2数据字典 5数据流的描述 5处逻辑的描述 6数据存储的描述 6总体设计 7数据库概念设计 7功能模块 8详细设计 9数据库逻辑设计 9各模块功能 10职信息10职10职津贴10职考勤10实现 1111主及工资基本信息11登录12系统主13考勤信息录入,修改,删除,查询14设计代码 151、需求分析功能需求功能划分(1)、员工考勤情况表;及时反映员工的出勤,以及缺勤扣款情况、员工津贴表,反映员工的加班时间,加班类别、加班天数、津贴情况等;、员工基本信息表,反映员工的基本信息,反映员工的工种、等级,基本工资等信息;、员工月工资表,计算月工资,生成打印清单。(5)、银行表,用于员工工资的发放。功能描述(1)、员工每个工种基本工资的设定(2根,据加班时间和类型给予不同的加班津贴;(3的每月的月工资;、员工年终奖金的生成,员工的年终奖金计算公式=(员工本年度的工资总和+津贴的总和、企业工资报表。能够查询单个员工的工资情况、每个部门的工资情况、按月的工资统计,并能够打印;、系统维护功能;性能需求此工资管理系统对工资数据精度的计算能在默认情况之下精确到小数点后3,能行根据情况进行小数计算精度的设定,能5性,用户发出求时的的等求系统时间不0.5支持多种操作系统的行环境不同操作文件格式的磁盘的数据能信息的,及共享。移植到其他的系统平台,如:Linux平台下时,同能和。流图工资管理要求及用户需求调查分析得到以下流图职工信息职工信息操作工资信息操作考勤信息库操作津贴管理入基本界1流图添加操作添加操作输入职工基本信息用户修改职工信息修改操作职工表删除职工记录删除操作职工号查询操作1.2载入作作作查询作1.3作用户作作查询作1.4作用户作作作1.5职工职工员进系统进进员工(工资考勤,)表职工表工资表考勤表进行录查作1.6D001与有关来源表去向,部门组成+姓+性别+年龄+部门+进入公司时间+住址D002结构查询时所包含相关来源表去向组成+加班加班+出差+迟到早退+矿+应发+发D003职务部门查询职务部门来源职务部门表去向组成D004变动查询来源变动表去向组成+原职务+原部门+现职务+现部门p001、算输入数据流基本信息根据职职位及其他相应情况算出输出数据流信息p002员信息员信息输入数据流员信息根据员基本信息各种操作输出数据流员信息p003变动员变动情况输入数据流员变动信息可添加、修改和删除等操作输出数据流员变动信息数据存储数据存储F001数据存储员员基本信息数据存储组成员+姓+性别+年龄+部门+入公司时间+住址关键字员相关联数据存储数据存储基本表员信息++++P001F003++++P002,P003计流图,E图来说明模式,如图个人所得税1n医疗保险码m扣除影天数响n1nm类别时间密码影响年终奖金n1n加班奖金其他奖金

2.1E-R图系工津考员统资贴勤工模生管管管块成理理理模模模模块块块块管理管理E-R实。:列名型可否取空备注说明noChar(8)NOTNULLnamer10)NOTNULLgwChar20)NOTNULLglSmallintNOTNULLhmChar(11)NULLmiSmallintNOTNULL登录:noChar(8)NOTNULLJbmoneyNOTNULLylmoneyNULLSwmoneyNULLkcmoneyNULLJtmoneyNULLyzmoneyNOTNULL表noChar(8)NOTNULLtsInt(4)NULL天数lbr30)NULL别SjChar(10)NULL时间四信息表noChar(8)NOTNULLJiabanmoneyNULLnzmoneyNULLqtmoneyNULL能3.2、修改、删除、查询个;本通过用户和密码查询自己的以及修改自己的密码;资根的考勤情况及种表现按生成应信本实现界面截图界面及资基本界面录界面主界面信息录入,修改,删除,查询界面代码Java源程序:importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;importjava.awt.*;importjava.sql.*;importjava.lang.*;importjava.util.*;importjavax.swing.table.*;importjava.math.*;classDB_LSimplementsActionListener{JFrameframe=newJFrame("欢迎进入LS工资管理系统");JLabel label=new JLabel("09 2_54_ 胜",JLabel.CENTER);JButtonbutton1=newJButton(入系统");JButtonbutton2=newJButton("退出系统");ImageIconim=newImageIcon("1.jpg");JLabela1=newJLabel(im);voidCreate(){JPanelpcontentPane=(JPanel)frame.getContentPane();JPanelpcontentPane1=newJPanel();pcontentPane.add(label);pcontentPane.setLayout(newFlowLayout());pcontentPane.add(button1);pcontentPane.add(button2);pcontentPane.add(newLabel(" "));pcontentPane.add(a1);pcontentPane.setBackground(Color.green);pcontentPane.setVisible(true);button1.addActionListener(this);button2.addActionListener(this);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.pack();frame.setBounds(200,100,550,600);frame.setVisible(true);}publicstaticvoidmain(String[]args){DB_LSdome=newDB_LS();dome.Create();}publicvoidactionPerformed(ActionEvente){if(button1.equals(e.getSource())){DLdl=newDL();dl.create();}if(button2.equals(e.getSource())){//System.exit(0);}}}classDLimplementsActionListener{JFrameframe=newJFrame(/");JLabellabel1=newJLabel(");JLabellabel2=newJLabel(");JButtonlogonButton1=newJButton(");JButtonlogonButton2=newJButton("");JButtoncancelButton=newJButton("");JTextFieldt1=newJTextField(0);JTextFieldt2=newJTextField(0);ImageIconim=newImageIcon("2.jpg");JLabela2=newJLabel(im);JTextFieldusername=newJTextField(9);JPasswordFieldpassword=newJPasswordField(9);voidcreate(){JPanelp=(JPanel)frame.getContentPane();JPanelp1=newJPanel();p.setLayout(newFlowLayout());p.add(label1);p.setSize(5,5);p.setLocation(4,8);p.add(username);p.setSize(100,200);p.setLocation(800,800);p.add(label2);p.setSize(50,20);p.setLocation(40,80);p.add(password);p.setSize(100,20);p.setLocation(80,120);p.add(logonButton1);p.add(newJLabel(" "));p.add(logonButton2);p.add(newJLabel(" "));p.add(cancelButton);p.add(newJLabel(" "));p.add(a2);p.add(t1);p.add(t2);p.setBackground(Color.blue);p.setVisible(true);logonButton1.addActionListener(this);logonButton2.addActionListener(this);cancelButton.addActionListener(this);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.pack();frame.setBounds(200,100,750,550);frame.setVisible(true);}publicvoidactionPerformed(ActionEvente){if(logonButton1.equals(e.getSource())&&(username.getText().equals("123")==true)&&(password.getText().equals("123")==true)){GZGLZJMgz=newGZGLZJM();gz.create();}else{JOptionPane.showMessageDialog(null,你输入的密码错误!");};if(logonButton2.equals(e.getSource())&&(username.getText().equals(t1.getText())==true)&&(password.getText().equals(t2.getText())==true)){XKxk=newXK();xk.create();Connectioncon;Statementsql;ResultSetrs;Vectorvector=newVector();try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptione1)System.out.println(""+e1);}trycon{=DriverManager.getConnection("jdbc:odbc:123","","");sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);sql.executeQuery("SELECT Gno,mm FROM Y WHEREGno="+t1.getText()+"ANDmm="+t2.getText());}catch(SQLExceptione1){System.out.println(e1);}}if(cancelButton.equals(e.getSource())){System.exit(0);}}}JButtonb1=newJButton(");JButtonb2=newJButton(");JButtonb3=newJButton(JButtonb1=newJButton(");JButtonb2=newJButton(");JButtonb3=newJButton(");JButtonb4=newJButton(");JButtonb6=newJButton(");JButtonb5=newJButton("返回");ImageIconim=newImageIcon("3.jpg");JLabela3=newJLabel(im);voidcreate(){JPanelp=(JPanel)f.getContentPane();JPanelp1=newJPanel();p.setLayout(newFlowLayout());p.add(b1);p.add(newJLabel(" "));p.add(b6);p.add(newJLabel(" "));p.add(b3);p.add(newJLabel(" "));p.add(b4);p.add(newJLabel(" "));p.add(b2);p.add(newJLabel(" "));p.add(b5);p.add(a3);p.setBackground(Color.red);p.setVisible(true);b1.addActionListener(this);b2.addActionListener(this);b3.addActionListener(this);b4.addActionListener(this);b5.addActionListener(this);b6.addActionListener(this);f.setBounds(200,100,800,600);f.setVisible(true);}publicvoidactionPerformed(ActionEvente){if(b5.equals(e.getSource())){//回DLd=newDL();f.dispose();}if(b1.equals(e.getSource())){//理JTGLjt=newJTGL();jt.create();}if(b6.equals(e.getSource())){//理YGGLyg=newYGGL();yg.create();}if(b2.equals(e.getSource())){//XKxk=newXK();xk.create();}if(b4.equals(e.getSource())){//理KQGLkq=newKQGL();kq.create();}if(b3.equals(e.getSource())){//资理GZGLgz=newGZGL();gz.create();}}}classKQGLimplementsActionListener{JFramef=newJFrame("录入修改删除考勤信息");JButtonJButtonJButtonJButtonb1=newb2=newb3=newb4=newJButton("录入");JButton("修改");JButton("删除");JButton("查询所有");JButtonb5=newJButton(");JTextFieldtf1=newJTextField(4);JTextFieldtf2=newJTextField(4);JTextFieldtf3=newJTextField(4);JTextFieldtf4=newJTextField(4);JTextFieldtf5=newJTextField(6);JButtonb6=newJButton(人考勤");String[]cloum={"职工号","缺勤天数","缺勤类别","缺勤时间"};Object[][]row=new Object[50][4];JTabletable=newJTable(row,cloum);JScrollPanescrollpane=newJScrollPane(table);JSplitPane splitpane=newJSplitPane(JSplitPane.VERTICAL_SPLIT);voidcreate(){JPanelp=(JPanel)f.getContentPane();p.setLayout(newFlowLayout());//p.add(scrollpane);p.add(splitpane);JPanelp1=newJPanel();p1.add(b1);p1.add(b2);p1.add(b3);p1.add(b4);p1.add(b6);p1.add(b5);JPanelp2=newJPanel();p2.setBackground(Color.red);p2.add(scrollpane);JPanelp3=newJPanel();p.setLayout(newFlowLayout());p.add(newJLabel(""));p.add(newJLabel("职工号"));p.add(tf1);p.add(newJLabel("缺勤天数"));p.add(tf2);p.add(newJLabel("缺勤类别"));p.add(tf3);p.add(newJLabel(""));p.add(newJLabel("缺勤时间"));p.add(tf4);p.add(newJLabel(" "));p.add(tf5);splitpane.add(p1,splitpane.TOP);splitpane.add(p2,splitpane.BOTTOM);splitpane.setDividerLocation(50);p.setBackground(Color.CYAN);b1.addActionListener(this);b2.addActionListener(this);b3.addActionListener(this);b4.addActionListener(this);b5.addActionListener(this);b6.addActionListener(this);f.setBounds(200,100,500,600);f.setResizable(true);//以调整界面大小f.setVisible(true);}publicvoidactionPerformed(ActionEvente){if(b1.equals(e.getSource())){//Connectioncon;Statementsql;ResultSetrs;try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptione1)System.out.println(""+e1);}try{con =DriverManager.getConnection("jdbc:odbc:123","","");sql=con.createStatement();StringinsertStr="INSERTINTOKVALUES"+"("+"'"+tf1.getText()+"'"+","+tf2.getText()+","+"'"+tf3.getText()+"'"+","+tf4.getText()+")";sql.executeUpdate(insertStr);con.close();}catch(SQLExceptione1){System.out.println(e1);}}if(b2.equals(e.getSource())){//修改Connectioncon;Statementsql;ResultSetrs;try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptione1){System.out.println(""+e1);}try{con =DriverManager.getConnection("jdbc:odbc:123","","");sql=con.createStatement();sql.executeUpdate("UPDATE K SETts="+tf2.getText()+"WHEREKno="+tf1.getText()+"");sql.executeUpdate("UPDATE K SETlb="+tf3.getText()+"WHEREKno="+tf1.getText()+"");sql.executeUpdate("UPDATE K SETsj="+tf4.getText()+"WHEREKno="+tf1.getText()+"");con.close();}catch(SQLExceptione1){System.out.println(e1);}}if(b3.equals(e.getSource())){//删除Connectioncon;Statementsql;ResultSetrs;try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptione1){System.out.println(""+e1);}try{con =DriverManager.getConnection("jdbc:odbc:123","","");sql =con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);sql.executeUpdate("DELETE FROM K WHEREKno="+tf5.getText());con.close();}catch(SQLExceptione1){System.out.println(e1);}}if(b4.equals(e.getSource())){//Connectioncon;Statementsql;ResultSetrs;Vectorvector=newVector();try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptione1)System.out.println(""+e1);}try{con=DriverManager.getConnection("jdbc:odbc:123","sa","");sql =con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);if(b4.equals(e.getSource())){for(inti=0;i<50;i++)for(intj=0;j<4;j++)table.setValueAt("",i,j);rs=sql.executeQuery("SELECT *FROM ORDERBYKnoDESC");intk=-1;while(rs.next())

温馨提示

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

评论

0/150

提交评论