From 42369e5b496e0eff7f2254fdf4fbde442516e15f Mon Sep 17 00:00:00 2001 From: wlf <920607690@qq.com> Date: Mon, 14 Jan 2019 20:45:01 +0800 Subject: [PATCH 01/10] Merge remote-tracking branch 'remotes/origin/wmj' into wlf # Conflicts: # src/core/process/C_StudentUploadOpeningReport.java --- .../Submit/S_StudentUploadOpeningReport.java | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/servlet/Submit/S_StudentUploadOpeningReport.java b/src/servlet/Submit/S_StudentUploadOpeningReport.java index 78afd75..8270f8d 100644 --- a/src/servlet/Submit/S_StudentUploadOpeningReport.java +++ b/src/servlet/Submit/S_StudentUploadOpeningReport.java @@ -1,5 +1,6 @@ package servlet.Submit; +import core.process.C_StudentUploadOpeningReport; import core.user.User; import javax.servlet.ServletException; @@ -9,6 +10,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; +import java.io.File; import java.io.IOException; import java.util.UUID; @@ -19,25 +21,6 @@ public class S_StudentUploadOpeningReport extends HttpServlet { private static final long serialVersionUID = 1L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.doPost(request, response); - User user=(User) request.getSession().getAttribute("user"); - String student_id=user.getId(); - try { - - //获取上传的文件 - Part part=request.getPart("file"); - //获取请求的信息 - String name=part.getHeader("content-disposition"); - //获取上传文件的目录 - String root=request.getServletContext().getRealPath("/upload"); - - - request.setAttribute("info", "上传文件成功"); - } catch (Exception e) { - e.printStackTrace(); - request.setAttribute("info", "上传文件失败"); - } - - request.getRequestDispatcher("/upload.jsp").forward(request, response); } } From d2b9c841e1b1fe3eb049a1d02f32d135eea3d340 Mon Sep 17 00:00:00 2001 From: wan <2499498893@qq.com> Date: Mon, 14 Jan 2019 21:11:07 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml | 1085 +++++++++-------- .idea/misc.xml | 2 +- .../C_CollegeFillOpeningReportOpinion.java | 4 + ... => C_MentorFillOpeningReportOpinion.java} | 2 +- .../process/C_StudentUploadOpeningReport.java | 4 +- 5 files changed, 559 insertions(+), 538 deletions(-) create mode 100644 src/core/process/C_CollegeFillOpeningReportOpinion.java rename src/core/process/{C_TeacherFillTopicInformation.java => C_MentorFillOpeningReportOpinion.java} (96%) diff --git a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml index 3473dc6..dc24536 100644 --- a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml +++ b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml @@ -1,9 +1,9 @@ - + - 10.3.10 - MARIADB + 10.2.18 + MariaDB InnoDB lower/lower @@ -22,2120 +22,2137 @@ utf8_general_ci - latin1_swedish_ci - - utf8_general_ci - + armscii8 0 - + armscii8 1 - + armscii8 0 - + armscii8 0 - + ascii 0 - + ascii 1 - + ascii 0 - + ascii 0 - + big5 0 - + big5 1 - + big5 0 - + big5 0 - + binary 1 - + cp1250 0 - + cp1250 0 - + cp1250 0 - + cp1250 1 - + cp1250 0 - + cp1250 0 - + cp1250 0 - + cp1251 0 - + cp1251 0 - + cp1251 1 - + cp1251 0 - + cp1251 0 - + cp1251 0 - + cp1251 0 - + cp1256 0 - + cp1256 1 - + cp1256 0 - + cp1256 0 - + cp1257 0 - + cp1257 1 - + cp1257 0 - + cp1257 0 - + cp1257 0 - + cp850 0 - + cp850 1 - + cp850 0 - + cp850 0 - + cp852 0 - + cp852 1 - + cp852 0 - + cp852 0 - + cp866 0 - + cp866 1 - + cp866 0 - + cp866 0 - + cp932 0 - + cp932 1 - + cp932 0 - + cp932 0 - + dec8 0 - + dec8 0 - + dec8 1 - + dec8 0 - + eucjpms 0 - + eucjpms 1 - + eucjpms 0 - + eucjpms 0 - + euckr 0 - + euckr 1 - + euckr 0 - + euckr 0 - + gb2312 0 - + gb2312 1 - + gb2312 0 - + gb2312 0 - + gbk 0 - + gbk 1 - + gbk 0 - + gbk 0 - + geostd8 0 - + geostd8 1 - + geostd8 0 - + geostd8 0 - + greek 0 - + greek 1 - + greek 0 - + greek 0 - + hebrew 0 - + hebrew 1 - + hebrew 0 - + hebrew 0 - + hp8 0 - + hp8 1 - + hp8 0 - + hp8 0 - + keybcs2 0 - + keybcs2 1 - + keybcs2 0 - + keybcs2 0 - + koi8r 0 - + koi8r 1 - + koi8r 0 - + koi8r 0 - + koi8u 0 - + koi8u 1 - + koi8u 0 - + koi8u 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 1 - + latin1 0 - + latin2 0 - + latin2 0 - + latin2 0 - + latin2 1 - + latin2 0 - + latin2 0 - + latin2 0 - + latin5 0 - + latin5 0 - + latin5 1 - + latin5 0 - + latin7 0 - + latin7 0 - + latin7 1 - + latin7 0 - + latin7 0 - + latin7 0 - + macce 0 - + macce 1 - + macce 0 - + macce 0 - + macroman 0 - + macroman 1 - + macroman 0 - + macroman 0 - + sjis 0 - + sjis 1 - + sjis 0 - + sjis 0 - + swe7 0 - + swe7 0 - + swe7 1 - + swe7 0 - + tis620 0 - + tis620 0 - + tis620 1 - + tis620 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 1 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ujis 0 - + ujis 1 - + ujis 0 - + ujis 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 1 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16le 0 - + utf16le 1 - + utf16le 0 - + utf16le 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 1 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 1 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 1 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - +
管理员
- +
公告
- +
毕业设计
- +
毕设论文
- +
指导老师评定成绩
- +
评阅老师对论文的评审成绩
- +
毕业设计信息
- +
开题报告
- +
开题报告会纪要
- +
答辩
- +
答辩记录表
- +
开题报告秘书组
- +
开题报告老师组
- +
专业信息
- +
答辩秘书小组
- +
答辩教师组
- +
学生用户
- +
老师用户
- + 1 char(20)|0s 1 normal - + 2 char(255)|0s 1 normal - + 3 char(30)|0s normal - + 4 char(40)|0s normal - + 5 char(20)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 text|0s normal - + 3 text|0s normal - + 4 date|0s normal - + 5 varchar(255)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 4 char(1)|0s normal - + 5 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 int(11)|0s normal - + 3 date|0s normal - + 4 varchar(255)|0s normal - + 5 text|0s normal - + 6 text|0s normal - + 7 text|0s normal - + 8 text|0s normal - + 9 float|0s normal - + 10 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 float|0s normal - + 3 float|0s normal - + 4 float|0s normal - + 5 float|0s normal - + 6 float|0s normal - + 7 float|0s normal - + 8 float|0s normal - + 9 float|0s normal - + 10 float|0s normal - + 11 float|0s normal - + 12 float|0s normal - + 13 float|0s normal - + 14 float|0s normal - + 15 float|0s normal - + 16 float|0s normal - + 17 text|0s normal - + 18 date|0s normal - + 19 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 - float|0s + char(20)|0s normal - + 3 - text|0s + float|0s normal - + 4 - date|0s + text|0s normal - + 5 + date|0s + normal + + + 6 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 varchar(255)|0s normal - + 3 varchar(255)|0s normal - + 4 varchar(255)|0s normal - + 5 varchar(255)|0s normal - + 6 varchar(255)|0s normal - + 7 text|0s normal - + 8 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 date|0s normal - + 3 varchar(255)|0s normal - + 4 varchar(255)|0s normal - + 5 char(20)|0s normal - + 6 char(20)|0s normal - + 7 int(11)|0s normal - + 8 char(1)|0s normal - - 9 - char(1)|0s - normal - - - 10 - char(1)|0s - normal - - - 11 - char(1)|0s - normal - - - 12 - char(1)|0s - normal - - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 - text|0s + char(20)|0s normal - + 3 - date|0s + text|0s normal - + 4 - text|0s + date|0s normal - + 5 - date|0s + text|0s normal - + 6 - text|0s + date|0s normal - + 7 - date|0s + text|0s normal - + 8 - text|0s + date|0s normal - + 9 + text|0s + normal + + + 10 date|0s normal - + + 11 + char(1)|0s + normal + + + 12 + char(1)|0s + normal + + + 13 + char(1)|0s + normal + + + 14 + char(1)|0s + normal + + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 date|0s normal - + 3 varchar(255)|0s normal - + 4 char(20)|0s normal - + 5 char(20)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 - text|0s + char(20)|0s normal - + 3 - date|0s + char(20)|0s normal - + 4 text|0s normal - + 5 date|0s normal - + 6 text|0s normal - + 7 - float|0s + date|0s normal - + 8 - date|0s + text|0s normal - + 9 - text|0s + float|0s normal - + 10 - float|0s + date|0s normal - + 11 - date|0s + text|0s normal - + 12 - text|0s + float|0s normal - + 13 - float|0s + date|0s normal - + 14 - date|0s + text|0s normal - + 15 - char(1)|0s + float|0s normal - + 16 - char(1)|0s + date|0s normal - + 17 char(1)|0s normal - + 18 char(1)|0s normal - + + 19 + char(1)|0s + normal + + + 20 + char(1)|0s + normal + + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_student_id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_teacher_id 1 - + 1 char(8)|0s 1 normal - + 2 varchar(255)|0s normal - + 3 varchar(255)|0s normal - + 4 varchar(255)|0s normal - + 1 profession_code 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_student_id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_teacher_id 1 - + 1 char(20)|0s 1 normal - + 2 char(255)|0s 1 normal - + 3 char(30)|0s normal - + 4 char(40)|0s normal - + 5 char(20)|0s normal - + 6 char(4)|0s normal - + 7 char(8)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(255)|0s 1 normal - + 3 char(30)|0s normal - + 4 char(40)|0s normal - + 5 char(20)|0s normal - + 6 varchar(255)|0s normal - + 7 varchar(255)|0s normal - + 8 char(8)|0s normal - + 1 id 1 diff --git a/.idea/misc.xml b/.idea/misc.xml index 9486b47..df60b67 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/core/process/C_CollegeFillOpeningReportOpinion.java b/src/core/process/C_CollegeFillOpeningReportOpinion.java new file mode 100644 index 0000000..4e93675 --- /dev/null +++ b/src/core/process/C_CollegeFillOpeningReportOpinion.java @@ -0,0 +1,4 @@ +package core.process; + +public class C_CollegeFillOpeningReportOpinion { +} diff --git a/src/core/process/C_TeacherFillTopicInformation.java b/src/core/process/C_MentorFillOpeningReportOpinion.java similarity index 96% rename from src/core/process/C_TeacherFillTopicInformation.java rename to src/core/process/C_MentorFillOpeningReportOpinion.java index 6d72cd4..1db9c1b 100644 --- a/src/core/process/C_TeacherFillTopicInformation.java +++ b/src/core/process/C_MentorFillOpeningReportOpinion.java @@ -7,7 +7,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; -public class C_TeacherFillTopicInformation extends TempProcess{ +public class C_MentorFillOpeningReportOpinion extends TempProcess{ String StudentId; String mentor_opinion; diff --git a/src/core/process/C_StudentUploadOpeningReport.java b/src/core/process/C_StudentUploadOpeningReport.java index 88ed26e..c2bb813 100644 --- a/src/core/process/C_StudentUploadOpeningReport.java +++ b/src/core/process/C_StudentUploadOpeningReport.java @@ -1,6 +1,6 @@ package core.process; -import core.operation.UploadFileOperation; +import core.operation.UploadFile; import error.GExcptInit; import java.io.File; @@ -15,7 +15,7 @@ public class C_StudentUploadOpeningReport extends TempProcess{ public void uploadOpeningReport() throws Exception{ if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!"); - UploadFileOperation uploadFileOperation=new UploadFileOperation(); + UploadFile uploadFileOperation=new UploadFile(); uploadFileOperation.setOptions(new HashMap<>()); uploadFileOperation.addOptions("file",this.getOpeningReport()); uploadFileOperation.addOptions("file_type",file_type); From 687ce0df5bd7b4a0e6f26a9dbe5d932315cd007c Mon Sep 17 00:00:00 2001 From: wlf <920607690@qq.com> Date: Mon, 14 Jan 2019 21:11:54 +0800 Subject: [PATCH 03/10] Merge remote-tracking branch 'remotes/origin/wmj' into wlf # Conflicts: # src/core/process/C_StudentUploadOpeningReport.java --- .idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 9486b47..df60b67 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file From b3317a285026cd57f04414c9df6302eefc3bc572 Mon Sep 17 00:00:00 2001 From: wlf <920607690@qq.com> Date: Mon, 14 Jan 2019 23:35:36 +0800 Subject: [PATCH 04/10] Merge remote-tracking branch 'remotes/origin/wmj' into wlf # Conflicts: # src/core/process/C_StudentUploadOpeningReport.java --- src/core/process/C_MentorFillReview.java | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/core/process/C_MentorFillReview.java diff --git a/src/core/process/C_MentorFillReview.java b/src/core/process/C_MentorFillReview.java new file mode 100644 index 0000000..d9a3128 --- /dev/null +++ b/src/core/process/C_MentorFillReview.java @@ -0,0 +1,58 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_MentorFillReview extends TempProcess { + public String teacherID; + public String teacher_opinion; + public Map vMap; + + static String table="graduation_design_finished_product_mentor_score"; + public String getTeacher_opinion() { + return teacher_opinion; + } + public void setTeacher_opinion(String teacher_opinion) { + this.teacher_opinion = teacher_opinion; + } + public String getTeacherID() { + return teacherID; + } + public void setTeacherID(String teacherID) { + this.teacherID = teacherID; + } + public Map getvMap() { + return vMap; + } + public void setvMap(Map vMap) { + this.vMap = vMap; + } + public void TeacherTeamFillOpeningReportOpinion() throws Exception{ + if(!check()) throw new GExcptInit("MentorFillReview 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("review_opinion_date",date); + Maplimits = new HashMap<>(); + limits.put("id",this.getTeacherID()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + + + @Override + protected boolean check() { + if(this.getTeacherID().equals(null)||this.getTeacher_opinion().equals(null)||this.getvMap().equals(null)) + return false; + else + return true; + } +} + From 8a5678029cc36116efdafbf8005da60eb866a7a4 Mon Sep 17 00:00:00 2001 From: zhai_lw Date: Mon, 14 Jan 2019 23:47:22 +0800 Subject: [PATCH 05/10] =?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/core/operation/UploadFile.java | 8 +--- src/core/operation/UploadFile.json | 2 +- src/core/operation/utils/Utils.java | 15 ------- ...tudentFillGraduationDesignInformation.java | 2 - .../S_StudentUploadFinishedProduct.java | 6 ++- src/servlet/S_StudentUploadOpeningReport.java | 26 ++---------- src/servlet/Utils.java | 42 +++++++++++++++++++ 7 files changed, 51 insertions(+), 50 deletions(-) diff --git a/src/core/operation/UploadFile.java b/src/core/operation/UploadFile.java index b75dcfa..75c76cb 100644 --- a/src/core/operation/UploadFile.java +++ b/src/core/operation/UploadFile.java @@ -14,18 +14,12 @@ import java.util.Map; public class UploadFile extends Operation { @Override public Map execute(User subject) throws Exception { - File file = (File) this.getOptions().get("file"); String table = (String) this.getOptions().get("file_type"); Map limits = (Map) this.getOptions().get("limits"); - String field = core.operation.utils.Utils.getFileField(table); - String filePath = core.operation.utils.Utils.getFilePathName(table,file.getName()); + String filePath = (String) this.getOptions().get("file_url"); Map vMap = new HashMap<>(); vMap.put(field,filePath); - - file.renameTo(new File(filePath)); - //todo - List ls = new ArrayList<>(); ls.add(field); List resultLs = DBManagement.select(ls,table,limits,0,1); diff --git a/src/core/operation/UploadFile.json b/src/core/operation/UploadFile.json index c2a2f65..0181176 100644 --- a/src/core/operation/UploadFile.json +++ b/src/core/operation/UploadFile.json @@ -1,6 +1,6 @@ { "options":{ - "file": "File", + "file_url": "String", "file_type": "String", "limits":"Map" }, diff --git a/src/core/operation/utils/Utils.java b/src/core/operation/utils/Utils.java index 217e8be..6b09955 100644 --- a/src/core/operation/utils/Utils.java +++ b/src/core/operation/utils/Utils.java @@ -35,19 +35,4 @@ public interface Utils { static String getFileField(String table){ return fileTableField.get(table); } - static String getFilePath(String table){ - return Configuration.filePath+table+"/"; - } - static String getFileName(String fileName){ - SimpleDateFormat simpleDateFormat; - simpleDateFormat = new SimpleDateFormat("yyMMddHHmmssSSS"); - Date date = new Date(); - String str = simpleDateFormat.format(date); - str+=(int)(Math.random()*100000); - str+= utils.Utils.getFileType(fileName); - return str; - } - static String getFilePathName(String table, String fileName){ - return getFilePath(table)+getFileName(fileName); - } } diff --git a/src/servlet/S_StudentFillGraduationDesignInformation.java b/src/servlet/S_StudentFillGraduationDesignInformation.java index d91779c..9838562 100644 --- a/src/servlet/S_StudentFillGraduationDesignInformation.java +++ b/src/servlet/S_StudentFillGraduationDesignInformation.java @@ -1,7 +1,5 @@ package servlet; -import core.user.User; - import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; diff --git a/src/servlet/S_StudentUploadFinishedProduct.java b/src/servlet/S_StudentUploadFinishedProduct.java index 9eaec19..266671c 100644 --- a/src/servlet/S_StudentUploadFinishedProduct.java +++ b/src/servlet/S_StudentUploadFinishedProduct.java @@ -8,10 +8,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -@WebServlet(name = "student-upload-finished-product") +@WebServlet("/student-upload-finished-product") @MultipartConfig 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 = request.getParameter("id"); + String fileURL = servlet.Utils.saveFile(request, fileType); } } diff --git a/src/servlet/S_StudentUploadOpeningReport.java b/src/servlet/S_StudentUploadOpeningReport.java index df0f052..4102e91 100644 --- a/src/servlet/S_StudentUploadOpeningReport.java +++ b/src/servlet/S_StudentUploadOpeningReport.java @@ -14,30 +14,10 @@ import java.util.UUID; @WebServlet("/student-upload-opening-report") @MultipartConfig -//学生id+文件 public class S_StudentUploadOpeningReport extends HttpServlet { - private static final long serialVersionUID = 1L; + static String fileType = "graduation_design_opening_report"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - super.doPost(request, response); - User user=(User) request.getSession().getAttribute("user"); - String student_id=user.getId(); - - try { - - //获取上传的文件 - Part part=request.getPart("file"); - //获取请求的信息 - String name=part.getHeader("content-disposition"); - //获取上传文件的目录 - String root=request.getServletContext().getRealPath("/upload"); - - - request.setAttribute("info", "上传文件成功"); - } catch (Exception e) { - e.printStackTrace(); - request.setAttribute("info", "上传文件失败"); - } - - request.getRequestDispatcher("/upload.jsp").forward(request, response); + String id = request.getParameter("id"); + String fileURL = servlet.Utils.saveFile(request, fileType); } } diff --git a/src/servlet/Utils.java b/src/servlet/Utils.java index 7176796..687b7e9 100644 --- a/src/servlet/Utils.java +++ b/src/servlet/Utils.java @@ -1,8 +1,17 @@ package servlet; +import gdms.Configuration; import org.apache.coyote.Request; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.Part; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -15,4 +24,37 @@ public interface Utils { } return vMap; } + static String getFilePath(String table){ + return Configuration.filePath+table+"/"; + } + static String getFileName(String fileName){ + SimpleDateFormat simpleDateFormat; + simpleDateFormat = new SimpleDateFormat("yyMMddHHmmssSSS"); + Date date = new Date(); + String str = simpleDateFormat.format(date); + str+=(int)(Math.random()*100000); + str+= utils.Utils.getFileType(fileName); + return str; + } + static String getFilePathName(String table, String fileName){ + return getFilePath(table)+getFileName(fileName); + } + static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException { + Part part = request.getPart("graduation_design"); + String header = part.getHeader("content-disposition"); + String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1); + String filePathName = servlet.Utils.getFilePathName(table,path); + File file = new File(filePathName); + InputStream inputStream = part.getInputStream(); + FileOutputStream outputStream = new FileOutputStream(file); + int len; + byte[] bytes = new byte[1024]; + while ((len = inputStream.read(bytes)) != -1) { + outputStream.write(bytes, 0, len); + } + outputStream.close(); + inputStream.close(); + part.delete(); + return filePathName; + } } From ad2cb3d81fa36fe9ed9fd86ba3dcc3dedc368cab Mon Sep 17 00:00:00 2001 From: wan <2499498893@qq.com> Date: Mon, 14 Jan 2019 23:55:00 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../C_CollegeFillOpeningReportOpinion.java | 54 ++++++++++++++++++- .../process/C_CollegeFillScoreOpinion.java | 37 +++++++++++++ .../C_MentorFillOpeningReportOpinion.java | 19 +++---- .../process/C_SchoolFillScoreOpinion.java | 53 ++++++++++++++++++ .../C_SecretaryFillOpeningReportOpinion.java | 50 +++++++++++++++++ .../process/C_SecretaryFillReplyRecord.java | 51 ++++++++++++++++++ ...tudentFillGraduationDesignInformation.java | 47 ++++++++++++++++ .../C_StudentUploadFinishedProduct.java | 48 +++++++++++++++++ ...C_TeacherTeamFillOpeningReportOpinion.java | 50 +++++++++++++++++ .../C_TeacherTeamFillScoreOpinion.java | 49 +++++++++++++++++ 10 files changed, 445 insertions(+), 13 deletions(-) create mode 100644 src/core/process/C_CollegeFillScoreOpinion.java create mode 100644 src/core/process/C_SchoolFillScoreOpinion.java create mode 100644 src/core/process/C_SecretaryFillOpeningReportOpinion.java create mode 100644 src/core/process/C_SecretaryFillReplyRecord.java create mode 100644 src/core/process/C_StudentFillGraduationDesignInformation.java create mode 100644 src/core/process/C_StudentUploadFinishedProduct.java create mode 100644 src/core/process/C_TeacherTeamFillOpeningReportOpinion.java create mode 100644 src/core/process/C_TeacherTeamFillScoreOpinion.java diff --git a/src/core/process/C_CollegeFillOpeningReportOpinion.java b/src/core/process/C_CollegeFillOpeningReportOpinion.java index 4e93675..ca233fe 100644 --- a/src/core/process/C_CollegeFillOpeningReportOpinion.java +++ b/src/core/process/C_CollegeFillOpeningReportOpinion.java @@ -1,4 +1,56 @@ package core.process; -public class C_CollegeFillOpeningReportOpinion { +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +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"; + + public void fillInformation() throws Exception { + 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("college_opinion_date",date); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + protected boolean check() { + if(this.getOpening_report_college_teacher_id()==null||this.getGraduationDesignId()==null) + return false; + return true; + } + public String getGraduationDesignId() { + return graduationDesignId; + } + + public void setGraduationDesignId(String graduationDesignId) { + 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) { + this.vMap = vMap; + } + } diff --git a/src/core/process/C_CollegeFillScoreOpinion.java b/src/core/process/C_CollegeFillScoreOpinion.java new file mode 100644 index 0000000..a3fafe8 --- /dev/null +++ b/src/core/process/C_CollegeFillScoreOpinion.java @@ -0,0 +1,37 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_CollegeFillScoreOpinion extends TempProcess{ + + String graduationDesignId; + Map vMap; + + static String table="graduation_design_reply_opinion_record_score"; + + public void fillInformation() throws Exception{ + if(!check()) throw new GExcptInit("FillInformations 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); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } +} diff --git a/src/core/process/C_MentorFillOpeningReportOpinion.java b/src/core/process/C_MentorFillOpeningReportOpinion.java index 1db9c1b..d88329c 100644 --- a/src/core/process/C_MentorFillOpeningReportOpinion.java +++ b/src/core/process/C_MentorFillOpeningReportOpinion.java @@ -3,6 +3,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -11,7 +12,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ String StudentId; String mentor_opinion; - Date mentor_opinion_date; + Map vMap; static String table="graduation_design_opening_report_opinion_record"; @@ -20,10 +21,9 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ FillInformation fillInformation=new FillInformation(); fillInformation.setOptions(new HashMap<>()); fillInformation.addOptions("table",table); - String date= mentor_opinion_date.toString(); - Map vMap=new HashMap<>(); + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss"); + String date=df.format(new Date()); vMap.put("mentor_opinion_date",date); - vMap.put("mentor_opinion",this.getMentor_opinion()); Maplimits = new HashMap<>(); limits.put("id",this.getStudentId()); fillInformation.addOptions("limits",limits); @@ -31,7 +31,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ } protected boolean check() { - if(this.getMentor_opinion()==null||this.getMentor_opinion_date()==null||this.getStudentId()==null) + if(this.getMentor_opinion()==null||this.getStudentId()==null) return false; return true; } @@ -50,12 +50,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ this.mentor_opinion = mentor_opinion; } - public Date getMentor_opinion_date() { - return mentor_opinion_date; + public void setvMap(Map vMap) { + this.vMap = vMap; } - - public void setMentor_opinion_date(Date mentor_opinion_date) { - this.mentor_opinion_date = mentor_opinion_date; - } - } diff --git a/src/core/process/C_SchoolFillScoreOpinion.java b/src/core/process/C_SchoolFillScoreOpinion.java new file mode 100644 index 0000000..b1ec92d --- /dev/null +++ b/src/core/process/C_SchoolFillScoreOpinion.java @@ -0,0 +1,53 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_SchoolFillScoreOpinion extends TempProcess { + + String graduationDesignId; + Map vMap; + + static String table="graduation_design_reply_opinion_record_score"; + public void fillInformation() throws Exception{ + 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("school_opinion_date",date); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } + @Override + public String getGraduationDesignId() { + return graduationDesignId; + } + + @Override + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; + } + public void setvMap(Map vMap) { + this.vMap = vMap; + } + +} + + + + + diff --git a/src/core/process/C_SecretaryFillOpeningReportOpinion.java b/src/core/process/C_SecretaryFillOpeningReportOpinion.java new file mode 100644 index 0000000..f97258f --- /dev/null +++ b/src/core/process/C_SecretaryFillOpeningReportOpinion.java @@ -0,0 +1,50 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_SecretaryFillOpeningReportOpinion extends TempProcess{ + + String graduationDesignId; + Map vMap; + + static String table="graduation_design_opening_report_opinion_record"; + + public void fillInformation() throws Exception{ + 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); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } + @Override + public String getGraduationDesignId() { + return graduationDesignId; + } + + @Override + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; + } + + public void setvMap(Map vMap) { + this.vMap = vMap; + } + +} diff --git a/src/core/process/C_SecretaryFillReplyRecord.java b/src/core/process/C_SecretaryFillReplyRecord.java new file mode 100644 index 0000000..172b0aa --- /dev/null +++ b/src/core/process/C_SecretaryFillReplyRecord.java @@ -0,0 +1,51 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_SecretaryFillReplyRecord extends TempProcess{ + + String graduationDesignId; + Map vMap; + + static String table="graduation_design_reply_opinion_record_score"; + + public void fillInformation() throws Exception{ + if(!check()) throw new GExcptInit("FillInformations 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); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } + public String getGraduationDesignId() { + return graduationDesignId; + } + @Override + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; + } + + public void setvMap(Map vMap) { + this.vMap = vMap; + } + + + +} diff --git a/src/core/process/C_StudentFillGraduationDesignInformation.java b/src/core/process/C_StudentFillGraduationDesignInformation.java new file mode 100644 index 0000000..5a7c5e5 --- /dev/null +++ b/src/core/process/C_StudentFillGraduationDesignInformation.java @@ -0,0 +1,47 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_StudentFillGraduationDesignInformation extends TempProcess{ + String graduationDesignId; + Map vMap; + + static String table="graduation_design_opening_report_opinion_record"; + + public void fillInformation() throws Exception{ + if(!check()) throw new GExcptInit("FillInformation Attrs init error!"); + FillInformation fillInformation=new FillInformation(); + fillInformation.setOptions(new HashMap<>()); + fillInformation.addOptions("table",table); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } + @Override + public String getGraduationDesignId() { + return graduationDesignId; + } + + @Override + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; + } + + public void setvMap(Map vMap) { + this.vMap = vMap; + } + + +} \ No newline at end of file diff --git a/src/core/process/C_StudentUploadFinishedProduct.java b/src/core/process/C_StudentUploadFinishedProduct.java new file mode 100644 index 0000000..36068c5 --- /dev/null +++ b/src/core/process/C_StudentUploadFinishedProduct.java @@ -0,0 +1,48 @@ +package core.process; + +import core.operation.UploadFile; +import error.GExcptInit; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +public class C_StudentUploadFinishedProduct { + + File finishedProduct; + String gaduationDesignId; + + static String file_type = "finished_product"; + public void uploadOpeningReport() throws Exception{ + if(!check()) throw new GExcptInit("Upload FinishedProduct Attrs init error!"); + UploadFile uploadFile=new UploadFile(); + uploadFile.setOptions(new HashMap<>()); + uploadFile.addOptions("file",this.getFinishedProduct()); + uploadFile.addOptions("file_type",file_type); + Maplimits = new HashMap<>(); + limits.put("id",this.getGaduationDesignId()); + uploadFile.addOptions("limits",limits); + uploadFile.execute(null); + } + + protected boolean check() { + if(this.getFinishedProduct()==null||this.getGaduationDesignId()==null) + return false; + return true; + } + public File getFinishedProduct() { + return finishedProduct; + } + + public void setFinishedProduct(File finishedProduct) { + this.finishedProduct = finishedProduct; + } + public String getGaduationDesignId() { + return gaduationDesignId; + } + + public void setGaduationDesignId(String gaduationDesignId) { + this.gaduationDesignId = gaduationDesignId; + } + +} diff --git a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java new file mode 100644 index 0000000..23d46fa --- /dev/null +++ b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java @@ -0,0 +1,50 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{ + + String graduationDesignId; + Map vMap; + + static String table="graduation_design_opening_report_opinion_record"; + + public void fillInformation() throws Exception{ + 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("report_teacher_team_opinion_date",date); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } + @Override + public String getGraduationDesignId() { + return graduationDesignId; + } + + @Override + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; + } + + public void setvMap(Map vMap) { + this.vMap = vMap; + } + +} diff --git a/src/core/process/C_TeacherTeamFillScoreOpinion.java b/src/core/process/C_TeacherTeamFillScoreOpinion.java new file mode 100644 index 0000000..bb985cf --- /dev/null +++ b/src/core/process/C_TeacherTeamFillScoreOpinion.java @@ -0,0 +1,49 @@ +package core.process; + +import core.operation.FillInformation; +import error.GExcptInit; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +public class C_TeacherTeamFillScoreOpinion extends TempProcess { + + String graduationDesignId; + Map vMap; + + static String table="graduation_design_reply_opinion_record_score"; + + public void fillInformation() throws Exception{ + 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("teacher_team_opinion_date",date); + Maplimits = new HashMap<>(); + limits.put("id",this.getGraduationDesignId()); + fillInformation.addOptions("limits",limits); + fillInformation.execute(null); + } + protected boolean check() { + if(this.getGraduationDesignId()==null) + return false; + return true; + } + @Override + public String getGraduationDesignId() { + return graduationDesignId; + } + + @Override + public void setGraduationDesignId(String graduationDesignId) { + this.graduationDesignId = graduationDesignId; + } + public void setvMap(Map vMap) { + this.vMap = vMap; + } + +} From bdbdab5947541220d15dd425007185deb35f6a5d Mon Sep 17 00:00:00 2001 From: wan <2499498893@qq.com> Date: Tue, 15 Jan 2019 00:11:34 +0800 Subject: [PATCH 07/10] Merge remote-tracking branch 'origin/master' # Conflicts: # .idea/misc.xml # src/core/process/C_StudentUploadOpeningReport.java --- .idea/artifacts/GDMS_war_exploded.xml | 2 +- .idea/misc.xml | 2 +- GDMS.iml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.idea/artifacts/GDMS_war_exploded.xml b/.idea/artifacts/GDMS_war_exploded.xml index 95189d4..1d55d9c 100644 --- a/.idea/artifacts/GDMS_war_exploded.xml +++ b/.idea/artifacts/GDMS_war_exploded.xml @@ -8,8 +8,8 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index 9486b47..df60b67 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/GDMS.iml b/GDMS.iml index b6ef183..20dda90 100644 --- a/GDMS.iml +++ b/GDMS.iml @@ -19,8 +19,8 @@ - - - + + + \ No newline at end of file From 49e397a08a705ff47d6c5cd8bbbdd42a92f59c4b Mon Sep 17 00:00:00 2001 From: zhai_lw Date: Tue, 15 Jan 2019 00:14:20 +0800 Subject: [PATCH 08/10] =?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 09/10] =?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 = { From c63578ca78ed2d7a8b2d6aa1ae6159b0ba54e5ff Mon Sep 17 00:00:00 2001 From: zhai_lw Date: Tue, 15 Jan 2019 09:38:20 +0800 Subject: [PATCH 10/10] =?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 --- .../356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml | 993 +++++++++--------- .idea/misc.xml | 2 +- .../process/C_CollegeFillScoreOpinion.java | 8 + .../C_MentorFillOpeningReportOpinion.java | 25 +- src/servlet/S_CollegeFillScoreOpinion.java | 9 +- .../S_MentorFillOpeningReportOpinion.java | 12 +- 6 files changed, 532 insertions(+), 517 deletions(-) diff --git a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml index dc24536..fbbe276 100644 --- a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml +++ b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml @@ -2,7 +2,7 @@ - 10.2.18 + 10.3.10 MariaDB InnoDB lower/lower @@ -22,2137 +22,2140 @@ utf8_general_ci + latin1_swedish_ci + + utf8_general_ci - + armscii8 0 - + armscii8 1 - + armscii8 0 - + armscii8 0 - + ascii 0 - + ascii 1 - + ascii 0 - + ascii 0 - + big5 0 - + big5 1 - + big5 0 - + big5 0 - + binary 1 - + cp1250 0 - + cp1250 0 - + cp1250 0 - + cp1250 1 - + cp1250 0 - + cp1250 0 - + cp1250 0 - + cp1251 0 - + cp1251 0 - + cp1251 1 - + cp1251 0 - + cp1251 0 - + cp1251 0 - + cp1251 0 - + cp1256 0 - + cp1256 1 - + cp1256 0 - + cp1256 0 - + cp1257 0 - + cp1257 1 - + cp1257 0 - + cp1257 0 - + cp1257 0 - + cp850 0 - + cp850 1 - + cp850 0 - + cp850 0 - + cp852 0 - + cp852 1 - + cp852 0 - + cp852 0 - + cp866 0 - + cp866 1 - + cp866 0 - + cp866 0 - + cp932 0 - + cp932 1 - + cp932 0 - + cp932 0 - + dec8 0 - + dec8 0 - + dec8 1 - + dec8 0 - + eucjpms 0 - + eucjpms 1 - + eucjpms 0 - + eucjpms 0 - + euckr 0 - + euckr 1 - + euckr 0 - + euckr 0 - + gb2312 0 - + gb2312 1 - + gb2312 0 - + gb2312 0 - + gbk 0 - + gbk 1 - + gbk 0 - + gbk 0 - + geostd8 0 - + geostd8 1 - + geostd8 0 - + geostd8 0 - + greek 0 - + greek 1 - + greek 0 - + greek 0 - + hebrew 0 - + hebrew 1 - + hebrew 0 - + hebrew 0 - + hp8 0 - + hp8 1 - + hp8 0 - + hp8 0 - + keybcs2 0 - + keybcs2 1 - + keybcs2 0 - + keybcs2 0 - + koi8r 0 - + koi8r 1 - + koi8r 0 - + koi8r 0 - + koi8u 0 - + koi8u 1 - + koi8u 0 - + koi8u 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 0 - + latin1 1 - + latin1 0 - + latin2 0 - + latin2 0 - + latin2 0 - + latin2 1 - + latin2 0 - + latin2 0 - + latin2 0 - + latin5 0 - + latin5 0 - + latin5 1 - + latin5 0 - + latin7 0 - + latin7 0 - + latin7 1 - + latin7 0 - + latin7 0 - + latin7 0 - + macce 0 - + macce 1 - + macce 0 - + macce 0 - + macroman 0 - + macroman 1 - + macroman 0 - + macroman 0 - + sjis 0 - + sjis 1 - + sjis 0 - + sjis 0 - + swe7 0 - + swe7 0 - + swe7 1 - + swe7 0 - + tis620 0 - + tis620 0 - + tis620 1 - + tis620 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 1 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ucs2 0 - + ujis 0 - + ujis 1 - + ujis 0 - + ujis 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 1 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16 0 - + utf16le 0 - + utf16le 1 - + utf16le 0 - + utf16le 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 1 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf32 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 1 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 1 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - + utf8mb4 0 - +
管理员
- +
公告
- +
毕业设计
- +
毕设论文
- +
指导老师评定成绩
- +
评阅老师对论文的评审成绩
- +
毕业设计信息
- +
开题报告
- +
开题报告会纪要
- +
答辩
- +
答辩记录表
- +
开题报告秘书组
- +
开题报告老师组
- +
专业信息
- +
答辩秘书小组
- +
答辩教师组
- +
学生用户
- +
老师用户
- + 1 char(20)|0s 1 normal - + 2 char(255)|0s 1 normal - + 3 char(30)|0s normal - + 4 char(40)|0s normal - + 5 char(20)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 text|0s normal - + 3 text|0s normal - + 4 date|0s normal - + 5 varchar(255)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 4 char(1)|0s normal - + 5 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 int(11)|0s normal - + 3 date|0s normal - + 4 varchar(255)|0s normal - + 5 text|0s normal - + 6 text|0s normal - + 7 text|0s normal - + 8 text|0s normal - + 9 float|0s normal - + 10 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 float|0s normal - + 3 float|0s normal - + 4 float|0s normal - + 5 float|0s normal - + 6 float|0s normal - + 7 float|0s normal - + 8 float|0s normal - + 9 float|0s normal - + 10 float|0s normal - + 11 float|0s normal - + 12 float|0s normal - + 13 float|0s normal - + 14 float|0s normal - + 15 float|0s normal - + 16 float|0s normal - + 17 text|0s normal - + 18 date|0s normal - + 19 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 float|0s normal - + 4 text|0s normal - + 5 date|0s normal - + 6 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 varchar(255)|0s normal - + 3 varchar(255)|0s normal - + 4 varchar(255)|0s normal - + 5 varchar(255)|0s normal - + 6 varchar(255)|0s normal - + 7 text|0s normal - + 8 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 date|0s normal - + 3 varchar(255)|0s normal - + 4 varchar(255)|0s normal - + 5 char(20)|0s normal - + 6 char(20)|0s normal - + 7 int(11)|0s normal - + 8 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 text|0s normal - + 4 date|0s normal - + 5 text|0s normal - + 6 date|0s normal - + 7 text|0s normal - + 8 date|0s normal - + 9 text|0s normal - + 10 date|0s normal - + 11 char(1)|0s normal - + 12 char(1)|0s normal - + 13 char(1)|0s normal - + 14 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 date|0s normal - + 3 varchar(255)|0s normal - + 4 char(20)|0s normal - + 5 char(20)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 4 text|0s normal - + 5 date|0s normal - + 6 text|0s normal - + 7 date|0s normal - + 8 text|0s normal - + 9 float|0s normal - + 10 date|0s normal - + 11 text|0s normal - + 12 float|0s normal - + 13 date|0s normal - + 14 text|0s normal - + 15 float|0s normal - + 16 date|0s normal - + 17 char(1)|0s normal - + 18 char(1)|0s normal - + 19 char(1)|0s normal - + 20 char(1)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_student_id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_teacher_id 1 - + 1 char(8)|0s 1 normal - + 2 varchar(255)|0s normal - + 3 varchar(255)|0s normal - + 4 varchar(255)|0s normal - + 1 profession_code 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_student_id 1 - + 1 char(20)|0s 1 normal - + 2 char(20)|0s normal - + 3 char(20)|0s normal - + 1 leader_teacher_id 1 - + 1 char(20)|0s 1 normal - + 2 char(255)|0s 1 normal - + 3 char(30)|0s normal - + 4 char(40)|0s normal - + 5 char(20)|0s normal - + 6 char(4)|0s normal - + 7 char(8)|0s normal - + 1 id 1 - + 1 char(20)|0s 1 normal - + 2 char(255)|0s 1 normal - + 3 char(30)|0s normal - + 4 char(40)|0s normal - + 5 char(20)|0s normal - + 6 varchar(255)|0s normal - + 7 varchar(255)|0s normal - + 8 char(8)|0s normal - + 1 id 1 diff --git a/.idea/misc.xml b/.idea/misc.xml index df60b67..9486b47 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/core/process/C_CollegeFillScoreOpinion.java b/src/core/process/C_CollegeFillScoreOpinion.java index 97b1fbd..96e4e7d 100644 --- a/src/core/process/C_CollegeFillScoreOpinion.java +++ b/src/core/process/C_CollegeFillScoreOpinion.java @@ -34,4 +34,12 @@ public class C_CollegeFillScoreOpinion extends TempProcess{ return false; return true; } + + public Map getVMap() { + return vMap; + } + + public void setVMap(Map vMap) { + this.vMap = vMap; + } } diff --git a/src/core/process/C_MentorFillOpeningReportOpinion.java b/src/core/process/C_MentorFillOpeningReportOpinion.java index 99bc66d..139904e 100644 --- a/src/core/process/C_MentorFillOpeningReportOpinion.java +++ b/src/core/process/C_MentorFillOpeningReportOpinion.java @@ -10,8 +10,6 @@ import java.util.Map; public class C_MentorFillOpeningReportOpinion extends TempProcess{ - String studentId; - String mentor_opinion; Map vMap; static String table="graduation_design_opening_report_opinion_record"; @@ -25,32 +23,21 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ String date=df.format(new Date()); vMap.put("mentor_opinion_date",date); Maplimits = new HashMap<>(); - limits.put("id",this.getStudentId()); + limits.put("id",this.getGraduationDesignId()); fillInformation.addOptions("limits",limits); fillInformation.execute(null); } protected boolean check() { - if(this.getMentor_opinion()==null||this.getStudentId()==null) + if(this.getVMap()==null||this.getGraduationDesignId()==null) return false; return true; } - public String getStudentId() { - return studentId; - } - - public void setStudentId(String studentId) { - this.studentId = studentId; - } - public String getMentor_opinion() { - return mentor_opinion; - } - - public void setMentor_opinion(String mentor_opinion) { - this.mentor_opinion = mentor_opinion; - } - public void setVMap(Map vMap) { this.vMap = vMap; } + + public Map getVMap() { + return vMap; + } } diff --git a/src/servlet/S_CollegeFillScoreOpinion.java b/src/servlet/S_CollegeFillScoreOpinion.java index f9d9640..b66ec58 100644 --- a/src/servlet/S_CollegeFillScoreOpinion.java +++ b/src/servlet/S_CollegeFillScoreOpinion.java @@ -16,7 +16,14 @@ public class S_CollegeFillScoreOpinion extends HttpServlet { String id = request.getParameter("id"); Map vMap = servlet.Utils.getVMap(vName,request); C_CollegeFillScoreOpinion p =new C_CollegeFillScoreOpinion(); - + 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_MentorFillOpeningReportOpinion.java b/src/servlet/S_MentorFillOpeningReportOpinion.java index 299165d..588215b 100644 --- a/src/servlet/S_MentorFillOpeningReportOpinion.java +++ b/src/servlet/S_MentorFillOpeningReportOpinion.java @@ -1,5 +1,7 @@ package servlet; +import core.process.C_MentorFillOpeningReportOpinion; + import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; @@ -13,7 +15,15 @@ public class S_MentorFillOpeningReportOpinion 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_MentorFillOpeningReportOpinion p = new C_MentorFillOpeningReportOpinion(); + p.setGraduationDesignId(id); + p.setVMap(vMap); + try { + p.fillInformation(); + } catch (Exception e) { + e.printStackTrace(); + response.sendRedirect("/op_fail.jsp"); + } } static String[] vName = { "mentor_opinion"