diff --git a/src/core/process/C_CollegeFillOpeningReportOpinion.java b/src/core/process/C_CollegeFillOpeningReportOpinion.java index 9bf74ab..f34830f 100644 --- a/src/core/process/C_CollegeFillOpeningReportOpinion.java +++ b/src/core/process/C_CollegeFillOpeningReportOpinion.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -23,8 +24,7 @@ public class C_CollegeFillOpeningReportOpinion extends C_FillInformation{ 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("college_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_CollegeFillScoreOpinion.java b/src/core/process/C_CollegeFillScoreOpinion.java index 0eba494..810da57 100644 --- a/src/core/process/C_CollegeFillScoreOpinion.java +++ b/src/core/process/C_CollegeFillScoreOpinion.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -23,8 +24,7 @@ public class C_CollegeFillScoreOpinion extends C_FillInformation{ 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("college_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_MentorFillOpeningReportOpinion.java b/src/core/process/C_MentorFillOpeningReportOpinion.java index f60c3e3..f235d68 100644 --- a/src/core/process/C_MentorFillOpeningReportOpinion.java +++ b/src/core/process/C_MentorFillOpeningReportOpinion.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,8 +25,7 @@ public class C_MentorFillOpeningReportOpinion extends C_FillInformation{ 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("mentor_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_MentorFillReview.java b/src/core/process/C_MentorFillReview.java index bfb909b..6ad8e86 100644 --- a/src/core/process/C_MentorFillReview.java +++ b/src/core/process/C_MentorFillReview.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,8 +25,7 @@ public class C_MentorFillReview extends C_FillInformation { 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("review_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_ReviewerFillReview.java b/src/core/process/C_ReviewerFillReview.java index d7712b4..6635af4 100644 --- a/src/core/process/C_ReviewerFillReview.java +++ b/src/core/process/C_ReviewerFillReview.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -23,8 +24,7 @@ public class C_ReviewerFillReview extends C_FillInformation { 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("reviewer_score_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_SchoolFillScoreOpinion.java b/src/core/process/C_SchoolFillScoreOpinion.java index e197191..b37dc61 100644 --- a/src/core/process/C_SchoolFillScoreOpinion.java +++ b/src/core/process/C_SchoolFillScoreOpinion.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -23,8 +24,7 @@ public class C_SchoolFillScoreOpinion extends C_FillInformation { 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("school_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_SecretaryFillOpeningReportRecord.java b/src/core/process/C_SecretaryFillOpeningReportRecord.java index e6d8f95..aa52674 100644 --- a/src/core/process/C_SecretaryFillOpeningReportRecord.java +++ b/src/core/process/C_SecretaryFillOpeningReportRecord.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,8 +25,7 @@ public class C_SecretaryFillOpeningReportRecord extends C_FillInformation{ 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("secretary_record_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_SecretaryFillReplyRecord.java b/src/core/process/C_SecretaryFillReplyRecord.java index 2205fcc..5ab4a78 100644 --- a/src/core/process/C_SecretaryFillReplyRecord.java +++ b/src/core/process/C_SecretaryFillReplyRecord.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,8 +25,7 @@ public class C_SecretaryFillReplyRecord extends C_FillInformation{ 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("secretary_record_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java index c844d41..3363a4a 100644 --- a/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java +++ b/src/core/process/C_TeacherTeamFillOpeningReportOpinion.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,8 +25,7 @@ public class C_TeacherTeamFillOpeningReportOpinion extends C_FillInformation{ 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("report_teacher_team_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/core/process/C_TeacherTeamFillScoreOpinion.java b/src/core/process/C_TeacherTeamFillScoreOpinion.java index 58aedca..6214226 100644 --- a/src/core/process/C_TeacherTeamFillScoreOpinion.java +++ b/src/core/process/C_TeacherTeamFillScoreOpinion.java @@ -2,6 +2,7 @@ package core.process; import core.operation.FillInformation; import error.GExcptInit; +import gdms.Configuration; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,8 +25,7 @@ public class C_TeacherTeamFillScoreOpinion extends C_FillInformation { 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()); + String date= Configuration.dateFormat.format(new Date()); vMap.put("teacher_team_opinion_date",date); Maplimits = new HashMap<>(); limits.put("id",this.getGraduationDesignId()); diff --git a/src/gdms/Configuration.java b/src/gdms/Configuration.java index 3143a95..5cda02e 100644 --- a/src/gdms/Configuration.java +++ b/src/gdms/Configuration.java @@ -1,5 +1,7 @@ package gdms; +import java.text.SimpleDateFormat; + public interface Configuration { //file String filePath = "C:/Users/zhai_/Desktop/"; @@ -7,4 +9,5 @@ public interface Configuration { String dbUrl="jdbc:mariadb://localhost:3306/gdms"; String dbUsername="gdms"; String dbPassword="GDMS"; + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); }