Merge remote-tracking branch 'remotes/origin/hechu1' into wmj

# Conflicts:
#	GDMS.iml
wlf
wan 7 years ago
parent a06b0d9ef8
commit 159041f5ee

@ -9,6 +9,7 @@
</element> </element>
<element id="directory" name="lib"> <element id="directory" name="lib">
<element id="file-copy" path="C:/Program Files/apache-tomcat-9.0.13/lib/tomcat-jdbc.jar" /> <element id="file-copy" path="C:/Program Files/apache-tomcat-9.0.13/lib/tomcat-jdbc.jar" />
<element id="library" level="project" name="lib" />
</element> </element>
</element> </element>
</root> </root>

@ -9,6 +9,7 @@
<webroots> <webroots>
<root url="file://$MODULE_DIR$/web" relative="/" /> <root url="file://$MODULE_DIR$/web" relative="/" />
</webroots> </webroots>
<sourceRoots />
</configuration> </configuration>
</facet> </facet>
</component> </component>
@ -19,20 +20,21 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5" level="application_server_libraries" /> <orderEntry type="module-library" scope="PROVIDED">
<orderEntry type="module-library">
<library> <library>
<CLASSES> <CLASSES>
<root url="jar://E:/tomcat8/apache-tomcat-8.5.37/lib/tomcat-jdbc.jar!/" /> <root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib/tomcat-jdbc.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5.37" level="application_server_libraries" />
<orderEntry type="library" scope="PROVIDED" name="lib" level="project" />
<orderEntry type="module-library"> <orderEntry type="module-library">
<library> <library>
<CLASSES> <CLASSES>
<root url="jar://$MODULE_DIR$/web/WEB-INF/lib/commons-fileupload-1.3.1.jar!/" /> <root url="jar://$MODULE_DIR$/web/WEB-INF/lib/jstl.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />
@ -41,12 +43,11 @@
<orderEntry type="module-library"> <orderEntry type="module-library">
<library> <library>
<CLASSES> <CLASSES>
<root url="jar://$MODULE_DIR$/web/WEB-INF/lib/commons-io-2.6.jar!/" /> <root url="jar://$MODULE_DIR$/web/WEB-INF/lib/standard.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="library" scope="PROVIDED" name="lib" level="project" />
</component> </component>
</module> </module>

