From 78666e3a4189ee112428bdd0c693b79f67c85311 Mon Sep 17 00:00:00 2001 From: zhai_lw Date: Tue, 15 Jan 2019 23:16:23 +0800 Subject: [PATCH] rewrite Process --- .../C_CollegeFillOpeningReportOpinion.java | 20 ++++++ .../process/C_CollegeFillScoreOpinion.java | 20 ++++++ .../C_MentorFillOpeningReportOpinion.java | 20 ++++++ src/core/process/C_MentorFillReview.java | 21 +++++++ src/core/process/C_ReviewerFillReview.java | 20 ++++++ .../process/C_SchoolFillScoreOpinion.java | 20 ++++++ .../C_SecretaryFillOpeningReportRecord.java | 20 ++++++ .../process/C_SecretaryFillReplyRecord.java | 20 ++++++ ...tudentFillGraduationDesignInformation.java | 20 ++++++ src/core/process/C_StudentSearchTeacher.java | 23 +++++++ src/core/process/C_StudentSelectTeacher.java | 20 ++++++ .../C_StudentUploadFinishedProduct.java | 20 ++++++ .../process/C_StudentUploadOpeningReport.java | 21 +++++++ src/core/process/C_TeacherSearchStudent.java | 23 +++++++ src/core/process/C_TeacherSelectStudent.java | 19 ++++++ ...C_TeacherTeamFillOpeningReportOpinion.java | 20 ++++++ .../C_TeacherTeamFillScoreOpinion.java | 22 +++++++ src/core/process/Process.java | 30 ++------- src/dao/DBManagement.java | 4 ++ src/gdms/GDMS.java | 61 ++++++++++++++++--- src/gdms/GlobalTimePoint.json | 2 +- 21 files changed, 414 insertions(+), 32 deletions(-) diff --git a/src/core/process/C_CollegeFillOpeningReportOpinion.java b/src/core/process/C_CollegeFillOpeningReportOpinion.java index 0bcfad0..59cc42b 100644 --- a/src/core/process/C_CollegeFillOpeningReportOpinion.java +++ b/src/core/process/C_CollegeFillOpeningReportOpinion.java @@ -14,6 +14,7 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{ protected static String buttonName ="学院开题意见"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/college-fill-opening-report-opinion"; + protected static String info = ""; static String table="graduation_design_opening_report_opinion_record"; @@ -50,4 +51,23 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{ public Map getVMap() { return vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_CollegeFillScoreOpinion.java b/src/core/process/C_CollegeFillScoreOpinion.java index e37ca3a..73f2eb8 100644 --- a/src/core/process/C_CollegeFillScoreOpinion.java +++ b/src/core/process/C_CollegeFillScoreOpinion.java @@ -16,6 +16,7 @@ public class C_CollegeFillScoreOpinion extends TempProcess{ protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/college-fill-score-opinion"; static String table="graduation_design_reply_opinion_record_score"; + protected static String info = ""; public void fillInformation() throws Exception{ if(!check()) throw new GExcptInit("FillInformation Attrs Init error!"); @@ -44,4 +45,23 @@ public class C_CollegeFillScoreOpinion extends TempProcess{ public void setVMap(Map vMap) { this.vMap = vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_MentorFillOpeningReportOpinion.java b/src/core/process/C_MentorFillOpeningReportOpinion.java index c1e42e6..06b4933 100644 --- a/src/core/process/C_MentorFillOpeningReportOpinion.java +++ b/src/core/process/C_MentorFillOpeningReportOpinion.java @@ -15,6 +15,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ protected static String buttonName ="导师开题意见"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/mentor-fill-opening-report-opinion"; + protected static String info = ""; static String table="graduation_design_opening_report_opinion_record"; @@ -54,4 +55,23 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{ public Map getVMap() { return vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_MentorFillReview.java b/src/core/process/C_MentorFillReview.java index 38a90b8..d92986f 100644 --- a/src/core/process/C_MentorFillReview.java +++ b/src/core/process/C_MentorFillReview.java @@ -15,6 +15,7 @@ public class C_MentorFillReview extends TempProcess { protected static String buttonName ="指导老师评阅"; protected static String targetURL="/home/mentor-fill-review"; protected static String iconURL="../cssFile/images/fill.png"; + protected static String info = ""; static String table="graduation_design_finished_product_mentor_score"; @@ -52,5 +53,25 @@ public class C_MentorFillReview extends TempProcess { public Map getVMap() { return vMap; } + + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_ReviewerFillReview.java b/src/core/process/C_ReviewerFillReview.java index acc6fe8..59f24ef 100644 --- a/src/core/process/C_ReviewerFillReview.java +++ b/src/core/process/C_ReviewerFillReview.java @@ -14,6 +14,7 @@ public class C_ReviewerFillReview extends TempProcess { protected static String buttonName ="评阅老师评阅"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/reviewer-fill-review"; + protected static String info = ""; static String table="graduation_design_finished_product_reviewer_score"; @@ -50,6 +51,25 @@ public class C_ReviewerFillReview extends TempProcess { public void setVMap(Map vMap) { this.vMap = vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_SchoolFillScoreOpinion.java b/src/core/process/C_SchoolFillScoreOpinion.java index 063ff4f..02006a3 100644 --- a/src/core/process/C_SchoolFillScoreOpinion.java +++ b/src/core/process/C_SchoolFillScoreOpinion.java @@ -15,6 +15,7 @@ public class C_SchoolFillScoreOpinion extends TempProcess { protected static String buttonName ="学院老师评分"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/school-fill-score-opinion"; + protected static String info = ""; static String table="graduation_design_reply_opinion_record_score"; public void fillInformation() throws Exception{ @@ -52,6 +53,25 @@ public class C_SchoolFillScoreOpinion extends TempProcess { return vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_SecretaryFillOpeningReportRecord.java b/src/core/process/C_SecretaryFillOpeningReportRecord.java index a5d94d8..f5e3b2a 100644 --- a/src/core/process/C_SecretaryFillOpeningReportRecord.java +++ b/src/core/process/C_SecretaryFillOpeningReportRecord.java @@ -15,6 +15,7 @@ public class C_SecretaryFillOpeningReportRecord extends TempProcess{ protected static String buttonName ="提交开题纪要"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/secretary-fill-opening-report-record"; + protected static String info = ""; static String table="graduation_design_opening_report_opinion_record"; @@ -53,4 +54,23 @@ public class C_SecretaryFillOpeningReportRecord extends TempProcess{ return vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_SecretaryFillReplyRecord.java b/src/core/process/C_SecretaryFillReplyRecord.java index 5f94edc..5d5e670 100644 --- a/src/core/process/C_SecretaryFillReplyRecord.java +++ b/src/core/process/C_SecretaryFillReplyRecord.java @@ -15,6 +15,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{ protected static String buttonName ="提交答辩记录"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/secretary-fill-reply-record"; + protected static String info = ""; static String table="graduation_design_reply_opinion_record_score"; @@ -54,4 +55,23 @@ public class C_SecretaryFillReplyRecord extends TempProcess{ } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_StudentFillGraduationDesignInformation.java b/src/core/process/C_StudentFillGraduationDesignInformation.java index 39847d5..5a8d43a 100644 --- a/src/core/process/C_StudentFillGraduationDesignInformation.java +++ b/src/core/process/C_StudentFillGraduationDesignInformation.java @@ -14,6 +14,7 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{ protected static String buttonName ="填写选题信息"; protected static String iconURL="../cssFile/images/filText.png"; protected static String targetURL="/home/student-fill-graduation-design-information"; + protected static String info = ""; static String table="graduation_design_opening_report_opinion_record"; @@ -51,4 +52,23 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{ } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } \ No newline at end of file diff --git a/src/core/process/C_StudentSearchTeacher.java b/src/core/process/C_StudentSearchTeacher.java index a519a53..6bd755f 100644 --- a/src/core/process/C_StudentSearchTeacher.java +++ b/src/core/process/C_StudentSearchTeacher.java @@ -11,6 +11,10 @@ import java.util.Map; public class C_StudentSearchTeacher extends TempProcess{ String teacherID; + protected static String buttonName = ""; + protected static String iconURL=""; + protected static String targetURL=""; + protected static String info = ""; static String table = "teacher"; Map TeacherInfo=new HashMap(); @@ -67,4 +71,23 @@ public class C_StudentSearchTeacher extends TempProcess{ public void setTeacherID(String teacherID){ this.teacherID=teacherID; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_StudentSelectTeacher.java b/src/core/process/C_StudentSelectTeacher.java index f035eba..695fa10 100644 --- a/src/core/process/C_StudentSelectTeacher.java +++ b/src/core/process/C_StudentSelectTeacher.java @@ -15,6 +15,7 @@ public class C_StudentSelectTeacher extends TempProcess { protected static String buttonName ="选择老师"; protected static String targetURL="/home/student-select-teacher"; protected static String iconURL="../cssFile/images/select.png"; + protected static String info = ""; public void select()throws Exception{ if(!check()) throw new GExcptInit("ID Attrs init error!"); @@ -64,5 +65,24 @@ public class C_StudentSelectTeacher extends TempProcess { } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_StudentUploadFinishedProduct.java b/src/core/process/C_StudentUploadFinishedProduct.java index 5dc291f..8c16420 100644 --- a/src/core/process/C_StudentUploadFinishedProduct.java +++ b/src/core/process/C_StudentUploadFinishedProduct.java @@ -14,6 +14,7 @@ public class C_StudentUploadFinishedProduct extends TempProcess { protected static String buttonName ="提交定稿"; protected static String iconURL="../cssFile/images/upload.png"; protected static String targetURL="/home/student-upload-finished-product"; + protected static String info = ""; static String file_type = "finished_product"; public void uploadOpeningReport() throws Exception{ @@ -48,4 +49,23 @@ public class C_StudentUploadFinishedProduct extends TempProcess { this.graduationDesignId = graduationDesignId; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_StudentUploadOpeningReport.java b/src/core/process/C_StudentUploadOpeningReport.java index 134cd91..27ebda3 100644 --- a/src/core/process/C_StudentUploadOpeningReport.java +++ b/src/core/process/C_StudentUploadOpeningReport.java @@ -14,6 +14,7 @@ public class C_StudentUploadOpeningReport extends TempProcess{ static String file_type = "opening_report"; protected static String targetURL="/home/student-upload-opening-report"; protected static String iconURL="../cssFile/images/upload.png"; + protected static String info = ""; public void uploadOpeningReport() throws Exception{ if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!"); @@ -48,4 +49,24 @@ public class C_StudentUploadOpeningReport extends TempProcess{ public void setGraduationDesignId(String graduationDesignId) { this.graduationDesignId = graduationDesignId; } + + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_TeacherSearchStudent.java b/src/core/process/C_TeacherSearchStudent.java index 5696b8b..9ad9010 100644 --- a/src/core/process/C_TeacherSearchStudent.java +++ b/src/core/process/C_TeacherSearchStudent.java @@ -11,6 +11,10 @@ import java.util.Map; public class C_TeacherSearchStudent extends TempProcess { String studentId; + protected static String buttonName = ""; + protected static String iconURL=""; + protected static String targetURL=""; + protected static String info = ""; static String table="student"; public Map search() throws Exception{ @@ -67,4 +71,23 @@ public class C_TeacherSearchStudent extends TempProcess { this.studentId=studentId; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_TeacherSelectStudent.java b/src/core/process/C_TeacherSelectStudent.java index 1575dff..8b74212 100644 --- a/src/core/process/C_TeacherSelectStudent.java +++ b/src/core/process/C_TeacherSelectStudent.java @@ -15,6 +15,7 @@ public class C_TeacherSelectStudent extends TempProcess { protected static String buttonName ="选择学生"; protected static String iconURL=""; protected static String targetURL="/home/teacher-select-student"; + protected static String info = ""; public void select()throws Exception{ if(!check()) throw new GExcptInit("ID Attrs init error!"); @@ -63,6 +64,24 @@ public class C_TeacherSelectStudent extends TempProcess { this.studentId = studentId; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java index 4c67c1f..1ce9a94 100644 --- a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java +++ b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java @@ -15,6 +15,7 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{ protected static String buttonName ="开题小组意见"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/teacher-team-fill-opening-report-opinion"; + protected static String info = ""; static String table="graduation_design_opening_report_opinion_record"; @@ -54,5 +55,24 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{ return vMap; } + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } } diff --git a/src/core/process/C_TeacherTeamFillScoreOpinion.java b/src/core/process/C_TeacherTeamFillScoreOpinion.java index b25dc7a..3fe8529 100644 --- a/src/core/process/C_TeacherTeamFillScoreOpinion.java +++ b/src/core/process/C_TeacherTeamFillScoreOpinion.java @@ -13,6 +13,7 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess { protected static String buttonName = "答辩小组评分"; protected static String iconURL="../cssFile/images/fill.png"; protected static String targetURL="/home/teacher-team-fill-score-opinion"; + protected static String info = ""; String graduationDesignId; Map vMap; @@ -36,6 +37,27 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess { return false; return true; } + + @Override + public String getInfo() { + return info; + } + + @Override + public String getTargetURL() { + return targetURL; + } + + @Override + public String getIconURL() { + return iconURL; + } + + @Override + public String getButtonName() { + return buttonName; + } + @Override public String getGraduationDesignId() { return graduationDesignId; diff --git a/src/core/process/Process.java b/src/core/process/Process.java index 7dc2728..d7ff13d 100644 --- a/src/core/process/Process.java +++ b/src/core/process/Process.java @@ -4,16 +4,10 @@ import core.operation.Operation; public abstract class Process{ - protected static String buttonName; - protected static String targetURL; - - protected static String iconURL; - private String status; private String permission; private Operation operation; - private String info; protected abstract boolean check(); @@ -33,18 +27,6 @@ public abstract class Process{ this.operation = operation; } - public String getButtonName() { - return buttonName; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - public String getStatus() { return status; } @@ -53,11 +35,11 @@ public abstract class Process{ this.status = status; } - public static String getTargetURL() { - return targetURL; - } + public abstract String getInfo(); - public static String getIconURL() { - return iconURL; - } + public abstract String getTargetURL(); + + public abstract String getIconURL(); + + public abstract String getButtonName(); } diff --git a/src/dao/DBManagement.java b/src/dao/DBManagement.java index 31a24eb..6a9eaa8 100644 --- a/src/dao/DBManagement.java +++ b/src/dao/DBManagement.java @@ -221,4 +221,8 @@ public class DBManagement { } } } + + public static void updateAll(String table, List fields, String increment) { + + } } diff --git a/src/gdms/GDMS.java b/src/gdms/GDMS.java index 3a10322..a3d01c1 100644 --- a/src/gdms/GDMS.java +++ b/src/gdms/GDMS.java @@ -1,5 +1,6 @@ package gdms; +import dao.DBManagement; import error.GExcptInit; import java.util.*; @@ -15,14 +16,60 @@ public class GDMS { } } + private static TimerTask getTimerTask(String s) throws GExcptInit { - if(s==""){ - return new TimerTask() { - @Override - public void run() { - ; - } - }; + switch (s){ + case "teacher_choose_student_start_date": + return new TimerTask() { + @Override + public void run() { + List fields = new ArrayList<>(); + fields.add("teacher_choose_student_status"); + DBManagement.updateAll("graduation_design",fields,"1"); + } + }; + case "student_choose_teacher_start_date": + return new TimerTask() { + @Override + public void run() { + ; + } + }; + case "choose_end_date": + return new TimerTask() { + @Override + public void run() { + ; + } + }; + case "opening_report_opinion_deadline_date": + return new TimerTask() { + @Override + public void run() { + ; + } + }; + case "finished_product_deadline_date": + return new TimerTask() { + @Override + public void run() { + ; + } + }; + case "finished_product_review_deadline_date": + return new TimerTask() { + @Override + public void run() { + ; + } + }; + case "reply_opinion_deadline_date": + return new TimerTask() { + @Override + public void run() { + ; + } + }; } throw new GExcptInit("GlobalTimePoint.json error"); diff --git a/src/gdms/GlobalTimePoint.json b/src/gdms/GlobalTimePoint.json index b5d8112..73ae364 100644 --- a/src/gdms/GlobalTimePoint.json +++ b/src/gdms/GlobalTimePoint.json @@ -5,5 +5,5 @@ "opening_report_opinion_deadline_date": "", "finished_product_deadline_date": "", "finished_product_review_deadline_date": "", - "reply_opition_deadline_date": "" + "reply_opinion_deadline_date": "" } \ No newline at end of file