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

zgl
zgl 6 years ago
commit 7158dd0bef

@ -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_11" default="false" project-jdk-name="10" 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 @@
package core.process; package core.process;
import core.operation.UploadFileOperation; import core.operation.UploadFile;
import error.GExcptInit; import error.GExcptInit;
import java.io.File; import java.io.File;
@ -9,24 +9,24 @@ import java.util.Map;
public class C_StudentUploadOpeningReport extends TempProcess{ public class C_StudentUploadOpeningReport extends TempProcess{
File openingReport; File openingReport;
String gaduationDesignId; String graduationDesignId;
static String file_type = "opening_report"; static String file_type = "opening_report";
public void uploadOpeningReport() throws Exception{ public void uploadOpeningReport() throws Exception{
if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!"); if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!");
UploadFileOperation uploadFileOperation=new UploadFileOperation(); UploadFile uploadFile=new UploadFile();
uploadFileOperation.setOptions(new HashMap<>()); uploadFile.setOptions(new HashMap<>());
uploadFileOperation.addOptions("file",this.getOpeningReport()); uploadFile.addOptions("file",this.getOpeningReport());
uploadFileOperation.addOptions("file_type",file_type); uploadFile.addOptions("file_type",file_type);
Map<String, String>limits = new HashMap<>(); Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGaduationDesignId()); limits.put("id",this.getGraduationDesignId());
uploadFileOperation.addOptions("limits",limits); uploadFile.addOptions("limits",limits);
uploadFileOperation.execute(null); uploadFile.execute(null);
} }
protected boolean check() { protected boolean check() {
if(this.getGaduationDesignId()==null||this.getOpeningReport()==null) if(this.getGraduationDesignId()==null||this.getOpeningReport()==null)
return false; return false;
return true; return true;
} }
@ -39,11 +39,11 @@ public class C_StudentUploadOpeningReport extends TempProcess{
this.openingReport = openingReport; this.openingReport = openingReport;
} }
public String getGaduationDesignId() { public String getGraduationDesignId() {
return gaduationDesignId; return graduationDesignId;
} }
public void setGaduationDesignId(String gaduationDesignId) { public void setGraduationDesignId(String graduationDesignId) {
this.gaduationDesignId = gaduationDesignId; this.graduationDesignId = graduationDesignId;
} }
} }

