JavaWeb实现员工管理系统

使用技术:java,Jsp,Mysql,Servlet比较适合初学者用了解学习,课设使用,写的不好的地方请各位大佬多多指教

目录

使用技术:java,Jsp,Mysql,Servlet比较适合初学者用了解学习,课设使用,写的不好的地方请各位大佬多多指教,本系统一共有四个功能模块:员工管理、公告管理、上报事件管理、任务派发四个模块。本文最后附有源码

1.管理员端界面

 2.管理员主界面

3.管理员功能展示

使用list集合来保存从数据库检索出来的数据,并使用迭代器进行遍历


1.管理员端口界面

 2.管理员主界面 

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>员工管理主界面</title>
    <style type="text/css">
        .id{
            text-align: center;
        }
       button{
           text-align: center;
           width: 150px;
           height: 80px;
           color: #fff;
           background-color: #6496c8;
           border: none;
           border-radius: 15px;
           box-shadow: 0 10px #27496d;
           margin: 20px;
       }
       a{
           color: white;
         text-decoration:none
       }
       p{ color: white;
           font-size: 20px;
       }
        a:hover{ text-decoration:underline}
    </style>
</head>
<body background="backgrond.png" style="background-repeat:no-repeat;
        background-attachment:fixed;
        background-size:100% 100%;" >
  <h1 style="color: #57b2c9;text-align: center;font-size: 70px">欢迎登录</h1>
  <div class="id">
      <button><p><a href="listAll.jsp">员工总览</a></p></button>
      <button><p><a href="insert.jsp">新增员工</a></p></button>
      <button><p><a href="selectOne.jsp">查询员工</a></p></button><br>
      <button><p><a href="delete.jsp">删除员工</a></p></button>
      <button><p><a href="update.jsp">修改员工信息</a></p></button>
      <button><p><a href="wagesCompute.jsp">员工实发工资计算</a></p></button><br>
      <button><p><a href="sort.jsp">员工工资排序</a></p></button>
      <button><p><a href="addPublicity.jsp">发布公告</a></p></button>
      <button><p><a href="doEvent.jsp">待处理事件</a></p></button><br>
      <button><p><a href="index.jsp"> 退出系统</a></p></button>
    </table>
  </div>
</body>
</html>

3.管理员功能展示

使用list集合来保存从数据库检索出来的数据,并使用迭代器进行遍历

<%@ page import="dao.EmpDao" %>
<%@ page import="dao.EmpDaoImplement" %>
<%@ page import="java.util.List" %>
<%@ page import="po.Emp" %>
<%@ page import="java.util.Iterator" %><%--
  Created by IntelliJ IDEA.
  User: 86134
  Date: 2022/10/9
  Time: 20:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>

    <title>总览员工</title>
</head>
<body background="backgrond.png" style="background-repeat:no-repeat;
        background-attachment:fixed;
        background-size:100% 100%;">
<h1 style="text-align: center">员工信息表</h1>
<button><a href="main.jsp" style="text-decoration:none">返回首页</a></button>
<table border="2px" align="center" cellspacing="0">
    <tr bgcolor="#708090">
        <td>员工工号</td>
        <td>员工姓名</td>
        <td>员工性别</td>
        <td>员工工作</td>
        <td>员工年龄</td>
        <td>员工手机号</td>
        <td>员工基本工资</td>
    </tr>
    <%
        EmpDao emp = new EmpDaoImplement();
        List<Emp> list = emp.getAll();
        Iterator<Emp> it = list.iterator();
        while (it.hasNext()){
            Emp e = it.next();

    %>
    <tr bgcolor="white">
        <td><%=e.getId()%></td>
        <td><%=e.getName()%></td>
        <td><%=e.getSex()%></td>
        <td><%=e.getJob()%></td>
        <td><%=e.getAge()%></td>
        <td><%=e.getPhoneNumber()%></td>
        <td><%=e.getWages()%></td>
    </tr>
<%}%>

</table>
</body>
</html>

<%@ page import="po.Emp" %>
<%@ page import="dao.EmpDao" %>
<%@ page import="dao.EmpDaoImplement" %><%--
  Created by IntelliJ IDEA.
  User: 86134
  Date: 2022/10/9
  Time: 20:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <style type="text/css">
        form{

        width: 420px;
        height: 500px;
            padding-top:30px;
            margin: 80px auto;
            border-radius: 10px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.3)
        }
        input{
            margin:15px;
        }
        h1{
            text-align: center;

        }
    </style>
    <title>新增员工</title>
</head>
<body background="backgrond.png" style="background-repeat:no-repeat;
        background-attachment:fixed;
        background-size:100% 100%;">
<h1>请填写员工信息</h1>
<button><a href="main.jsp" style="text-decoration:none">返回首页</a></button>
<form action="insert" method="post" style="text-align: center">
        请输入员工工号:<input type="text" name="id"><br>
    请输入员工姓名:<input type="text" name="name"><br>
    请选择员工的性别:<input type="radio" name="sex" value="男">男
                  <input type="radio" name="sex" value="女">女<br>

    请选择工作:<input type="radio" name="job" value="软件开发">软件开发
              <input type="radio" name="job" value="软件测试">软件测试
    <input type="radio" name="job" value="UI设计">UI设计
    <input type="radio" name="job" value="原型设计">原型设计
    <input type="radio" name="job" value="需求分析">需求分析<br>
    请输入年龄:<input type="text" name="age"><br>
    请输入手机号:<input type="text" name="phoneNumber"><br>
    请输入基本工资:<input type="text" name="wages"><br>
    <input type="submit" value="提交" style="width: 190px;height: 25px;border-radius: 3px;border: 2px solid #000;margin-left: 65px;background: #0d40d7;color: #fff;border: none;">
    <input type="reset"  style="width: 190px;height: 25px;border-radius: 3px;border: 2px solid #000;margin-left: 65px;background: #0d40d7;color: #fff;border: none;">
</form>


</body>
</html>

4.员工端主界面

<%@ page import="po.Publicity" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="dao.PublicityDao" %>
<%@ page import="dao.PublicityDaoImp" %>
<%@ page import="java.util.Iterator" %><%--
  Created by IntelliJ IDEA.
  User: 86134
  Date: 2022/11/9
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<style>

    .d1{
        background-color: antiquewhite;
        border:10px solid blue;

        width: 400px;
        height: 200px;

        padding: 20px;

        margin: 20px;
        padding: 20px 30px;


        padding:20px 30px 40px;

        padding-left: 70px;

        border: 4px dotted blue;
        border: 4px dashed blue;
        border: 4px double blue;
    }
    .p3{
        padding-left:300px
    }
    .p2{
        padding-left:300px
    }
</style>
<body background="2.jpg" style="background-repeat:no-repeat;
        background-attachment:fixed;
        background-size:100% 100%;">
<h1 style="text-align: center">公司公告</h1>
<button><a href="empInsertEvent.jsp">上报事件</a></button>&ensp;&ensp; <button><a href="showMeEvent.jsp">查看我上报的事件</a></button>&ensp;&ensp;<button><a href="empLogin.jsp">退出系统</a></button>
<%
List<Publicity> list = new ArrayList<Publicity>();
    PublicityDao dao = new PublicityDaoImp();
    Publicity pu = null;
    list = dao.getAll();
   for(int i= list.size()-1;i>=0;i--){
       pu=new Publicity();
       pu = list.get(i);

%>
<body>

<div class="d1">
    <h1 style="text-align: center"><%=pu.getTitle()%></h1>
    <p><%=pu.getContent()%></p>
    <p class="p3">通知时间:</p><p class="p2"><%=pu.getDate()%></p>
</div>

</body>

<%}%>
</body>
</html>

5员工端功能展示

员工端首页

 

员工管理系统源码

  • 6
    点赞
  • 45
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

起名字什么的最难了>o<

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值