|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
package gdms;
|
|
|
|
|
|
|
|
|
|
import dao.DBManagement;
|
|
|
|
|
import error.GExcptFileIO;
|
|
|
|
|
import error.GExcptInit;
|
|
|
|
|
import error.GExcptSQL;
|
|
|
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
import utils.Utils;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
@ -39,7 +42,7 @@ public class GDMS {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
List<String> fields = new ArrayList<>();
|
|
|
|
|
fields.add("teacher_choose_student_status");
|
|
|
|
|
fields.add("student_choose_teacher_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
@ -52,35 +55,148 @@ public class GDMS {
|
|
|
|
|
return new TimerTask() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
;
|
|
|
|
|
List<String> fields = new ArrayList<>();
|
|
|
|
|
fields.add("student_choose_teacher_status");
|
|
|
|
|
fields.add("teacher_choose_student_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("student_fill_graduation_design_information_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_information",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("opening_report_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_opening_report",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("opening_report_mentor_opinion_status");
|
|
|
|
|
fields.add("opening_report_teacher_team_opinion_status");
|
|
|
|
|
fields.add("opening_report_college_opinion_status");
|
|
|
|
|
fields.add("opening_report_secretary_record_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_opening_report_opinion_record",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
case "opening_report_opinion_deadline_date":
|
|
|
|
|
return new TimerTask() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
;
|
|
|
|
|
List<String> fields = new ArrayList<>();
|
|
|
|
|
fields.add("opening_report_mentor_opinion_status");
|
|
|
|
|
fields.add("opening_report_teacher_team_opinion_status");
|
|
|
|
|
fields.add("opening_report_college_opinion_status");
|
|
|
|
|
fields.add("opening_report_secretary_record_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_opening_report_opinion_record",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("finished_product_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_finished_product",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
case "finished_product_deadline_date":
|
|
|
|
|
return new TimerTask() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
;
|
|
|
|
|
List<String> fields = new ArrayList<>();
|
|
|
|
|
fields.add("finished_product_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_finished_product",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("finished_product_mentor_score_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_finished_product_mentor_score",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("finished_product_reviewer_score_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_finished_product_reviewer_score",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
case "finished_product_review_deadline_date":
|
|
|
|
|
return new TimerTask() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
;
|
|
|
|
|
List<String> fields = new ArrayList<>();
|
|
|
|
|
fields.add("finished_product_mentor_score_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_finished_product_mentor_score",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("finished_product_reviewer_score_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_finished_product_reviewer_score",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
fields = new ArrayList<>();
|
|
|
|
|
fields.add("reply_mentor_score_status");
|
|
|
|
|
fields.add("reply_teacher_team_score_status");
|
|
|
|
|
fields.add("reply_college_score_status");
|
|
|
|
|
fields.add("reply_secretary_record_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_reply_opinion_record_score",fields,"1");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
case "reply_opinion_deadline_date":
|
|
|
|
|
return new TimerTask() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
;
|
|
|
|
|
List<String> fields = new ArrayList<>();
|
|
|
|
|
fields.add("reply_mentor_score_status");
|
|
|
|
|
fields.add("reply_teacher_team_score_status");
|
|
|
|
|
fields.add("reply_college_score_status");
|
|
|
|
|
fields.add("reply_secretary_record_status");
|
|
|
|
|
try {
|
|
|
|
|
DBManagement.updateAll("graduation_design_reply_opinion_record_score",fields,"4");
|
|
|
|
|
} catch (GExcptSQL gExcptSQL) {
|
|
|
|
|
gExcptSQL.printStackTrace();
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
@ -89,6 +205,19 @@ public class GDMS {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void initSchedule() {
|
|
|
|
|
|
|
|
|
|
schedules = new HashMap<>();
|
|
|
|
|
String sets= null;
|
|
|
|
|
try {
|
|
|
|
|
sets = Utils.readFile(schedulePath);
|
|
|
|
|
} catch (GExcptFileIO gExcptFileIO) {
|
|
|
|
|
gExcptFileIO.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
JSONObject jo=JSONObject.fromObject(sets);
|
|
|
|
|
Iterator it = jo.keys();
|
|
|
|
|
while (it.hasNext()) {
|
|
|
|
|
String key = (String)it.next();
|
|
|
|
|
Object value = jo.get(key);
|
|
|
|
|
schedules.put(key, new utils.Utils.dateFormat((String) value));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|