# Conflicts: # src/core/process/C_TeacherSearchStudent.java # web/jsFile/upload_action.jshechu1
commit
a1a3f84473
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="false" project-jdk-name="10" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"options":{
|
"options":{
|
||||||
"file": "File",
|
"file_url": "String",
|
||||||
"file_type": "String",
|
"file_type": "String",
|
||||||
"limits":"Map<String,String>"
|
"limits":"Map<String,String>"
|
||||||
},
|
},
|
@ -0,0 +1,50 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_CollegeFillOpeningReportOpinion extends TempProcess{
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_opening_report_opinion_record";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception {
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation =new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("college_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null||this.getVMap()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getVMap() {
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_CollegeFillScoreOpinion extends TempProcess{
|
||||||
|
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_reply_opinion_record_score";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs Init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("college_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getVMap() {
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_MentorFillOpeningReportOpinion extends TempProcess{
|
||||||
|
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_opening_report_opinion_record";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("mentor_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getVMap()==null||this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getVMap() {
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_MentorFillReview extends TempProcess {
|
||||||
|
public String teacherID;
|
||||||
|
public String teacher_opinion;
|
||||||
|
public Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_finished_product_mentor_score";
|
||||||
|
public String getTeacher_opinion() {
|
||||||
|
return teacher_opinion;
|
||||||
|
}
|
||||||
|
public void setTeacher_opinion(String teacher_opinion) {
|
||||||
|
this.teacher_opinion = teacher_opinion;
|
||||||
|
}
|
||||||
|
public String getTeacherID() {
|
||||||
|
return teacherID;
|
||||||
|
}
|
||||||
|
public void setTeacherID(String teacherID) {
|
||||||
|
this.teacherID = teacherID;
|
||||||
|
}
|
||||||
|
public Map<String, String> getvMap() {
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
public void setvMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
public void TeacherTeamFillOpeningReportOpinion() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("MentorFillReview Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("review_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getTeacherID());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getTeacherID().equals(null)||this.getTeacher_opinion().equals(null)||this.getvMap().equals(null))
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_SchoolFillScoreOpinion extends TempProcess {
|
||||||
|
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_reply_opinion_record_score";
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("school_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
|
||||||
|
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_opening_report_opinion_record";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("secretary_record_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_SecretaryFillReplyRecord extends TempProcess{
|
||||||
|
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_reply_opinion_record_score";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs Init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("secretary_record_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_StudentFillGraduationDesignInformation extends TempProcess{
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_opening_report_opinion_record";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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 core.process.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.UploadFile;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_StudentUploadFinishedProduct {
|
||||||
|
|
||||||
|
File finishedProduct;
|
||||||
|
String graduationDesignId;
|
||||||
|
|
||||||
|
static String file_type = "finished_product";
|
||||||
|
public void uploadOpeningReport() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("Upload FinishedProduct Attrs init error!");
|
||||||
|
UploadFile uploadFile=new UploadFile();
|
||||||
|
uploadFile.setOptions(new HashMap<>());
|
||||||
|
uploadFile.addOptions("file",this.getFinishedProduct());
|
||||||
|
uploadFile.addOptions("file_type",file_type);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
uploadFile.addOptions("limits",limits);
|
||||||
|
uploadFile.execute(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getFinishedProduct()==null||this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public File getFinishedProduct() {
|
||||||
|
return finishedProduct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishedProduct(File finishedProduct) {
|
||||||
|
this.finishedProduct = finishedProduct;
|
||||||
|
}
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.UploadFile;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_StudentUploadOpeningReport extends TempProcess{
|
||||||
|
File openingReport;
|
||||||
|
String graduationDesignId;
|
||||||
|
|
||||||
|
static String file_type = "opening_report";
|
||||||
|
|
||||||
|
public void uploadOpeningReport() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!");
|
||||||
|
UploadFile uploadFileOperation=new UploadFile();
|
||||||
|
uploadFileOperation.setOptions(new HashMap<>());
|
||||||
|
uploadFileOperation.addOptions("file",this.getOpeningReport());
|
||||||
|
uploadFileOperation.addOptions("file_type",file_type);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
uploadFileOperation.addOptions("limits",limits);
|
||||||
|
uploadFileOperation.execute(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null||this.getOpeningReport()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public File getOpeningReport() {
|
||||||
|
return openingReport;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpeningReport(File openingReport) {
|
||||||
|
this.openingReport = openingReport;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
}
|
@ -1,34 +1,77 @@
|
|||||||
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";
|
||||||
|
|
||||||
|
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 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);
|
||||||
Map<String, Object> options = search.execute(null);
|
Map<String, Object> options = search.execute(null);
|
||||||
List<String[]> result = (List<String[]>) options.get("result");
|
List<String[]> result = (List<String[]>) options.get("result");
|
||||||
String[] s = result.get(0);
|
String[] s = result.get(0);
|
||||||
StudentInfo.put("学号",s[0]);
|
studentInfo.put("id",s[0]);
|
||||||
StudentInfo.put("名字",s[2]);
|
studentInfo.put("name",s[2]);
|
||||||
StudentInfo.put("邮箱",s[3]);
|
studentInfo.put("e_mail_location",s[3]);
|
||||||
StudentInfo.put("电话",s[4]);
|
studentInfo.put("phone_number",s[4]);
|
||||||
return StudentInfo;
|
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",1);
|
||||||
|
Map<String, Object> options = search.execute(null);
|
||||||
|
List<String[]> result = (List<String[]>) options.get("result");
|
||||||
|
List<Map<String,String>> studentsInfo = new ArrayList<>();
|
||||||
|
for(String[] s:result){
|
||||||
|
Map<String,String> studentInfo = new HashMap<>();
|
||||||
|
studentInfo.put("id",s[0]);
|
||||||
|
studentInfo.put("name",s[2]);
|
||||||
|
studentInfo.put("e_mail_location",s[3]);
|
||||||
|
studentInfo.put("phone_number",s[4]);
|
||||||
|
studentsInfo.add(studentInfo);
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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(){
|
|
||||||
C_TeacherSelectStudent tst = new C_TeacherSelectStudent();
|
public void select()throws Exception{
|
||||||
tst.setInfo( this.getInfo());
|
if(!check()) throw new GExcptInit("ID Attrs init error!");
|
||||||
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,50 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
|
||||||
|
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_opening_report_opinion_record";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("report_teacher_team_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package core.process;
|
||||||
|
|
||||||
|
import core.operation.FillInformation;
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class C_TeacherTeamFillScoreOpinion extends TempProcess {
|
||||||
|
|
||||||
|
String graduationDesignId;
|
||||||
|
Map<String,String> vMap;
|
||||||
|
|
||||||
|
static String table="graduation_design_reply_opinion_record_score";
|
||||||
|
|
||||||
|
public void fillInformation() throws Exception{
|
||||||
|
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||||
|
FillInformation fillInformation=new FillInformation();
|
||||||
|
fillInformation.setOptions(new HashMap<>());
|
||||||
|
fillInformation.addOptions("table",table);
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||||
|
String date=df.format(new Date());
|
||||||
|
vMap.put("teacher_team_opinion_date",date);
|
||||||
|
Map<String, String>limits = new HashMap<>();
|
||||||
|
limits.put("id",this.getGraduationDesignId());
|
||||||
|
fillInformation.addOptions("limits",limits);
|
||||||
|
fillInformation.execute(null);
|
||||||
|
}
|
||||||
|
protected boolean check() {
|
||||||
|
if(this.getGraduationDesignId()==null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getGraduationDesignId() {
|
||||||
|
return graduationDesignId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGraduationDesignId(String graduationDesignId) {
|
||||||
|
this.graduationDesignId = graduationDesignId;
|
||||||
|
}
|
||||||
|
public void setVMap(Map<String, String> vMap) {
|
||||||
|
this.vMap = vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package error;
|
||||||
|
|
||||||
|
public class GExcptInit extends GExcpt {
|
||||||
|
public GExcptInit(String info) {
|
||||||
|
super(info);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package gdms;
|
||||||
|
|
||||||
|
import error.GExcptInit;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class GDMS {
|
||||||
|
static Map<String, Date> schedules;
|
||||||
|
static String schedulePath = "";
|
||||||
|
public static void init() throws GExcptInit {
|
||||||
|
initSchedule();
|
||||||
|
Timer timer = new Timer(true);
|
||||||
|
for(Map.Entry<String, Date> schedule:schedules.entrySet()){
|
||||||
|
timer.schedule(getTimerTask(schedule.getKey()),schedule.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TimerTask getTimerTask(String s) throws GExcptInit {
|
||||||
|
if(s==""){
|
||||||
|
return new TimerTask() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new GExcptInit("GlobalTimePoint.json error");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void initSchedule() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"teacher_choose_student_start_date":"",
|
||||||
|
"student_choose_teacher_start_date": "",
|
||||||
|
"choose_end_date": "",
|
||||||
|
"opening_report_opinion_deadline_date": "",
|
||||||
|
"finished_product_deadline_date": "",
|
||||||
|
"finished_product_review_deadline_date": "",
|
||||||
|
"reply_option_deadline_date": ""
|
||||||
|
}
|
@ -1,18 +0,0 @@
|
|||||||
package gdms;
|
|
||||||
|
|
||||||
public class main {
|
|
||||||
public static void check()throws Exception{
|
|
||||||
checkJson();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void checkJson() throws Exception{
|
|
||||||
//todo
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void init(){
|
|
||||||
}
|
|
||||||
public static void run() throws Exception {
|
|
||||||
check();
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,31 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import core.process.C_CollegeFillOpeningReportOpinion;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("college-fill-opening-report-opinion")
|
||||||
|
public class S_CollegeFillOpeningReportOpinion extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
C_CollegeFillOpeningReportOpinion p =new C_CollegeFillOpeningReportOpinion();
|
||||||
|
p.setGraduationDesignId(id);
|
||||||
|
p.setVMap(vMap);
|
||||||
|
try {
|
||||||
|
p.fillInformation();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
response.sendRedirect("/op_fail.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"college_opinion"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import core.process.C_CollegeFillScoreOpinion;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("college-fill-score-opinion")
|
||||||
|
public class S_CollegeFillScoreOpinion extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
C_CollegeFillScoreOpinion p =new C_CollegeFillScoreOpinion();
|
||||||
|
p.setGraduationDesignId(id);
|
||||||
|
p.setVMap(vMap);
|
||||||
|
try {
|
||||||
|
p.fillInformation();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
response.sendRedirect("/op_fail.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"college_opinion",
|
||||||
|
"college_score"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import core.process.C_MentorFillOpeningReportOpinion;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("mentor-fill-opening-report-opinion")
|
||||||
|
public class S_MentorFillOpeningReportOpinion extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
C_MentorFillOpeningReportOpinion p = new C_MentorFillOpeningReportOpinion();
|
||||||
|
p.setGraduationDesignId(id);
|
||||||
|
p.setVMap(vMap);
|
||||||
|
try {
|
||||||
|
p.fillInformation();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
response.sendRedirect("/op_fail.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"mentor_opinion"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("mentor-fill-review")
|
||||||
|
public class S_MentorFillReview extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"total_grade",
|
||||||
|
"review_opinion"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("reviewer-fill-review")
|
||||||
|
public class S_ReviewerFillReview extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"score",
|
||||||
|
"opinion"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("school-fill-score-opinion")
|
||||||
|
public class S_SchoolFillScoreOpinion extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"school_opinion",
|
||||||
|
"school_score"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("secretary-fill-opening-report-record")
|
||||||
|
public class S_SecretaryFillOpeningReportRecord extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"secretary_record"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("secretary-fill-reply-record")
|
||||||
|
public class S_SecretaryFillReplyRecord extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"secretary_record"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("/student-fill-graduation-design-information")
|
||||||
|
public class S_StudentFillGraduationDesignInformation extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"chinese_name",
|
||||||
|
"english_name",
|
||||||
|
"type_of_topic",
|
||||||
|
"source_of_design",
|
||||||
|
"nature_of_design",
|
||||||
|
"description_of_topic"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.MultipartConfig;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@WebServlet("/student-upload-finished-product")
|
||||||
|
@MultipartConfig
|
||||||
|
public class S_StudentUploadFinishedProduct extends HttpServlet {
|
||||||
|
static String fileType = "graduation_design_finished_product";
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = "000";
|
||||||
|
//String id = request.getParameter("id");
|
||||||
|
String fileURL = servlet.Utils.saveFile(request, fileType);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import core.user.User;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.MultipartConfig;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.Part;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@WebServlet("/student-upload-opening-report")
|
||||||
|
@MultipartConfig
|
||||||
|
public class S_StudentUploadOpeningReport extends HttpServlet {
|
||||||
|
static String fileType = "graduation_design_opening_report";
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
String fileURL = servlet.Utils.saveFile(request, fileType);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("teacher-team-fill-opening-report-opinion")
|
||||||
|
public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"report_teacher_team_opinion"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@WebServlet("teacher-team-fill-score-opinion")
|
||||||
|
public class S_TeacherTeamFillScoreOpinion extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
|
||||||
|
|
||||||
|
}
|
||||||
|
static String[] vName = {
|
||||||
|
"teacher_team_opinion",
|
||||||
|
"teacher_team_score"
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package servlet;
|
||||||
|
|
||||||
|
import gdms.Configuration;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.Part;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface Utils {
|
||||||
|
static Map<String,String> getVMap(String[] vName, HttpServletRequest request){
|
||||||
|
Map<String,String> vMap = new HashMap<>();
|
||||||
|
for(int i=0;i<vName.length;i++){
|
||||||
|
vMap.put(vName[i],request.getParameter(vName[i]));
|
||||||
|
}
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
static String getFilePath(String table){
|
||||||
|
return Configuration.filePath+table+"/";
|
||||||
|
}
|
||||||
|
static String getFileName(String fileName){
|
||||||
|
SimpleDateFormat simpleDateFormat;
|
||||||
|
simpleDateFormat = new SimpleDateFormat("yyMMddHHmmssSSS");
|
||||||
|
Date date = new Date();
|
||||||
|
String str = simpleDateFormat.format(date);
|
||||||
|
str+=(int)(Math.random()*100000);
|
||||||
|
str+= utils.Utils.getFileType(fileName);
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
static String getFilePathName(String table, String fileName){
|
||||||
|
return getFilePath(table)+getFileName(fileName);
|
||||||
|
}
|
||||||
|
static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException {
|
||||||
|
Part part = request.getPart("graduation_design");
|
||||||
|
String header = part.getHeader("content-disposition");
|
||||||
|
String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1);
|
||||||
|
String filePathName = servlet.Utils.getFilePathName(table,path);
|
||||||
|
File file = new File(filePathName);
|
||||||
|
InputStream inputStream = part.getInputStream();
|
||||||
|
FileOutputStream outputStream = new FileOutputStream(file);
|
||||||
|
int len;
|
||||||
|
byte[] bytes = new byte[1024];
|
||||||
|
while ((len = inputStream.read(bytes)) != -1) {
|
||||||
|
outputStream.write(bytes, 0, len);
|
||||||
|
}
|
||||||
|
outputStream.close();
|
||||||
|
inputStream.close();
|
||||||
|
part.delete();
|
||||||
|
return filePathName;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package servlet.account;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import core.user.Student;
|
||||||
|
import core.user.User;
|
||||||
|
import core.user.utils.AccountManagement;
|
||||||
|
import error.GExcptAccount;
|
||||||
|
import error.GExcptSQL;
|
||||||
|
|
||||||
|
@WebServlet("/login")
|
||||||
|
public class S_Login extends HttpServlet {
|
||||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||||
|
throws IOException {
|
||||||
|
String id=request.getParameter("id");
|
||||||
|
String password=request.getParameter("password");
|
||||||
|
User user;
|
||||||
|
try {
|
||||||
|
user = AccountManagement.login(id,password);
|
||||||
|
} catch (GExcptSQL | SQLException gExcptSQL) {
|
||||||
|
gExcptSQL.printStackTrace();
|
||||||
|
response.sendRedirect("/op_fail.jsp");
|
||||||
|
return;
|
||||||
|
} catch (GExcptAccount gExcptAccount) {
|
||||||
|
gExcptAccount.printStackTrace();
|
||||||
|
response.sendRedirect("/op_fail.jsp");
|
||||||
|
return;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
response.sendRedirect("/op_fail.jsp");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
request.getSession().setAttribute("user",user);
|
||||||
|
response.sendRedirect("/home.jsp");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -1,44 +0,0 @@
|
|||||||
package servlet.account;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
|
||||||
import javax.servlet.http.HttpServlet;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import core.user.Student;
|
|
||||||
import core.user.User;
|
|
||||||
import core.user.utils.AccountManagement;
|
|
||||||
import error.GExcptAccount;
|
|
||||||
import error.GExcptSQL;
|
|
||||||
|
|
||||||
@WebServlet("/login")
|
|
||||||
public class login extends HttpServlet {
|
|
||||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
|
||||||
throws ServletException, IOException {
|
|
||||||
String id=request.getParameter("id");
|
|
||||||
String password=request.getParameter("password");
|
|
||||||
User user = null;
|
|
||||||
try {
|
|
||||||
user = AccountManagement.login(id,password);
|
|
||||||
} catch (GExcptSQL | SQLException gExcptSQL) {
|
|
||||||
gExcptSQL.printStackTrace();
|
|
||||||
response.sendRedirect("/op_fail.jsp");
|
|
||||||
return;
|
|
||||||
} catch (GExcptAccount gExcptAccount) {
|
|
||||||
gExcptAccount.printStackTrace();
|
|
||||||
response.sendRedirect("/op_fail.jsp");
|
|
||||||
return;
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
response.sendRedirect("/op_fail.jsp");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
request.getSession().setAttribute("user",user);
|
|
||||||
response.sendRedirect("/home.jsp");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue