基于javaweb+jsp的工作日志管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)

elvinyang

关注

阅读 53

2022-04-19

基于javaweb+jsp的工作日志管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap Ajax

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

    public String getRizhiNo() {
        return rizhiNo;
    }

    public void setRizhiNo(String rizhiNo) {
        this.rizhiNo = rizhiNo;
    }
    public String getRizhiDate() {
        return rizhiDate;
    }

    public void setRizhiDate(String rizhiDate) {
        this.rizhiDate = rizhiDate;
    }
    public String getRizhiWancheng() {
        return rizhiWancheng;
        Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页
        String pageNum = Util.decode(request, "pageNum");//封装分页参数
        com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);
        params.put("startIndex", pb.getStartIndex());
        params.put("pageSize", pb.getPageSize());
        List list = (List) noticeService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
        pb.setServlet("noticeList");
        pb.setSearchColumn(searchColumn);
        pb.setKeyword(keyword);
        pb.setList(list);
        request.getSession().setAttribute("pageBean", pb);
        request.getSession().setAttribute("list", pb.getList());

        response.sendRedirect("notice_list.jsp");
    }
}
package com.demo.util;

import java.util.List;

/**
 * 列表页面的显示对象
 *
 * @param <T>
 */
public class PageBean<T> {
    private List<T> list;//根据条件查询出来的list集合
                        <label for="edit-createTime" class="control-label">创建时间:</label>
                        <input type="text" class="form-control" name="createTime" id="edit-createTime">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-grad btn-primary" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-grad btn-success">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- delete -->
<div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form action="userDelete">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">删除用户</h4>
        pb.setSearchColumn(searchColumn);
        pb.setKeyword(keyword);
        pb.setList(list);
        request.getSession().setAttribute("pageBean", pb);
        request.getSession().setAttribute("list", pb.getList());

        response.sendRedirect("user_list.jsp");
    }
}
package com.demo.controller;

import com.demo.util.Util;
import com.demo.service.NoticeService;
import com.demo.vo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
            <result column="rizhi_content" property="rizhiContent" />
            <result column="rizhi_name" property="rizhiName" />
            <result column="rizhi_no" property="rizhiNo" />
            <result column="rizhi_date" property="rizhiDate" />
            <result column="rizhi_wancheng" property="rizhiWancheng" />
            <result column="rizhi_text" property="rizhiText" />
    </resultMap>

    <sql id="Base_Column_List">
        `id`,`rizhi_rizhi`,`rizhi_content`,`rizhi_name`,`rizhi_no`,`rizhi_date`,`rizhi_wancheng`,`rizhi_text`
    </sql>

    <!--新增-->
    <insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.Rizhi">
        INSERT INTO `t_rizhi`
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>`id`,</if>
                    <if test ='rizhiRizhi != null'>`rizhi_rizhi`,</if>
                    <if test ='rizhiContent != null'>`rizhi_content`,</if>
                    <if test ='rizhiName != null'>`rizhi_name`,</if>
                    <if test ='rizhiNo != null'>`rizhi_no`,</if>
                    <if test ='rizhiDate != null'>`rizhi_date`,</if>
                    <if test ='rizhiWancheng != null'>`rizhi_wancheng`,</if>
            <result column="create_date" property="createDate" />
    </resultMap>

    <sql id="Base_Column_List">
        `id`,`notice_name`,`notice_text`,`notice_type`,`create_date`
    </sql>

    <!--新增-->
    <insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.Notice">
        INSERT INTO `t_notice`
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>`id`,</if>
                    <if test ='noticeName != null'>`notice_name`,</if>
                    <if test ='noticeText != null'>`notice_text`,</if>
                    <if test ='noticeType != null'>`notice_type`,</if>
                    <if test ='createDate != null'>`create_date`</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            alert("类型不能为空");
            return false;
        }
        if (document.getElementById("edit-createDate").value.trim().length == 0) {
            alert("创建时间不能为空");
            return false;
        }
        return true;
    }
</script>
</html>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html>
                                </button>
                            </th>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
            <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
        </div>
    </div>
</div>

<!-- add -->
<div class="modal fade" id="modal-add" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form action="userAdd" onsubmit="return addCheck()">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">增加用户</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group hidden">
    private String empJob;//职位
    private String empNo;//工号
    private String empAge;//年龄
    private String empText;//备注

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }
    public String getEmpSex() {
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form action="userAdd" onsubmit="return addCheck()">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">增加用户</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group hidden">
                        <label class="control-label">(hidden)</label>
                        <input type="text" class="form-control" name="action" value="add">
                    </div>
                    <div class="form-group">
                        <label for="add-username" class="control-label">用户名:</label>
                        <input type="text" class="form-control" name="username" id="add-username">

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap Ajax

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、员工模块、日志模块的增删改查管理

20220319005454

20220319005455

20220319005456

20220319005457

20220319005458

20220319005459

20220319005500

20220319005501

20220319005502

20220319005503

20220319005504

document

精彩评论(0)

0 0 举报