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

# Conflicts:
#	.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml
#	.idea/misc.xml
#	GDMS.iml
wlf
wlf 6 years ago
commit 8fc30a753b

@ -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,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;
}
} }

@ -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;
} }

@ -28,7 +28,7 @@
<div class="select-blank"></div> <div class="select-blank"></div>
<div class="selected-bottom"></div> <div class="selected-bottom"></div>
</div> </div>
<div class="list-frame bar-hange">c <div class="list-frame bar-hange">
<div class="list-child"> <div class="list-child">
<div class="name"><span class="the-name">李先生</span></div> <div class="name"><span class="the-name">李先生</span></div>
<div class="other-msgs"> <div class="other-msgs">

Loading…
Cancel
Save