# Conflicts: # .idea/misc.xml # src/core/process/C_MentorFillReview.java # src/core/process/C_ReviewerFillReview.javamaster
parent
193a8ba91c
commit
4144ed000d
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="gdms@localhost" uuid="6d4033d6-2147-4c12-a111-2ab915e871da">
|
||||
<driver-ref>mariadb</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mariadb://localhost:3306/gdms</jdbc-url>
|
||||
<driver-properties>
|
||||
<property name="autoReconnect" value="true" />
|
||||
<property name="zeroDateTimeBehavior" value="convertToNull" />
|
||||
<property name="tinyInt1isBit" value="false" />
|
||||
<property name="characterEncoding" value="utf8" />
|
||||
<property name="characterSetResults" value="utf8" />
|
||||
<property name="yearIsDateType" value="false" />
|
||||
</driver-properties>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
#n:gdms
|
Binary file not shown.
@ -1,10 +1,23 @@
|
||||
package core.process;
|
||||
|
||||
import dao.DBManagement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class C_FillInformation extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/fill_Information.jsp";
|
||||
}
|
||||
public abstract List<String> getInputName();
|
||||
public List<String[]> search() throws Exception {
|
||||
List<String> columns = new ArrayList<>();
|
||||
columns.add("*");
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",getGraduationDesignId());
|
||||
List<String[]> ls = DBManagement.select(columns,"graduation_design_information",limits,0,10);
|
||||
return ls;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
package core.process;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class C_Select extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/select.jsp";
|
||||
}
|
||||
public abstract List<String[]> search(String id)throws Exception;
|
||||
}
|
||||
|
@ -1,93 +0,0 @@
|
||||
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{
|
||||
String teacherID;
|
||||
|
||||
protected static String buttonName = "";
|
||||
protected static String iconURL="";
|
||||
protected static String targetURL="";
|
||||
protected static String info = "";
|
||||
static String table = "teacher";
|
||||
|
||||
Map<String,String> TeacherInfo=new HashMap<String, String>();
|
||||
public Map<String,String> search() throws Exception {
|
||||
if(!check()) throw new GExcptInit("teacherID Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getTeacherID());
|
||||
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]);
|
||||
TeacherInfo.put("e_mail_location",s[3]);
|
||||
TeacherInfo.put("phone_number",s[4]);
|
||||
return TeacherInfo;
|
||||
}
|
||||
public List<Map<String,String>> _search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("teacherId Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getTeacherID());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",10);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
List<Map<String,String>> teachersInfo = new ArrayList<>();
|
||||
core.process.Utils.formatResult(result, teachersInfo);
|
||||
return teachersInfo;
|
||||
}
|
||||
|
||||
protected boolean check() {
|
||||
if(this.getTeacherID()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public String getTeacherID(){
|
||||
return teacherID;
|
||||
}
|
||||
public void setTeacherID(String teacherID){
|
||||
this.teacherID=teacherID;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
public String getTargetURL() {
|
||||
return targetURL;
|
||||
}
|
||||
|
||||
|
||||
public String getIconURL() {
|
||||
return iconURL;
|
||||
}
|
||||
|
||||
|
||||
public String getButtonName() {
|
||||
return buttonName;
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
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 {
|
||||
String studentId;
|
||||
|
||||
protected static String buttonName = "";
|
||||
protected static String iconURL="";
|
||||
protected static String targetURL="";
|
||||
protected static String info = "";
|
||||
static String table="student";
|
||||
|
||||
public Map<String,String> search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("studentId Attrs init error!");
|
||||
Map<String,String> studentInfo =new HashMap<>();
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getStudentId());
|
||||
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);
|
||||
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;
|
||||
}
|
||||
public List<Map<String,String>> _search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("studentId Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getStudentId());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",10);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
List<Map<String,String>> studentsInfo = new ArrayList<>();
|
||||
core.process.Utils.formatResult(result, studentsInfo);
|
||||
return studentsInfo;
|
||||
}
|
||||
protected boolean check() {
|
||||
if(this.getStudentId()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public String getStudentId(){
|
||||
return studentId;
|
||||
}
|
||||
public void setStudentId(String studentId){
|
||||
this.studentId=studentId;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
public String getTargetURL() {
|
||||
return targetURL;
|
||||
}
|
||||
|
||||
|
||||
public String getIconURL() {
|
||||
return iconURL;
|
||||
}
|
||||
|
||||
|
||||
public String getButtonName() {
|
||||
return buttonName;
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package dao;
|
||||
|
||||
public class SelectAll extends SQLStmt {
|
||||
static String fs = "SELECT";
|
||||
private int startRow;
|
||||
private int endRow;
|
||||
SelectAll(String table,int startRow, int endRow) {
|
||||
super(table);
|
||||
this.setStartRow(startRow);
|
||||
this.setEndRow(endRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSQL() {
|
||||
return getFs()+getTs()+getLs();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getFs() {
|
||||
return fs+" * ";
|
||||
}
|
||||
private String getTs(){
|
||||
return "FROM "+this.getTable()+" ";
|
||||
}
|
||||
private String getLs(){
|
||||
String sql="LIMIT "+this.getStartRow()+", "+this.getEndRow();
|
||||
return sql;
|
||||
}
|
||||
public int getStartRow() {
|
||||
return startRow;
|
||||
}
|
||||
|
||||
public void setStartRow(int startRow) {
|
||||
this.startRow = startRow;
|
||||
}
|
||||
|
||||
public int getEndRow() {
|
||||
return endRow;
|
||||
}
|
||||
|
||||
public void setEndRow(int endRow) {
|
||||
this.endRow = endRow;
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
Loading…
Reference in new issue