parent
a06b0d9ef8
commit
159041f5ee
@ -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,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 {
|
||||||
|
}
|
@ -1,4 +1,7 @@
|
|||||||
package error;
|
package error;
|
||||||
|
|
||||||
public class GExcptInit {
|
public class GExcptInit extends GExcpt {
|
||||||
|
public GExcptInit(String info) {
|
||||||
|
super(info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue