diff --git a/.idea/artifacts/GDMS_war_exploded.xml b/.idea/artifacts/GDMS_war_exploded.xml
index 12d7fe5..e0e575f 100644
--- a/.idea/artifacts/GDMS_war_exploded.xml
+++ b/.idea/artifacts/GDMS_war_exploded.xml
@@ -8,7 +8,14 @@
-
+
+
+
+
+
+
+
+
diff --git a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml
index f80b89c..fbbe276 100644
--- a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml
+++ b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml
@@ -1626,516 +1626,536 @@
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
-
+
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
- date|0s
+ text|0s
normal
-
+
10
- char(1)|0s
+ 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 35bdbab..11bca97 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 17b0b6c..23fde1f 100644
--- a/GDMS.iml
+++ b/GDMS.iml
@@ -17,14 +17,14 @@
-
+
+
-
-
+
diff --git a/deployment/context.xml b/deployment/context.xml
index 9e9d9af..70d970a 100644
--- a/deployment/context.xml
+++ b/deployment/context.xml
@@ -4,7 +4,7 @@
name="jdbc/gdms"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
- url="jdbc:mariadb://localhost:3306/gdms"
+ targetURL="jdbc:mariadb://localhost:3306/gdms"
username="gdms"
password="GDMS"/>
diff --git a/documents/GDMS_DB_Design .txt b/documents/GDMS_DB_Design .txt
index 5cc8f24..af8b8f1 100644
--- a/documents/GDMS_DB_Design .txt
+++ b/documents/GDMS_DB_Design .txt
@@ -3,7 +3,7 @@ password char 256
name varchar 50
e_mail_location varchar 50
phonenumber varchar 30
-url varchar 256
+targetURL varchar 256
administrator
id
diff --git a/documents/数据库.txt b/documents/数据库.txt
index 635fa76..37f6ce0 100644
--- a/documents/数据库.txt
+++ b/documents/数据库.txt
@@ -3,7 +3,7 @@ password char 255//用户密码
name char 30//用户姓名
e_mail_location char 40//邮箱
phone_number char 20//电话号码
-url varchar 255//......路径
+targetURL varchar 255//......路径
administrator//管理员
id//管理员ID
diff --git a/src/core/operation/UploadFileOperation.java b/src/core/operation/UploadFile.java
similarity index 78%
rename from src/core/operation/UploadFileOperation.java
rename to src/core/operation/UploadFile.java
index ff26329..75c76cb 100644
--- a/src/core/operation/UploadFileOperation.java
+++ b/src/core/operation/UploadFile.java
@@ -11,21 +11,15 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class UploadFileOperation extends Operation {
+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/UploadFileOperation.json b/src/core/operation/UploadFile.json
similarity index 78%
rename from src/core/operation/UploadFileOperation.json
rename to src/core/operation/UploadFile.json
index c2a2f65..0181176 100644
--- a/src/core/operation/UploadFileOperation.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/core/process/C_CollegeFillOpeningReportOpinion.java b/src/core/process/C_CollegeFillOpeningReportOpinion.java
new file mode 100644
index 0000000..27cae0f
--- /dev/null
+++ b/src/core/process/C_CollegeFillOpeningReportOpinion.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_CollegeFillOpeningReportOpinion 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("college_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||this.getVMap()==null)
+ return false;
+ return true;
+ }
+ public String getGraduationDesignId() {
+ return graduationDesignId;
+ }
+
+ public void setGraduationDesignId(String graduationDesignId) {
+ this.graduationDesignId = graduationDesignId;
+ }
+
+ 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
new file mode 100644
index 0000000..96e4e7d
--- /dev/null
+++ b/src/core/process/C_CollegeFillScoreOpinion.java
@@ -0,0 +1,45 @@
+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("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.getGraduationDesignId()==null)
+ 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
new file mode 100644
index 0000000..139904e
--- /dev/null
+++ b/src/core/process/C_MentorFillOpeningReportOpinion.java
@@ -0,0 +1,43 @@
+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_MentorFillOpeningReportOpinion extends TempProcess{
+
+ 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("mentor_opinion_date",date);
+ Maplimits = new HashMap<>();
+ limits.put("id",this.getGraduationDesignId());
+ fillInformation.addOptions("limits",limits);
+ fillInformation.execute(null);
+
+ }
+ protected boolean check() {
+ if(this.getVMap()==null||this.getGraduationDesignId()==null)
+ return false;
+ return true;
+ }
+ public void setVMap(Map vMap) {
+ this.vMap = vMap;
+ }
+
+ public Map getVMap() {
+ return vMap;
+ }
+}
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;
+ }
+}
+
diff --git a/src/core/process/C_SchoolFillScoreOpinion.java b/src/core/process/C_SchoolFillScoreOpinion.java
new file mode 100644
index 0000000..652cf1b
--- /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..d0398a3
--- /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..0c8c478
--- /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("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;
+ }
+ 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..33e6df4
--- /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_StudentSearchTeacher.java b/src/core/process/C_StudentSearchTeacher.java
index 2bb3080..65931e4 100644
--- a/src/core/process/C_StudentSearchTeacher.java
+++ b/src/core/process/C_StudentSearchTeacher.java
@@ -1,24 +1,29 @@
package core.process;
import core.operation.Search;
+import error.GExcptInit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class C_StudentSearchTeacher {
+public class C_StudentSearchTeacher extends TempProcess{
+ String teacherID;
+
+ static String table = "teacher";
+
Map TeacherInfo=new HashMap();
- public Map search(String teacherID) throws Exception {
+ public Map search() throws Exception {
+ if(!check()) throw new GExcptInit("teacherID Attrs init error!");
Search search = new Search() ;
search.setOptions(new HashMap<>());
- String table = "teacher";
search.addOptions("table",table);
List fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map limits = new HashMap<>();
- limits.put("id",teacherID);
+ limits.put("id",this.getTeacherID());
search.addOptions("limits",limits);
search.addOptions("start",0);
search.addOptions("end",1);
@@ -27,6 +32,20 @@ public class C_StudentSearchTeacher {
String[] s = result.get(0);
TeacherInfo.put("id",s[0]);
TeacherInfo.put("name",s[2]);
+ TeacherInfo.put("e_mail_location",s[3]);
+ TeacherInfo.put("phone_number",s[4]);
return TeacherInfo;
}
+
+ protected boolean check() {
+ if(this.getTeacherID()==null)
+ return false;
+ return true;
+ }
+ public String getTeacherID(){
+ return teacherID;
+ }
+ public void setTeacherID(String teacherID){
+ this.teacherID=teacherID;
+ }
}
diff --git a/src/core/process/C_StudentSelectTeacher.java b/src/core/process/C_StudentSelectTeacher.java
index d2b9b93..ee8ada0 100644
--- a/src/core/process/C_StudentSelectTeacher.java
+++ b/src/core/process/C_StudentSelectTeacher.java
@@ -1,22 +1,46 @@
package core.process;
import core.operation.Select;
+import error.GExcptInit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class C_StudentSelectTeacher extends core.process.Process {
- public void select(String studentID,String teacherID)throws Exception{
+public class C_StudentSelectTeacher extends TempProcess {
+ String studentId;
+ String teacherId;
+
+ public void select()throws Exception{
+ if(!check()) throw new GExcptInit("ID Attrs init error!");
Select select=new Select();
select.setOptions(new HashMap<>());
- String student_id=studentID;
- select.addOptions("student_id",student_id);
- String teacher_id=teacherID;
- select.addOptions("teacher_id",teacher_id);
+ select.addOptions("student_id",this.getStudentId());
+ select.addOptions("teacher_id",this.getTeacherId());
Map options=select.execute(null);
}
+ protected boolean check() {
+ if(this.getStudentId()==null||this.getTeacherId()==null)
+ return false;
+ return true;
+ }
+ public String getTeacherId() {
+ return teacherId;
+ }
+
+ public void setTeacherId(String teacherId) {
+ this.teacherId = teacherId;
+ }
+
+ public String getStudentId() {
+ return studentId;
+ }
+
+ public void setStudentId(String studentId) {
+ this.studentId = studentId;
+ }
+
}
diff --git a/src/core/process/C_StudentUploadFinishedProduct.java b/src/core/process/C_StudentUploadFinishedProduct.java
new file mode 100644
index 0000000..efd36a8
--- /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 graduationDesignId;
+
+ 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.getGraduationDesignId());
+ uploadFile.addOptions("limits",limits);
+ uploadFile.execute(null);
+ }
+
+ protected boolean check() {
+ if(this.getFinishedProduct()==null||this.getGraduationDesignId()==null)
+ return false;
+ return true;
+ }
+ public File getFinishedProduct() {
+ return finishedProduct;
+ }
+
+ public void setFinishedProduct(File finishedProduct) {
+ this.finishedProduct = finishedProduct;
+ }
+ public String getGraduationDesignId() {
+ return graduationDesignId;
+ }
+
+ public void setGraduationDesignId(String graduationDesignId) {
+ this.graduationDesignId = graduationDesignId;
+ }
+
+}
diff --git a/src/core/process/C_StudentUploadOpeningReport.java b/src/core/process/C_StudentUploadOpeningReport.java
new file mode 100644
index 0000000..69c70b3
--- /dev/null
+++ b/src/core/process/C_StudentUploadOpeningReport.java
@@ -0,0 +1,49 @@
+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_StudentUploadOpeningReport extends TempProcess{
+ File openingReport;
+ String graduationDesignId;
+
+ static String file_type = "opening_report";
+
+ public void uploadOpeningReport() throws Exception{
+ if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!");
+ UploadFile uploadFileOperation=new UploadFile();
+ uploadFileOperation.setOptions(new HashMap<>());
+ uploadFileOperation.addOptions("file",this.getOpeningReport());
+ uploadFileOperation.addOptions("file_type",file_type);
+ Maplimits = new HashMap<>();
+ limits.put("id",this.getGraduationDesignId());
+ uploadFileOperation.addOptions("limits",limits);
+ uploadFileOperation.execute(null);
+ }
+
+ protected boolean check() {
+ if(this.getGraduationDesignId()==null||this.getOpeningReport()==null)
+ return false;
+ return true;
+ }
+
+ public File getOpeningReport() {
+ return openingReport;
+ }
+
+ public void setOpeningReport(File openingReport) {
+ this.openingReport = openingReport;
+ }
+
+ public String getGraduationDesignId() {
+ return graduationDesignId;
+ }
+
+ public void setGraduationDesignId(String graduationDesignId) {
+ this.graduationDesignId = graduationDesignId;
+ }
+}
diff --git a/src/core/process/C_TeacherSearchStudent.java b/src/core/process/C_TeacherSearchStudent.java
index 6c90275..c915c93 100644
--- a/src/core/process/C_TeacherSearchStudent.java
+++ b/src/core/process/C_TeacherSearchStudent.java
@@ -1,34 +1,77 @@
package core.process;
import core.operation.Search;
+import error.GExcptInit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class C_TeacherSearchStudent {
- Map StudentInfo=new HashMap();
- public Map search(String studentID) throws Exception{
+public class C_TeacherSearchStudent extends TempProcess {
+ String studentId;
+
+ static String table="student";
+
+ public Map search() throws Exception{
+ if(!check()) throw new GExcptInit("studentId Attrs init error!");
+ Map studentInfo =new HashMap<>();
Search search = new Search() ;
search.setOptions(new HashMap<>());
- String table = "student";
search.addOptions("table",table);
List fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map limits = new HashMap<>();
- limits.put("id",studentID);
+ limits.put("id",this.getStudentId());
search.addOptions("limits",limits);
search.addOptions("start",0);
search.addOptions("end",1);
Map options = search.execute(null);
List result = (List) options.get("result");
String[] s = result.get(0);
- StudentInfo.put("学号",s[0]);
- StudentInfo.put("名字",s[2]);
- StudentInfo.put("邮箱",s[3]);
- StudentInfo.put("电话",s[4]);
- return StudentInfo;
+ studentInfo.put("id",s[0]);
+ studentInfo.put("name",s[2]);
+ studentInfo.put("e_mail_location",s[3]);
+ studentInfo.put("phone_number",s[4]);
+ return studentInfo;
}
+ public List