From 49e397a08a705ff47d6c5cd8bbbdd42a92f59c4b Mon Sep 17 00:00:00 2001 From: zhai_lw Date: Tue, 15 Jan 2019 00:14:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?S=5FServlet=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/servlet/S_CollegeFillOpeningReportOpinion.java | 4 ++-- src/servlet/S_CollegeFillScoreOpinion.java | 5 +++-- src/servlet/S_MentorFillOpeningReportOpinion.java | 4 ++-- src/servlet/S_MentorFillReview.java | 5 +++-- src/servlet/S_ReviewerFillReview.java | 5 +++-- src/servlet/S_SchoolFillScoreOpinion.java | 5 +++-- src/servlet/S_SecretaryFillOpeningReportRecord.java | 4 ++-- src/servlet/S_SecretaryFillReplyRecord.java | 4 ++-- src/servlet/S_TeacherTeamFillOpeningReportOpinion.java | 4 ++-- src/servlet/S_TeacherTeamFillScoreOpinion.java | 5 +++-- 10 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/servlet/S_CollegeFillOpeningReportOpinion.java b/src/servlet/S_CollegeFillOpeningReportOpinion.java index 6162fa5..e15b6ba 100644 --- a/src/servlet/S_CollegeFillOpeningReportOpinion.java +++ b/src/servlet/S_CollegeFillOpeningReportOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet(name = "S_CollegeFillOpeningReportOpinion") +@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"); @@ -16,6 +16,6 @@ public class S_CollegeFillOpeningReportOpinion extends HttpServlet { } static String[] vName = { - "" + "college_opinion" }; } \ No newline at end of file diff --git a/src/servlet/S_CollegeFillScoreOpinion.java b/src/servlet/S_CollegeFillScoreOpinion.java index 0d25745..7b0bdee 100644 --- a/src/servlet/S_CollegeFillScoreOpinion.java +++ b/src/servlet/S_CollegeFillScoreOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet(name = "S_CollegeFillScoreOpinion") +@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"); @@ -16,6 +16,7 @@ public class S_CollegeFillScoreOpinion extends HttpServlet { } static String[] vName = { - "" + "college_opinion", + "college_score" }; } \ No newline at end of file diff --git a/src/servlet/S_MentorFillOpeningReportOpinion.java b/src/servlet/S_MentorFillOpeningReportOpinion.java index 625520f..299165d 100644 --- a/src/servlet/S_MentorFillOpeningReportOpinion.java +++ b/src/servlet/S_MentorFillOpeningReportOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet(name = "S_MentorFillOpeningReportOpinion") +@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"); @@ -16,6 +16,6 @@ public class S_MentorFillOpeningReportOpinion extends HttpServlet { } static String[] vName = { - "" + "mentor_opinion" }; } \ No newline at end of file diff --git a/src/servlet/S_MentorFillReview.java b/src/servlet/S_MentorFillReview.java index f28b2d1..1ece272 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(name = "S_MentorFillReview") +@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"); @@ -16,6 +16,7 @@ public class S_MentorFillReview extends HttpServlet { } static String[] vName = { - "" + "total_grade", + "review_opinion" }; } \ No newline at end of file diff --git a/src/servlet/S_ReviewerFillReview.java b/src/servlet/S_ReviewerFillReview.java index a23d80a..f950771 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(name = "S_ReviewerFillReview") +@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"); @@ -16,6 +16,7 @@ public class S_ReviewerFillReview extends HttpServlet { } static String[] vName = { - "" + "score", + "opinion" }; } \ No newline at end of file diff --git a/src/servlet/S_SchoolFillScoreOpinion.java b/src/servlet/S_SchoolFillScoreOpinion.java index 97d7cd5..d6b0e9d 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(name = "S_SchoolFillScoreOpinion") +@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"); @@ -16,6 +16,7 @@ public class S_SchoolFillScoreOpinion extends HttpServlet { } static String[] vName = { - "" + "school_opinion", + "school_score" }; } \ No newline at end of file diff --git a/src/servlet/S_SecretaryFillOpeningReportRecord.java b/src/servlet/S_SecretaryFillOpeningReportRecord.java index 0fc9fb5..2ef4f62 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(name = "S_SecretaryFillOpeningReportRecord") +@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"); @@ -16,6 +16,6 @@ public class S_SecretaryFillOpeningReportRecord extends HttpServlet { } static String[] vName = { - "" + "secretary_record" }; } \ No newline at end of file diff --git a/src/servlet/S_SecretaryFillReplyRecord.java b/src/servlet/S_SecretaryFillReplyRecord.java index 7b20ab4..90a10fa 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(name = "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"); @@ -16,6 +16,6 @@ public class S_SecretaryFillReplyRecord extends HttpServlet { } static String[] vName = { - "" + "secretary_record" }; } diff --git a/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java b/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java index 4e55b0a..c43e7fd 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(name = "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"); @@ -16,6 +16,6 @@ public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet { } static String[] vName = { - "" + "report_teacher_team_opinion" }; } \ No newline at end of file diff --git a/src/servlet/S_TeacherTeamFillScoreOpinion.java b/src/servlet/S_TeacherTeamFillScoreOpinion.java index a72ac08..a82b234 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(name = "S_TeacherTeamFillScoreOpinion") +@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"); @@ -16,6 +16,7 @@ public class S_TeacherTeamFillScoreOpinion extends HttpServlet { } static String[] vName = { - "" + "teacher_team_opinion", + "teacher_team_score" }; } From a02f896fc470c774778a6ebfdde218db832fbde2 Mon Sep 17 00:00:00 2001 From: zhai_lw Date: Tue, 15 Jan 2019 09:06:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A3=80=E6=9F=A5C=5FProcess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../C_CollegeFillOpeningReportOpinion.java | 16 +++++----------- src/core/process/C_CollegeFillScoreOpinion.java | 4 ++-- .../C_MentorFillOpeningReportOpinion.java | 2 +- src/core/process/C_SchoolFillScoreOpinion.java | 2 +- .../C_SecretaryFillOpeningReportOpinion.java | 2 +- src/core/process/C_SecretaryFillReplyRecord.java | 4 ++-- ...C_StudentFillGraduationDesignInformation.java | 2 +- .../process/C_StudentUploadFinishedProduct.java | 14 +++++++------- .../process/C_StudentUploadOpeningReport.java | 14 +++++++------- .../C_TeacherTeamFillOpeningReportOpinion.java | 2 +- .../process/C_TeacherTeamFillScoreOpinion.java | 2 +- .../S_CollegeFillOpeningReportOpinion.java | 12 +++++++++++- src/servlet/S_CollegeFillScoreOpinion.java | 3 +++ 13 files changed, 43 insertions(+), 36 deletions(-) diff --git a/src/core/process/C_CollegeFillOpeningReportOpinion.java b/src/core/process/C_CollegeFillOpeningReportOpinion.java index ca233fe..27cae0f 100644 --- a/src/core/process/C_CollegeFillOpeningReportOpinion.java +++ b/src/core/process/C_CollegeFillOpeningReportOpinion.java @@ -10,7 +10,6 @@ import java.util.Map; public class C_CollegeFillOpeningReportOpinion extends TempProcess{ String graduationDesignId; - String opening_report_college_teacher_id; Map vMap; static String table="graduation_design_opening_report_opinion_record"; @@ -29,7 +28,7 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{ fillInformation.execute(null); } protected boolean check() { - if(this.getOpening_report_college_teacher_id()==null||this.getGraduationDesignId()==null) + if(this.getGraduationDesignId()==null||this.getVMap()==null) return false; return true; } @@ -41,16 +40,11 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{ this.graduationDesignId = graduationDesignId; } - public String getOpening_report_college_teacher_id() { - return opening_report_college_teacher_id; - } - - public void setOpening_report_college_teacher_id(String opening_report_college_teacher_id) { - this.opening_report_college_teacher_id = opening_report_college_teacher_id; - } - - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } + public Map getVMap() { + return vMap; + } } diff --git a/src/core/process/C_CollegeFillScoreOpinion.java b/src/core/process/C_CollegeFillScoreOpinion.java index a3fafe8..97b1fbd 100644 --- a/src/core/process/C_CollegeFillScoreOpinion.java +++ b/src/core/process/C_CollegeFillScoreOpinion.java @@ -16,13 +16,13 @@ public class C_CollegeFillScoreOpinion extends TempProcess{ static String table="graduation_design_reply_opinion_record_score"; public void fillInformation() throws Exception{ - if(!check()) throw new GExcptInit("FillInformations Attrs Init error!"); + if(!check()) throw new GExcptInit("FillInformation Attrs Init error!"); FillInformation fillInformation=new FillInformation(); fillInformation.setOptions(new HashMap<>()); fillInformation.addOptions("table",table); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss"); String date=df.format(new Date()); - vMap.put("secretary_record_date",date); + vMap.put("college_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); fillInformation.addOptions("limits",limits); diff --git a/src/core/process/C_MentorFillOpeningReportOpinion.java b/src/core/process/C_MentorFillOpeningReportOpinion.java index 4c307f5..99bc66d 100644 --- a/src/core/process/C_MentorFillOpeningReportOpinion.java +++ b/src/core/process/C_MentorFillOpeningReportOpinion.java @@ -50,7 +50,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ this.mentor_opinion = mentor_opinion; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } } diff --git a/src/core/process/C_SchoolFillScoreOpinion.java b/src/core/process/C_SchoolFillScoreOpinion.java index b1ec92d..652cf1b 100644 --- a/src/core/process/C_SchoolFillScoreOpinion.java +++ b/src/core/process/C_SchoolFillScoreOpinion.java @@ -41,7 +41,7 @@ public class C_SchoolFillScoreOpinion extends TempProcess { public void setGraduationDesignId(String graduationDesignId) { this.graduationDesignId = graduationDesignId; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } diff --git a/src/core/process/C_SecretaryFillOpeningReportOpinion.java b/src/core/process/C_SecretaryFillOpeningReportOpinion.java index f97258f..d0398a3 100644 --- a/src/core/process/C_SecretaryFillOpeningReportOpinion.java +++ b/src/core/process/C_SecretaryFillOpeningReportOpinion.java @@ -43,7 +43,7 @@ public class C_SecretaryFillOpeningReportOpinion extends TempProcess{ this.graduationDesignId = graduationDesignId; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } diff --git a/src/core/process/C_SecretaryFillReplyRecord.java b/src/core/process/C_SecretaryFillReplyRecord.java index 172b0aa..0c8c478 100644 --- a/src/core/process/C_SecretaryFillReplyRecord.java +++ b/src/core/process/C_SecretaryFillReplyRecord.java @@ -16,7 +16,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{ static String table="graduation_design_reply_opinion_record_score"; public void fillInformation() throws Exception{ - if(!check()) throw new GExcptInit("FillInformations Attrs Init error!"); + if(!check()) throw new GExcptInit("FillInformation Attrs Init error!"); FillInformation fillInformation=new FillInformation(); fillInformation.setOptions(new HashMap<>()); fillInformation.addOptions("table",table); @@ -42,7 +42,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{ this.graduationDesignId = graduationDesignId; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } diff --git a/src/core/process/C_StudentFillGraduationDesignInformation.java b/src/core/process/C_StudentFillGraduationDesignInformation.java index 5a7c5e5..33e6df4 100644 --- a/src/core/process/C_StudentFillGraduationDesignInformation.java +++ b/src/core/process/C_StudentFillGraduationDesignInformation.java @@ -39,7 +39,7 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{ this.graduationDesignId = graduationDesignId; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } diff --git a/src/core/process/C_StudentUploadFinishedProduct.java b/src/core/process/C_StudentUploadFinishedProduct.java index 36068c5..efd36a8 100644 --- a/src/core/process/C_StudentUploadFinishedProduct.java +++ b/src/core/process/C_StudentUploadFinishedProduct.java @@ -10,7 +10,7 @@ import java.util.Map; public class C_StudentUploadFinishedProduct { File finishedProduct; - String gaduationDesignId; + String graduationDesignId; static String file_type = "finished_product"; public void uploadOpeningReport() throws Exception{ @@ -20,13 +20,13 @@ public class C_StudentUploadFinishedProduct { uploadFile.addOptions("file",this.getFinishedProduct()); uploadFile.addOptions("file_type",file_type); Maplimits = new HashMap<>(); - limits.put("id",this.getGaduationDesignId()); + limits.put("id",this.getGraduationDesignId()); uploadFile.addOptions("limits",limits); uploadFile.execute(null); } protected boolean check() { - if(this.getFinishedProduct()==null||this.getGaduationDesignId()==null) + if(this.getFinishedProduct()==null||this.getGraduationDesignId()==null) return false; return true; } @@ -37,12 +37,12 @@ public class C_StudentUploadFinishedProduct { public void setFinishedProduct(File finishedProduct) { this.finishedProduct = finishedProduct; } - public String getGaduationDesignId() { - return gaduationDesignId; + public String getGraduationDesignId() { + return graduationDesignId; } - public void setGaduationDesignId(String gaduationDesignId) { - this.gaduationDesignId = gaduationDesignId; + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; } } diff --git a/src/core/process/C_StudentUploadOpeningReport.java b/src/core/process/C_StudentUploadOpeningReport.java index c2bb813..69c70b3 100644 --- a/src/core/process/C_StudentUploadOpeningReport.java +++ b/src/core/process/C_StudentUploadOpeningReport.java @@ -9,7 +9,7 @@ import java.util.Map; public class C_StudentUploadOpeningReport extends TempProcess{ File openingReport; - String gaduationDesignId; + String graduationDesignId; static String file_type = "opening_report"; @@ -20,13 +20,13 @@ public class C_StudentUploadOpeningReport extends TempProcess{ uploadFileOperation.addOptions("file",this.getOpeningReport()); uploadFileOperation.addOptions("file_type",file_type); Maplimits = new HashMap<>(); - limits.put("id",this.getGaduationDesignId()); + limits.put("id",this.getGraduationDesignId()); uploadFileOperation.addOptions("limits",limits); uploadFileOperation.execute(null); } protected boolean check() { - if(this.getGaduationDesignId()==null||this.getOpeningReport()==null) + if(this.getGraduationDesignId()==null||this.getOpeningReport()==null) return false; return true; } @@ -39,11 +39,11 @@ public class C_StudentUploadOpeningReport extends TempProcess{ this.openingReport = openingReport; } - public String getGaduationDesignId() { - return gaduationDesignId; + public String getGraduationDesignId() { + return graduationDesignId; } - public void setGaduationDesignId(String gaduationDesignId) { - this.gaduationDesignId = gaduationDesignId; + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; } } diff --git a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java index 23d46fa..cc0bf06 100644 --- a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java +++ b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java @@ -43,7 +43,7 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{ this.graduationDesignId = graduationDesignId; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } diff --git a/src/core/process/C_TeacherTeamFillScoreOpinion.java b/src/core/process/C_TeacherTeamFillScoreOpinion.java index bb985cf..e87c937 100644 --- a/src/core/process/C_TeacherTeamFillScoreOpinion.java +++ b/src/core/process/C_TeacherTeamFillScoreOpinion.java @@ -42,7 +42,7 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess { public void setGraduationDesignId(String graduationDesignId) { this.graduationDesignId = graduationDesignId; } - public void setvMap(Map vMap) { + public void setVMap(Map vMap) { this.vMap = vMap; } diff --git a/src/servlet/S_CollegeFillOpeningReportOpinion.java b/src/servlet/S_CollegeFillOpeningReportOpinion.java index e15b6ba..f84de95 100644 --- a/src/servlet/S_CollegeFillOpeningReportOpinion.java +++ b/src/servlet/S_CollegeFillOpeningReportOpinion.java @@ -1,5 +1,7 @@ package servlet; +import core.process.C_CollegeFillOpeningReportOpinion; + import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; @@ -13,7 +15,15 @@ public class S_CollegeFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); Map vMap = servlet.Utils.getVMap(vName,request); - + C_CollegeFillOpeningReportOpinion p =new C_CollegeFillOpeningReportOpinion(); + p.setGraduationDesignId(id); + p.setVMap(vMap); + try { + p.fillInformation(); + } catch (Exception e) { + e.printStackTrace(); + response.sendRedirect("/op_fail.jsp"); + } } static String[] vName = { "college_opinion" diff --git a/src/servlet/S_CollegeFillScoreOpinion.java b/src/servlet/S_CollegeFillScoreOpinion.java index 7b0bdee..f9d9640 100644 --- a/src/servlet/S_CollegeFillScoreOpinion.java +++ b/src/servlet/S_CollegeFillScoreOpinion.java @@ -1,5 +1,7 @@ package servlet; +import core.process.C_CollegeFillScoreOpinion; + import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; @@ -13,6 +15,7 @@ public class S_CollegeFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); Map vMap = servlet.Utils.getVMap(vName,request); + C_CollegeFillScoreOpinion p =new C_CollegeFillScoreOpinion(); } static String[] vName = {