diff --git a/src/core/process/Process.java b/src/core/process/Process.java index 91c5d63..be06a88 100644 --- a/src/core/process/Process.java +++ b/src/core/process/Process.java @@ -4,14 +4,17 @@ import core.operation.Operation; public abstract class Process{ + private static String buttonName; + protected static String targetURL; + + protected static String iconURL; + private String status; private String permission; private Operation operation; private String info; - private static String buttonName; - protected static String targetURL; - protected static String iconURL; + protected abstract boolean check(); public String getPermission() { diff --git a/src/servlet/S_CollegeFillOpeningReportOpinion.java b/src/servlet/S_CollegeFillOpeningReportOpinion.java index f84de95..c7f7367 100644 --- a/src/servlet/S_CollegeFillOpeningReportOpinion.java +++ b/src/servlet/S_CollegeFillOpeningReportOpinion.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("college-fill-opening-report-opinion") +@WebServlet("/college-fill-opening-report-opinion") public class S_CollegeFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_CollegeFillScoreOpinion.java b/src/servlet/S_CollegeFillScoreOpinion.java index b66ec58..360e082 100644 --- a/src/servlet/S_CollegeFillScoreOpinion.java +++ b/src/servlet/S_CollegeFillScoreOpinion.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("college-fill-score-opinion") +@WebServlet("/college-fill-score-opinion") public class S_CollegeFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_MentorFillOpeningReportOpinion.java b/src/servlet/S_MentorFillOpeningReportOpinion.java index 588215b..d35293a 100644 --- a/src/servlet/S_MentorFillOpeningReportOpinion.java +++ b/src/servlet/S_MentorFillOpeningReportOpinion.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("mentor-fill-opening-report-opinion") +@WebServlet("/mentor-fill-opening-report-opinion") public class S_MentorFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_MentorFillReview.java b/src/servlet/S_MentorFillReview.java index 1ece272..a10cf5c 100644 --- a/src/servlet/S_MentorFillReview.java +++ b/src/servlet/S_MentorFillReview.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("mentor-fill-review") +@WebServlet("/mentor-fill-review") public class S_MentorFillReview extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_ReviewerFillReview.java b/src/servlet/S_ReviewerFillReview.java index f950771..f3c754d 100644 --- a/src/servlet/S_ReviewerFillReview.java +++ b/src/servlet/S_ReviewerFillReview.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("reviewer-fill-review") +@WebServlet("/reviewer-fill-review") public class S_ReviewerFillReview extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_SchoolFillScoreOpinion.java b/src/servlet/S_SchoolFillScoreOpinion.java index d6b0e9d..fa1fa02 100644 --- a/src/servlet/S_SchoolFillScoreOpinion.java +++ b/src/servlet/S_SchoolFillScoreOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("school-fill-score-opinion") +@WebServlet("/school-fill-score-opinion") public class S_SchoolFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_SecretaryFillOpeningReportRecord.java b/src/servlet/S_SecretaryFillOpeningReportRecord.java index 2ef4f62..94f5ee1 100644 --- a/src/servlet/S_SecretaryFillOpeningReportRecord.java +++ b/src/servlet/S_SecretaryFillOpeningReportRecord.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("secretary-fill-opening-report-record") +@WebServlet("/secretary-fill-opening-report-record") public class S_SecretaryFillOpeningReportRecord extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_SecretaryFillReplyRecord.java b/src/servlet/S_SecretaryFillReplyRecord.java index 90a10fa..9efee5e 100644 --- a/src/servlet/S_SecretaryFillReplyRecord.java +++ b/src/servlet/S_SecretaryFillReplyRecord.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("secretary-fill-reply-record") +@WebServlet("/secretary-fill-reply-record") public class S_SecretaryFillReplyRecord extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_StudentUploadFinishedProduct.java b/src/servlet/S_StudentUploadFinishedProduct.java index 20f2fb5..b7271e4 100644 --- a/src/servlet/S_StudentUploadFinishedProduct.java +++ b/src/servlet/S_StudentUploadFinishedProduct.java @@ -14,7 +14,16 @@ public class S_StudentUploadFinishedProduct extends HttpServlet { static String fileType = "graduation_design_finished_product"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = "000"; - //String id = request.getParameter("id"); - String fileURL = servlet.Utils.saveFile(request, fileType); + //String files = request.getParameter("file"); + System.out.print("123"); + System.out.print( request.getPart("file")); + System.out.print("123"); + try { + String fileURL = servlet.Utils.saveFile(request, fileType); + }catch (Exception e) + { + System.out.print(e); + } + System.out.print("222"); } } diff --git a/src/servlet/S_StudentUploadOpeningReport.java b/src/servlet/S_StudentUploadOpeningReport.java index 4102e91..ffb5f9c 100644 --- a/src/servlet/S_StudentUploadOpeningReport.java +++ b/src/servlet/S_StudentUploadOpeningReport.java @@ -18,6 +18,6 @@ public class S_StudentUploadOpeningReport extends HttpServlet { static String fileType = "graduation_design_opening_report"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); - String fileURL = servlet.Utils.saveFile(request, fileType); + //String fileURL = servlet.Utils.saveFile(request, fileType); } } diff --git a/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java b/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java index c43e7fd..2e35294 100644 --- a/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java +++ b/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("teacher-team-fill-opening-report-opinion") +@WebServlet("/teacher-team-fill-opening-report-opinion") public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_TeacherTeamFillScoreOpinion.java b/src/servlet/S_TeacherTeamFillScoreOpinion.java index a82b234..3a70590 100644 --- a/src/servlet/S_TeacherTeamFillScoreOpinion.java +++ b/src/servlet/S_TeacherTeamFillScoreOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("teacher-team-fill-score-opinion") +@WebServlet("/teacher-team-fill-score-opinion") public class S_TeacherTeamFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/Utils.java b/src/servlet/Utils.java index 3cea1d0..0a7f8fb 100644 --- a/src/servlet/Utils.java +++ b/src/servlet/Utils.java @@ -39,10 +39,13 @@ public interface Utils { return getFilePath(table)+getFileName(fileName); } static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException { - Part part = request.getPart("graduation_design"); + System.out.println("utils"); + Part part = request.getPart("file"); + System.out.println("part"); String header = part.getHeader("content-disposition"); String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1); String filePathName = servlet.Utils.getFilePathName(table,path); + System.out.println(filePathName); File file = new File(filePathName); InputStream inputStream = part.getInputStream(); FileOutputStream outputStream = new FileOutputStream(file); @@ -54,6 +57,7 @@ public interface Utils { outputStream.close(); inputStream.close(); part.delete(); + System.out.println("end"); return filePathName; } } diff --git a/src/servlet/account/S_Login.java b/src/servlet/account/S_Login.java index f7b9506..cee72a3 100644 --- a/src/servlet/account/S_Login.java +++ b/src/servlet/account/S_Login.java @@ -38,7 +38,7 @@ public class S_Login extends HttpServlet { return; } request.getSession().setAttribute("user",user); - response.sendRedirect("/home.jsp"); + response.sendRedirect("/home/home.jsp"); return; } } \ No newline at end of file diff --git a/src/servlet/account/S_Register.java b/src/servlet/account/S_Register.java index 1791000..028b4ac 100644 --- a/src/servlet/account/S_Register.java +++ b/src/servlet/account/S_Register.java @@ -43,7 +43,7 @@ public class S_Register extends HttpServlet { response.sendRedirect("/op_fail.jsp"); } request.getSession().setAttribute("user",user); - response.sendRedirect("/home.jsp"); + response.sendRedirect("/home/home.jsp"); return; } } \ No newline at end of file diff --git a/web/cssFile/images/opt.sai2 b/web/cssFile/images/opt.sai2 index 9a62cbd..e69de29 100644 Binary files a/web/cssFile/images/opt.sai2 and b/web/cssFile/images/opt.sai2 differ diff --git a/web/cssFile/images/search1.sai2 b/web/cssFile/images/search1.sai2 index 648da7a..e69de29 100644 Binary files a/web/cssFile/images/search1.sai2 and b/web/cssFile/images/search1.sai2 differ diff --git a/web/cssFile/images/search2.sai2 b/web/cssFile/images/search2.sai2 index 6ba357a..e69de29 100644 Binary files a/web/cssFile/images/search2.sai2 and b/web/cssFile/images/search2.sai2 differ diff --git a/web/download.jsp b/web/home/download.jsp similarity index 85% rename from web/download.jsp rename to web/home/download.jsp index bc2d5c9..37a54c4 100644 --- a/web/download.jsp +++ b/web/home/download.jsp @@ -9,8 +9,8 @@ 资料下载 - - + +
diff --git a/web/fillSbjMsg.jsp b/web/home/fillSbjMsg.jsp similarity index 92% rename from web/fillSbjMsg.jsp rename to web/home/fillSbjMsg.jsp index 618f0e6..abf830c 100644 --- a/web/fillSbjMsg.jsp +++ b/web/home/fillSbjMsg.jsp @@ -10,9 +10,9 @@ 填写选题信息 - - - + + +
diff --git a/web/fill_Information.jsp b/web/home/fill_Information.jsp similarity index 100% rename from web/fill_Information.jsp rename to web/home/fill_Information.jsp diff --git a/web/get_time.jsp b/web/home/get_time.jsp similarity index 100% rename from web/get_time.jsp rename to web/home/get_time.jsp diff --git a/web/home.jsp b/web/home/home.jsp similarity index 73% rename from web/home.jsp rename to web/home/home.jsp index 69b6a30..11b685a 100644 --- a/web/home.jsp +++ b/web/home/home.jsp @@ -1,5 +1,8 @@ <%@ page import="java.util.List" %> -<%@ page import="java.util.ArrayList" %><%-- +<%@ page import="java.util.ArrayList" %> +<%@ page import="core.user.User" %> +<%@ page import="core.process.Condition" %> +<%@ page import="core.process.Process" %><%-- Created by IntelliJ IDEA. User: lenovo Date: 2019/1/9 @@ -11,30 +14,31 @@ 毕业设计管理系统 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + -<%String type="teacher";pageContext.setAttribute("userType",type);%> -<%List list=new ArrayList<>(); - list.add("001"); - list.add("002"); +<% + User user=(User)session.getAttribute("user"); + String type=user.getType(); + pageContext.setAttribute("userType",type); + Condition condition=user.getCondition(); + //List pList=condition.getProcesses(); + int length=0; int index=0; - pageContext.setAttribute("list",list); - session.setAttribute("list",list); %>
@@ -46,11 +50,11 @@
@@ -63,7 +67,7 @@
- +
@@ -71,7 +75,7 @@
- +
@@ -79,7 +83,7 @@
- +
@@ -87,7 +91,7 @@
- +
@@ -95,7 +99,7 @@
- +
@@ -103,7 +107,7 @@
- +
@@ -112,7 +116,7 @@
- +
@@ -129,25 +133,25 @@
- + diff --git a/web/index.jsp b/web/home/index.jsp similarity index 100% rename from web/index.jsp rename to web/home/index.jsp diff --git a/web/personal_setting.jsp b/web/home/personal_setting.jsp similarity index 91% rename from web/personal_setting.jsp rename to web/home/personal_setting.jsp index dd44674..09ee7b5 100644 --- a/web/personal_setting.jsp +++ b/web/home/personal_setting.jsp @@ -6,9 +6,9 @@ To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> - - - + + + 个人信息 diff --git a/web/result_list.jsp b/web/home/result_list.jsp similarity index 100% rename from web/result_list.jsp rename to web/home/result_list.jsp diff --git a/web/select.jsp b/web/home/select.jsp similarity index 92% rename from web/select.jsp rename to web/home/select.jsp index 9bbf45f..042817e 100644 --- a/web/select.jsp +++ b/web/home/select.jsp @@ -17,9 +17,9 @@ Title - - - + + + <% diff --git a/web/upload_file.jsp b/web/home/upload_file.jsp similarity index 62% rename from web/upload_file.jsp rename to web/home/upload_file.jsp index 3047a1e..ee25ffb 100644 --- a/web/upload_file.jsp +++ b/web/home/upload_file.jsp @@ -9,9 +9,9 @@ 上传文件 - - - + + +
@@ -19,13 +19,15 @@
上传定稿
- +
-
+
+
选择文件
-
上传文件
+
上传文件
+
diff --git a/web/jsFile/upload_action.js b/web/jsFile/upload_action.js index c756a06..866ac3a 100644 --- a/web/jsFile/upload_action.js +++ b/web/jsFile/upload_action.js @@ -6,17 +6,18 @@ $(document).ready(function () { function sendFile() { var fileData =new FormData(); var Url4='student-upload-finished-product'; - var file=$('.true-select').files; + var file=$('#select')[0].files[0]; if($('.true-select').val()=='') { alert("请选择文件"); return; } + alert(file); fileData.append("file",file); $.ajax({ type:"post", url:Url4, - date:fileData, + data:fileData, processData:false, contentType:false, success:function (data,status) {