@ -9,7 +9,7 @@ import java.util.Map;
public class C_TeacherFillTopicInformation extends TempProcess{ public class C_TeacherFillTopicInformation extends TempProcess{
String StudentId; String studentId;
String mentor_opinion; String mentor_opinion;
Date mentor_opinion_date; Date mentor_opinion_date;
@ -36,11 +36,11 @@ public class C_TeacherFillTopicInformation extends TempProcess{
return true; return true;
} }
public String getStudentId() { public String getStudentId() {
return StudentId; return studentId;
} }
public void setStudentId(String studentId) { public void setStudentId(String studentId) {
StudentId = studentId; this.studentId = studentId;
} }
public String getMentor_opinion() { public String getMentor_opinion() {
return mentor_opinion; return mentor_opinion;

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_CollegeFillOpeningReportOpinion") @WebServlet(name = "S_CollegeFillOpeningReportOpinion")
public class S_CollegeFillOpeningReportOpinion extends HttpServlet { public class S_CollegeFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_CollegeFillScoreOpinion") @WebServlet(name = "S_CollegeFillScoreOpinion")
public class S_CollegeFillScoreOpinion extends HttpServlet { public class S_CollegeFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_MentorFillOpeningReportOpinion") @WebServlet(name = "S_MentorFillOpeningReportOpinion")
public class S_MentorFillOpeningReportOpinion extends HttpServlet { public class S_MentorFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_MentorFillReview") @WebServlet(name = "S_MentorFillReview")
public class S_MentorFillReview extends HttpServlet { public class S_MentorFillReview extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_ReviewerFillReview") @WebServlet(name = "S_ReviewerFillReview")
public class S_ReviewerFillReview extends HttpServlet { public class S_ReviewerFillReview extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_SchoolFillScoreOpinion") @WebServlet(name = "S_SchoolFillScoreOpinion")
public class S_SchoolFillScoreOpinion extends HttpServlet { public class S_SchoolFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_SecretaryFillOpeningReportRecord") @WebServlet(name = "S_SecretaryFillOpeningReportRecord")
public class S_SecretaryFillOpeningReportRecord extends HttpServlet { public class S_SecretaryFillOpeningReportRecord extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_SecretaryFillReplyRecord") @WebServlet(name = "secretary-fill-reply-record")
public class S_SecretaryFillReplyRecord extends HttpServlet { public class S_SecretaryFillReplyRecord extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
}
} }

@ -1,23 +1,29 @@
package servlet; package servlet;
import core.user.User;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet; import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet("/student-fill-graduation-design-information") @WebServlet("/student-fill-graduation-design-information")
public class S_StudentFillGraduationDesignInformation extends HttpServlet { public class S_StudentFillGraduationDesignInformation extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String content1=new String(request.getParameter("text").getBytes("ISO8859-1"),"UTF-8");
String content2=request.getParameter("score");
try {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
} catch (Exception e) {
e.printStackTrace();
}
} }
static String[] vName = {
"chinese_name",
"english_name",
"type_of_topic",
"source_of_design",
"nature_of_design",
"description_of_topic"
};
} }

@ -13,13 +13,13 @@ import java.io.IOException;
public class S_StudentSelectTeacher extends HttpServlet { public class S_StudentSelectTeacher extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response); super.doPost(request, response);
String teacher_id=request.getParameter("id"); String teacherId=request.getParameter("id");
User user=(User)request.getSession().getAttribute("user"); User user=(User)request.getSession().getAttribute("user");
String student_id=user.getId(); String studentId=user.getId();
try { try {
C_StudentSelectTeacher SST=new C_StudentSelectTeacher(); C_StudentSelectTeacher SST=new C_StudentSelectTeacher();
SST.setTeacherId(teacher_id); SST.setTeacherId(teacherId);
SST.setStudentId(student_id); SST.setStudentId(studentId);
SST.select(); SST.select();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

@ -1,19 +1,17 @@
package servlet; package servlet;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet; import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
@WebServlet(name = "S_StudentUploadFinishedProduct") @WebServlet(name = "student-upload-finished-product")
@MultipartConfig
public class S_StudentUploadFinishedProduct extends HttpServlet { public class S_StudentUploadFinishedProduct extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
} }
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
} }

@ -13,13 +13,13 @@ import java.io.IOException;
public class S_TeacherSelectStudent extends HttpServlet { public class S_TeacherSelectStudent extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response); super.doPost(request, response);
String student_id=request.getParameter("id"); String studentId=request.getParameter("id");
User user=(User)request.getSession().getAttribute("user"); User user=(User)request.getSession().getAttribute("user");
String teacher_id=user.getId(); String teacherId=user.getId();
try { try {
C_TeacherSelectStudent TSS=new C_TeacherSelectStudent(); C_TeacherSelectStudent TSS=new C_TeacherSelectStudent();
TSS.setTeacherId(teacher_id); TSS.setTeacherId(teacherId);
TSS.setStudentId(student_id); TSS.setStudentId(studentId);
TSS.select(); TSS.select();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_TeacherTeamFillOpeningReportOpinion") @WebServlet(name = "teacher-team-fill-opening-report-opinion")
public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet { public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
} }
}

@ -6,14 +6,16 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
@WebServlet(name = "S_TeacherFillTeamFillScoreOpinion") @WebServlet(name = "S_TeacherTeamFillScoreOpinion")
public class S_TeacherFillTeamFillScoreOpinion extends HttpServlet { public class S_TeacherTeamFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 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 = {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ""
};
}
} }

@ -1,4 +1,18 @@
package servlet; package servlet;
import org.apache.coyote.Request;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface Utils { 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;
}
} }

Loading…
Cancel
Save