资源简介

图书馆管理系统 经过测试系统运行正常 jre1.7 + tomcat7.0 + Mysql + jar包 1.按照db_library.sql创建数据库; 2.修改数据库配置 功能:图书馆信息、管理员设置、参数设置、书架设置、读者类型管理、读者档案管理、图书类型管理、图书档案管理、图书借阅、图书续借、图书归还、图书档案查询、图书借阅查询、借阅到期提醒、更改口令

资源截图

代码片段和文件信息

package com.action;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForward;
import com.actionForm.BookForm;
import org.apache.struts.action.Action;
import com.dao.BookDAO;
import java.util.Date;

public class Book extends Action {
    private BookDAO bookDAO = null;
    public Book() {
        this.bookDAO = new BookDAO();
    }

    public ActionForward execute(ActionMapping mapping ActionForm form
                                 HttpServletRequest request
                                 HttpServletResponse response) {
        String action =request.getParameter(“action“);
        System.out.println(“\nbook*********************action=“+action);
        if(action==null||““.equals(action)){
            request.setAttribute(“error““您的操作有误!“);
            return mapping.findForward(“error“);
        }else if(“bookAdd“.equals(action)){
            return bookAdd(mappingformrequestresponse);
        }else if(“bookQuery“.equals(action)){
            return bookQuery(mappingformrequestresponse);
        }else if(“bookModifyQuery“.equals(action)){
            return bookModifyQuery(mappingformrequestresponse);
        }else if(“bookModify“.equals(action)){
            return bookModify(mappingformrequestresponse);
        }else if(“bookDel“.equals(action)){
            return bookDel(mappingformrequestresponse);
        }else if(“bookDetail“.equals(action)){
            return bookDetail(mappingformrequestresponse);
        }else if(“bookifQuery“.equals(action)){
            return bookifQuery(mappingformrequestresponse);
        }
        request.setAttribute(“error““操作失败!“);
        return mapping.findForward(“error“);
    }
    /***********************添加图书信息**************************/
    private ActionForward bookAdd(ActionMapping mapping ActionForm form
                              HttpServletRequest request
                              HttpServletResponse response){
           BookForm bookForm = (BookForm) form;
           bookForm.setBarcode(bookForm.getBarcode());
           bookForm.setBookName(bookForm.getBookName());
           bookForm.setTypeId(bookForm.getTypeId());
           bookForm.setAuthor(bookForm.getAuthor());
           bookForm.setTranslator(bookForm.getTranslator());
           bookForm.setIsbn(bookForm.getIsbn());
           bookForm.setPrice(bookForm.getPrice());
           bookForm.setPage(bookForm.getPage());
           bookForm.setBookcaseid(bookForm.getBookcaseid());    
           //获取系统日期
           Date date1=new Date();
           java.sql.Date date=new java.sql.Date(date1.getTime());
           bookForm.setInTime(date.toString());
           bookForm.setOperator(bookForm.getOperator());
           int a=bookDAO.insert(bookForm);
           if(a==1){

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7773  2013-05-02 22:59  src\com\action\Book.java

     文件       4810  2013-05-02 22:59  src\com\action\BookCase.java

     文件       5192  2013-05-02 22:59  src\com\action\BookType.java

     文件       9218  2013-05-02 22:59  src\com\action\Borrow.java

     文件       2586  2013-05-02 22:59  src\com\action\Library.java

     文件       6950  2013-05-02 22:59  src\com\action\Manager.java

     文件       2296  2013-05-02 22:59  src\com\action\Parameter.java

     文件       1650  2013-05-02 22:59  src\com\action\Publishing.java

     文件       7015  2013-05-02 22:59  src\com\action\Reader.java

     文件       5302  2013-05-02 22:59  src\com\action\ReaderType.java

     文件        493  2013-05-02 22:59  src\com\actionForm\BookCaseForm.java

     文件       3219  2013-05-02 22:59  src\com\actionForm\BookForm.java

     文件        627  2013-05-02 22:59  src\com\actionForm\BookTypeForm.java

     文件       4354  2013-05-02 22:59  src\com\actionForm\BorrowForm.java

     文件       1784  2013-05-02 22:59  src\com\actionForm\LibraryForm.java

     文件       1633  2013-05-02 22:59  src\com\actionForm\ManagerForm.java

     文件        651  2013-05-02 22:59  src\com\actionForm\ParameterForm.java

     文件        979  2013-05-02 22:59  src\com\actionForm\PublishingForm.java

     文件       2996  2013-05-02 22:59  src\com\actionForm\ReaderForm.java

     文件        650  2013-05-02 22:59  src\com\actionForm\ReaderTypeForm.java

     文件        116  2018-07-04 14:56  src\com\connDB.properties

     文件       1163  2013-05-02 22:59  src\com\core\ChStr.java

     文件       2601  2013-05-02 23:42  src\com\core\ConnDB.java

     文件       1947  2013-05-03 10:01  src\com\core\SetCharacterEncodingFilter.java

     文件       3164  2013-05-02 22:59  src\com\dao\BookCaseDAO.java

     文件       6621  2013-05-02 23:48  src\com\dao\BookDAO.java

     文件       3077  2013-05-02 22:59  src\com\dao\BookTypeDAO.java

     文件       8753  2013-05-02 23:49  src\com\dao\BorrowDAO.java

     文件       2030  2013-05-02 22:59  src\com\dao\LibraryDAO.java

     文件       8767  2013-05-02 22:59  src\com\dao\ManagerDAO.java

............此处省略1306个文件信息

评论

共有 条评论