• 大小: 8.32MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-06
  • 语言: 其他
  • 标签: 软件工程  

资源简介

软件工程课程报告,内容从可行性-可行性测试,内容全,基本包含所有软件工程内容,这份作业期末成绩为90,个人原创

资源截图

代码片段和文件信息

package com.southwind.controller;

import com.southwind.entity.Admin;
import com.southwind.entity.Borrow;
import com.southwind.service.BookService;
import com.southwind.service.impl.BookServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;

@WebServlet(“/admin“)
public class AdminServlet extends HttpServlet {

    private BookService bookService = new BookServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req HttpServletResponse resp) throws ServletException IOException {
        String method = req.getParameter(“method“);
        if(method == null){
            method = “findAllBorrow“;
        }
        HttpSession session = req.getSession();
        Admin admin = (Admin) session.getAttribute(“admin“);
        switch (method){
            case “findAllBorrow“:
                String pageStr = req.getParameter(“page“);
                Integer page = Integer.parseInt(pageStr);
                List borrowList = bookService.findAllBorrowByState(0page);
                req.setAttribute(“list“borrowList);
                req.setAttribute(“dataPrePage“6);
                req.setAttribute(“currentPage“page);
                req.setAttribute(“pages“bookService.getBorrowPagesByState(0));
                req.getRequestDispatcher(“admin.jsp“).forward(reqresp);
                break;
            case “handle“:
                String idStr = req.getParameter(“id“);
                String stateStr = req.getParameter(“state“);
                Integer id = Integer.parseInt(idStr);
                Integer state = Integer.parseInt(stateStr);
                bookService.handleBorrow(idstateadmin.getId());
                if(state == 1 || state == 2){
                    resp.sendRedirect(“/admin?page=1“);
                }
                if(state == 3){
                    resp.sendRedirect(“/admin?method=getBorrowed&page=1“);
                }
                break;
            case “getBorrowed“:
                pageStr = req.getParameter(“page“);
                page = Integer.parseInt(pageStr);
                borrowList = bookService.findAllBorrowByState(1page);
                req.setAttribute(“list“borrowList);
                req.setAttribute(“dataPrePage“6);
                req.setAttribute(“currentPage“page);
                req.setAttribute(“pages“bookService.getBorrowPagesByState(1));
                req.getRequestDispatcher(“return.jsp“).forward(reqresp);
                break;
        }
    }
}

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

     文件        519  2020-06-03 18:49  软件工程\LibraryDemo\.idea\artifacts\LibraryDemo_war_exploded.xml

     文件        204  2020-06-03 18:49  软件工程\LibraryDemo\.idea\codestyles

     文件        468  2020-06-03 18:55  软件工程\LibraryDemo\.idea\libraries\c3p0_0_9_1_2.xml

     文件        271  2020-06-03 18:49  软件工程\LibraryDemo\.idea\misc.xml

     文件        269  2020-06-03 18:49  软件工程\LibraryDemo\.idea\modules.xml

     文件      13069  2020-06-08 23:42  软件工程\LibraryDemo\.idea\workspace.xml

     文件       1009  2020-06-03 18:55  软件工程\LibraryDemo\LibraryDemo.iml

     文件       3624  2019-12-26 09:15  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\admin.jsp

     文件       4012  2019-12-25 09:37  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\borrow.jsp

     文件        514  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\examine.css

     文件        206  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\footer.css

     文件       1136  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\index.css

     文件        954  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\login.css

     文件        513  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\myBorrow.css

     文件       1321  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\register.css

     文件        514  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\return.css

     文件       3068  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\style.css

     文件        438  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\css\top.css

     文件        271  2020-06-03 19:46  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\footer.jsp

     文件       6768  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\borrowBackRenew.gif

     文件       6761  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\borrowBackRenew_back.gif

     文件       6823  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\borrowBackRenew_r.gif

     文件       7379  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\borrow_if.gif

     文件         96  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\copyright_t.gif

     文件       4051  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\error.jpg

     文件       1471  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\error_b.gif

     文件        354  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\item_out.gif

     文件        354  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\item_over.gif

     文件      45511  2020-06-03 19:38  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\login.jpg

     文件       8374  2018-07-17 08:56  软件工程\LibraryDemo\out\artifacts\LibraryDemo_war_exploded\images\main_booksort.gif

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

评论

共有 条评论