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

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

@ -9,6 +9,7 @@
</element>
<element id="directory" name="lib">
<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>
</root>

@ -9,6 +9,7 @@
<webroots>
<root url="file://$MODULE_DIR$/web" relative="/" />
</webroots>
<sourceRoots />
</configuration>
</facet>
</component>
@ -19,20 +20,21 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5" level="application_server_libraries" />
<orderEntry type="module-library">
<orderEntry type="module-library" scope="PROVIDED">
<library>
<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>
<JAVADOC />
<SOURCES />
</library>
</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">
<library>
<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>
<JAVADOC />
<SOURCES />
@ -41,12 +43,11 @@
<orderEntry type="module-library">
<library>
<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>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" scope="PROVIDED" name="lib" level="project" />
</component>
</module>

@ -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<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.setOptions(new HashMap<>());
String table = "teacher";
search.addOptions("table",table);
List<String> fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map<String,String> 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;
}
}

@ -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 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<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;
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<String,String> StudentInfo=new HashMap<String,String>();
public Map<String,String> search(String studentID) throws Exception{
public class C_TeacherSearchStudent extends TempProcess {
String studentId;
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.setOptions(new HashMap<>());
String table = "student";
search.addOptions("table",table);
List<String> fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>();
limits.put("id",studentID);
limits.put("id",this.getStudentId());
search.addOptions("limits",limits);
search.addOptions("start",0);
search.addOptions("end",1);
@ -27,6 +32,20 @@ public class C_TeacherSearchStudent {
String[] s = result.get(0);
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;
}
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;
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_TeacherSelectStudent extends Process {
List<String> list;
public class C_TeacherSelectStudent extends TempProcess {
String studentId;
String teacherId;
public C_TeacherSelectStudent clone(){
C_TeacherSelectStudent tst = new C_TeacherSelectStudent();
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{
public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!");
Select select=new Select();
select.setOptions(new HashMap<>());
String teacher_id=teacherID;
select.addOptions("teacher_id",teacher_id);
String student_id=studentID;
select.addOptions("student_id",student_id);
select.addOptions("teacher_id",this.getTeacherId());
select.addOptions("student_id",this.getStudentId());
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 info;
protected abstract boolean check();
public String getPermission() {
return permission;
}

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

Loading…
Cancel
Save