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

# Conflicts:
#	src/core/operation/Search.json
wlf
wan 6 years ago
parent 0e8a2a1ebb
commit 3cbe7c42d8

File diff suppressed because it is too large Load Diff

@ -1,12 +1,7 @@
package core.process;
import core.operation.Operation;
import core.operation.Search;
import core.user.User;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -14,7 +9,7 @@ import java.util.Map;
public class C_StudentSearchTeacher {
Map<String,String> TeacherInfo=new HashMap<String, String>();
public Map<String,String> search(String TeacherID){
public Map<String,String> search(String teacherID) throws Exception {
Search search = new Search() ;
search.setOptions(new HashMap<>());
String table = "teacher";
@ -22,6 +17,16 @@ public class C_StudentSearchTeacher {
List<String> fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>();
limits.put("id",teacherID);
search.addOptions("limits",limits);
search.addOptions("start",0);
search.addOptions("end",1);
Map<String, Object> options = search.execute(null);
List<String[]> result = (List<String[]>) options.get("result");
String[] s = result.get(0);
TeacherInfo.put("id",s[0]);
TeacherInfo.put("name",s[2]);
return TeacherInfo;
}

@ -1,4 +1,22 @@
package core.process;
public class C_StudentSelectTeacher {
import core.operation.Select;
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{
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);
Map<String,Object> options=select.execute(null);
}
}

@ -1,7 +1,11 @@
package core.process;
import core.operation.Select;
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;
@ -15,4 +19,15 @@ public class C_TeacherSelectStudent extends Process {
}
return null;
}
public void select(String teacherID,String studentID)throws Exception{
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);
Map<String,Object> options=select.execute(null);
}
}

Loading…
Cancel
Save