@ -1,24 +1,29 @@
package core.process; package core.process;
import core.operation.Search; import core.operation.Search;
import error.GExcptInit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class C_StudentSearchTeacher { public class C_StudentSearchTeacher extends TempProcess{
String teacherID;
static String table = "teacher";
Map<String,String> TeacherInfo=new HashMap<String, String>(); Map<String,String> TeacherInfo=new HashMap<String, String>();
public Map<String,String> search(String teacherID) throws Exception { public Map<String,String> search() throws Exception {
if(!check()) throw new GExcptInit("teacherID Attrs init error!");
Search search = new Search() ; Search search = new Search() ;
search.setOptions(new HashMap<>()); search.setOptions(new HashMap<>());
String table = "teacher";
search.addOptions("table",table); search.addOptions("table",table);
List<String> fields = new ArrayList<>(); List<String> fields = new ArrayList<>();
fields.add("*"); fields.add("*");
search.addOptions("field",fields); search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>(); Map<String,String> limits = new HashMap<>();
limits.put("id",teacherID); limits.put("id",this.getTeacherID());
search.addOptions("limits",limits); search.addOptions("limits",limits);
search.addOptions("start",0); search.addOptions("start",0);
search.addOptions("end",1); search.addOptions("end",1);
@ -27,6 +32,20 @@ public class C_StudentSearchTeacher {
String[] s = result.get(0); String[] s = result.get(0);
TeacherInfo.put("id",s[0]); TeacherInfo.put("id",s[0]);
TeacherInfo.put("name",s[2]); TeacherInfo.put("name",s[2]);
TeacherInfo.put("e_mail_location",s[3]);
TeacherInfo.put("phone_number",s[4]);
return TeacherInfo; 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;
}
} }

@ -1,22 +1,46 @@
package core.process; package core.process;
import core.operation.Select; import core.operation.Select;
import error.GExcptInit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class C_StudentSelectTeacher extends Process { public class C_StudentSelectTeacher extends TempProcess {
public void select(String studentID,String teacherID)throws Exception{ String studentId;
String teacherId;
public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!");
Select select=new Select(); Select select=new Select();
select.setOptions(new HashMap<>()); select.setOptions(new HashMap<>());
String student_id=studentID; select.addOptions("student_id",this.getStudentId());
select.addOptions("student_id",student_id); select.addOptions("teacher_id",this.getTeacherId());
String teacher_id=teacherID;
select.addOptions("teacher_id",teacher_id);
Map<String,Object> options=select.execute(null); Map<String,Object> 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;
}
} }

@ -1,24 +1,29 @@
package core.process; package core.process;
import core.operation.Search; import core.operation.Search;
import error.GExcptInit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class C_TeacherSearchStudent { public class C_TeacherSearchStudent extends TempProcess {
Map<String,String> StudentInfo=new HashMap<String,String>(); String studentId;
public Map<String,String> search(String studentID) throws Exception{
static String table="student";
Map<String,String> StudentInfo=new HashMap<String, String>();
public Map<String,String> search() throws Exception{
if(!check()) throw new GExcptInit("studentId Attrs init error!");
Search search = new Search() ; Search search = new Search() ;
search.setOptions(new HashMap<>()); search.setOptions(new HashMap<>());
String table = "student";
search.addOptions("table",table); search.addOptions("table",table);
List<String> fields = new ArrayList<>(); List<String> fields = new ArrayList<>();
fields.add("*"); fields.add("*");
search.addOptions("field",fields); search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>(); Map<String,String> limits = new HashMap<>();
limits.put("id",studentID); limits.put("id",this.getStudentId());
search.addOptions("limits",limits); search.addOptions("limits",limits);
search.addOptions("start",0); search.addOptions("start",0);
search.addOptions("end",1); search.addOptions("end",1);
@ -27,6 +32,20 @@ public class C_TeacherSearchStudent {
String[] s = result.get(0); String[] s = result.get(0);
StudentInfo.put("id",s[0]); StudentInfo.put("id",s[0]);
StudentInfo.put("name",s[2]); StudentInfo.put("name",s[2]);
StudentInfo.put("e_mail_location",s[3]);
StudentInfo.put("phone_number",s[4]);
return StudentInfo; return StudentInfo;
} }
protected boolean check() {
if(this.getStudentId()==null)
return false;
return true;
}
public String getStudentId(){
return studentId;
}
public void setStudentId(String studentId){
this.studentId=studentId;
}
} }

@ -1,33 +1,46 @@
package core.process; package core.process;
import core.operation.Select; import core.operation.Select;
import error.GExcptInit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class C_TeacherSelectStudent extends Process { public class C_TeacherSelectStudent extends TempProcess {
List<String> list; String studentId;
String teacherId;
public C_TeacherSelectStudent clone(){ public void select()throws Exception{
C_TeacherSelectStudent tst = new C_TeacherSelectStudent(); if(!check()) throw new GExcptInit("ID Attrs init error!");
tst.setInfo( this.getInfo());
List<String> list = new ArrayList<>();
for(String s:this.list){
list.add(new String(s));
}
return null;
}
public void select(String teacherID,String studentID)throws Exception{
Select select=new Select(); Select select=new Select();
select.setOptions(new HashMap<>()); select.setOptions(new HashMap<>());
String teacher_id=teacherID; select.addOptions("teacher_id",this.getTeacherId());
select.addOptions("teacher_id",teacher_id); select.addOptions("student_id",this.getStudentId());
String student_id=studentID;
select.addOptions("student_id",student_id);
Map<String,Object> options=select.execute(null); Map<String,Object> 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;
}
} }

@ -0,0 +1,4 @@
package core.process;
public class C_TeacherUploadOpeningReportOpinion {
}

@ -11,6 +11,7 @@ public abstract class Process{
private String buttonName; private String buttonName;
private String info; private String info;
protected abstract boolean check();
public String getPermission() { public String getPermission() {
return permission; return permission;
} }

@ -1,4 +1,7 @@
package error; package error;
public class GExcptInit { public class GExcptInit extends GExcpt {
public GExcptInit(String info) {
super(info);
}
} }

Loading…
Cancel
Save