增加process

wmj
wan 6 years ago
commit 0bbdd94575

@ -1,7 +1,7 @@
<?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="d0989a90-3d64-4aea-93d3-6e27652a2f33">
<data-source source="LOCAL" name="gdms@localhost" uuid="9ab10673-d584-44a7-a783-8ac833d52c51">
<driver-ref>mariadb</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="zhai_">
<words>
<w>mariadb</w>
</words>
</dictionary>
</component>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -12,9 +12,7 @@ public class Delete extends Operation {
public Map<String, Object> execute(User subject) throws GExcptSQL {
Map<String, String> map = new HashMap<>();
map.put("id",(String)this.getOptions().get("id"));
for(String table:DBManagement.graduationDesignTables){
DBManagement.delete(table,map);
}
//todo
return this.getOptions();
}
}

@ -12,17 +12,15 @@ public class Select extends Operation {
@Override
public Map<String, Object> execute(User subject) throws GExcptSQL {
Map<String, String> vMap = new HashMap<>();
Map<String, String> limits = new HashMap<>();
String id = (String)this.getOptions().get("student_id");
String teacher_id = (String)this.getOptions().get("teacher_id");
vMap.put("id",id);
limits.put("id",id);
vMap.put("student_id",id);
vMap.put("teacher_id",teacher_id);
DBManagement.insert("graduation_design", vMap);
DBManagement.update("graduation_design", vMap,limits);
vMap.remove("student_id");
vMap.remove("teacher_id");
for(int i=1;i<DBManagement.graduationDesignTables.length;i++){
DBManagement.insert(DBManagement.graduationDesignTables[i],vMap);
}
return this.getOptions();
}
}

@ -11,9 +11,10 @@ import java.util.Map;
public class C_CollegeFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="学院开题意见";
protected static String buttonName ="学院开题意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/college-fill-opening-report-opinion";
protected static String info = "";
static String table="graduation_design_opening_report_opinion_record";
@ -50,4 +51,23 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{
public Map<String, String> getVMap() {
return vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -12,12 +12,11 @@ public class C_CollegeFillScoreOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="学院老师评分";
protected static String buttonName ="学院老师评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/college-fill-score-opinion";
protected static String iconURL="../cssFile/images/fill.png";
static String table="graduation_design_reply_opinion_record_score";
protected static String info = "";
public void fillInformation() throws Exception{
if(!check()) throw new GExcptInit("FillInformation Attrs Init error!");
@ -46,4 +45,23 @@ public class C_CollegeFillScoreOpinion extends TempProcess{
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -0,0 +1,8 @@
package core.process;
public abstract class C_FillInformation extends TempProcess {
public String getJspURL(){
return "/home/.jsp";
}
}

@ -0,0 +1,8 @@
package core.process;
public abstract class C_FillSbjMsg extends TempProcess {
public String getJspURL(){
return "/home/upload_file.jsp";
}
}

@ -12,11 +12,11 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="导师开题意见";
protected static String buttonName ="导师开题意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/mentor-fill-opening-report-opinion";
protected static String info = "";
protected static String iconURL="../cssFile/images/fill.png";
static String table="graduation_design_opening_report_opinion_record";
public void fillInformation() throws Exception{
@ -55,4 +55,23 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{
public Map<String, String> getVMap() {
return vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -12,9 +12,10 @@ public class C_MentorFillReview extends TempProcess {
public String graduationDesignId;
public Map<String,String> vMap;
private static String buttonName ="指导老师评阅";
protected static String buttonName ="指导老师评阅";
protected static String targetURL="/home/mentor-fill-review";
protected static String iconURL="../cssFile/images/fill.png";
protected static String info = "";
static String table="graduation_design_finished_product_mentor_score";
@ -52,5 +53,25 @@ public class C_MentorFillReview extends TempProcess {
public Map<String, String> getVMap() {
return vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -11,9 +11,10 @@ import java.util.Map;
public class C_ReviewerFillReview extends TempProcess {
public String graduationDesignId;
public Map<String,String> vMap;
private static String buttonName ="评阅老师评阅";
protected static String buttonName ="评阅老师评阅";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/reviewer-fill-review";
protected static String info = "";
static String table="graduation_design_finished_product_reviewer_score";
@ -50,6 +51,25 @@ public class C_ReviewerFillReview extends TempProcess {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -12,9 +12,10 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="学院老师评分";
protected static String buttonName ="学院老师评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/school-fill-score-opinion";
protected static String info = "";
static String table="graduation_design_reply_opinion_record_score";
public void fillInformation() throws Exception{
@ -52,6 +53,25 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
return vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -8,13 +8,14 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
public class C_SecretaryFillOpeningReportRecord extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="提交开题纪要";
protected static String buttonName ="提交开题纪要";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/secretary-fill-opening-report-record";
protected static String info = "";
static String table="graduation_design_opening_report_opinion_record";
@ -53,4 +54,23 @@ public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
return vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -12,9 +12,10 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="提交答辩记录";
protected static String buttonName ="提交答辩记录";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/secretary-fill-reply-record";
protected static String info = "";
static String table="graduation_design_reply_opinion_record_score";
@ -54,4 +55,23 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -0,0 +1,4 @@
package core.process;
public class C_Select {
}

@ -11,9 +11,10 @@ import java.util.Map;
public class C_StudentFillGraduationDesignInformation extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="填写选题信息";
protected static String buttonName ="填写选题信息";
protected static String iconURL="../cssFile/images/filText.png";
protected static String targetURL="/home/student-fill-graduation-design-information";
protected static String info = "";
static String table="graduation_design_opening_report_opinion_record";
@ -51,4 +52,23 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -11,6 +11,10 @@ import java.util.Map;
public class C_StudentSearchTeacher extends TempProcess{
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>();
@ -36,6 +40,25 @@ public class C_StudentSearchTeacher extends TempProcess{
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)
@ -48,4 +71,23 @@ public class C_StudentSearchTeacher extends TempProcess{
public void setTeacherID(String teacherID){
this.teacherID=teacherID;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -1,5 +1,6 @@
package core.process;
import core.operation.Search;
import core.operation.Select;
import error.GExcptInit;
@ -11,9 +12,10 @@ import java.util.Map;
public class C_StudentSelectTeacher extends TempProcess {
String studentId;
String teacherId;
private static String buttonName ="选择老师";
protected static String buttonName ="选择老师";
protected static String targetURL="/home/student-select-teacher";
protected static String iconURL="../cssFile/images/select.png";
protected static String info = "";
public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!");
@ -23,6 +25,24 @@ public class C_StudentSelectTeacher extends TempProcess {
select.addOptions("teacher_id",this.getTeacherId());
Map<String,Object> options=select.execute(null);
}
public List<Map<String,String>> search(String teacherId) throws Exception{
Search search = new Search() ;
search.setOptions(new HashMap<>());
search.addOptions("table","teacher");
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",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.getStudentId()==null||this.getTeacherId()==null)
return false;
@ -45,5 +65,24 @@ public class C_StudentSelectTeacher extends TempProcess {
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -7,13 +7,14 @@ import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class C_StudentUploadFinishedProduct extends TempProcess {
public class C_StudentUploadFinishedProduct extends C_UploadFile {
File finishedProduct;
String graduationDesignId;
private static String buttonName ="提交定稿";
protected static String buttonName ="提交定稿";
protected static String iconURL="../cssFile/images/upload.png";
protected static String targetURL="/home/student-upload-finished-product";
protected static String info = "";
static String file_type = "finished_product";
public void uploadOpeningReport() throws Exception{
@ -48,4 +49,23 @@ public class C_StudentUploadFinishedProduct extends TempProcess {
this.graduationDesignId = graduationDesignId;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -10,10 +10,11 @@ import java.util.Map;
public class C_StudentUploadOpeningReport extends TempProcess{
File openingReport;
String graduationDesignId;
private static String buttonName ="提交开题报告";
protected static String buttonName ="提交开题报告";
static String file_type = "opening_report";
protected static String targetURL="/home/student-upload-opening-report";
protected static String iconURL="../cssFile/images/upload.png";
protected static String info = "";
public void uploadOpeningReport() throws Exception{
if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!");
@ -48,4 +49,24 @@ public class C_StudentUploadOpeningReport extends TempProcess{
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -11,6 +11,10 @@ import java.util.Map;
public class C_TeacherSearchStudent extends TempProcess {
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{
@ -48,18 +52,11 @@ public class C_TeacherSearchStudent extends TempProcess {
limits.put("id",this.getStudentId());
search.addOptions("limits",limits);
search.addOptions("start",0);
search.addOptions("end",1);
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<>();
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);
}
core.process.Utils.formatResult(result, studentsInfo);
return studentsInfo;
}
protected boolean check() {
@ -74,4 +71,23 @@ public class C_TeacherSearchStudent extends TempProcess {
this.studentId=studentId;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -1,5 +1,6 @@
package core.process;
import core.operation.Search;
import core.operation.Select;
import error.GExcptInit;
@ -11,9 +12,10 @@ import java.util.Map;
public class C_TeacherSelectStudent extends TempProcess {
String studentId;
String teacherId;
private static String buttonName ="选择学生";
protected static String buttonName ="选择学生";
protected static String iconURL="";
protected static String targetURL="/home/teacher-select-student";
protected static String info = "";
public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!");
@ -23,6 +25,24 @@ public class C_TeacherSelectStudent extends TempProcess {
select.addOptions("student_id",this.getStudentId());
Map<String,Object> options=select.execute(null);
}
public List<Map<String,String>> search(String studentId) throws Exception{
Search search = new Search() ;
search.setOptions(new HashMap<>());
search.addOptions("table","student");
List<String> fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>();
limits.put("id",studentId);
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||this.getTeacherId()==null)
return false;
@ -44,6 +64,24 @@ public class C_TeacherSelectStudent extends TempProcess {
this.studentId = studentId;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -12,9 +12,10 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="开题小组意见";
protected static String buttonName ="开题小组意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/teacher-team-fill-opening-report-opinion";
protected static String info = "";
static String table="graduation_design_opening_report_opinion_record";
@ -54,5 +55,24 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
return vMap;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
}

@ -10,9 +10,10 @@ import java.util.Map;
public class C_TeacherTeamFillScoreOpinion extends TempProcess {
private static String buttonName = "答辩小组评分";
protected static String buttonName = "答辩小组评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/teacher-team-fill-score-opinion";
protected static String info = "";
String graduationDesignId;
Map<String,String> vMap;
@ -36,6 +37,27 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess {
return false;
return true;
}
@Override
public String getInfo() {
return info;
}
@Override
public String getTargetURL() {
return targetURL;
}
@Override
public String getIconURL() {
return iconURL;
}
@Override
public String getButtonName() {
return buttonName;
}
@Override
public String getGraduationDesignId() {
return graduationDesignId;

@ -1,4 +1,7 @@
package core.process;
public class C_UploadFile extends TempProcess {
public abstract class C_UploadFile extends TempProcess {
public String getJspURL(){
return "/home/upload_file.jsp";
}
}

@ -3,7 +3,7 @@ package core.process;
import java.util.ArrayList;
import java.util.List;
public class Condition {//条件
public class Condition {
public List<Process> getProcesses() {
return processes;
}

@ -4,16 +4,10 @@ import core.operation.Operation;
public abstract class Process{
private static String buttonName;
protected static String targetURL;
protected static String iconURL;
private String status;
private String permission;
private Operation operation;
private String info;
protected abstract boolean check();
@ -33,18 +27,6 @@ public abstract class Process{
this.operation = operation;
}
public String getButtonName() {
return buttonName;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
public String getStatus() {
return status;
}
@ -53,11 +35,11 @@ public abstract class Process{
this.status = status;
}
public static String getTargetURL() {
return targetURL;
}
public abstract String getInfo();
public static String getIconURL() {
return iconURL;
}
public abstract String getTargetURL();
public abstract String getIconURL();
public abstract String getButtonName();
}

@ -15,7 +15,7 @@ public class ProcessManagement {
public static Condition getCondition(User user, Map<String, String> status){
Condition condition = new Condition();
for(Map.Entry<String,String> entry:status.entrySet()){
String[] s = entry.getKey().split(".");
String[] s = entry.getKey().split("\\.");
TempProcess tempProcess = (TempProcess) getProcess(s[1]);
tempProcess.setGraduationDesignId(s[0]);
tempProcess.setStatus(entry.getValue());
@ -26,17 +26,18 @@ public class ProcessManagement {
}
private static List<Process> getLastProcesses(User user) {
return null;
List<Process> lp = new ArrayList<>();
return lp;
}
//Map<graduation_design_id.x_status,status>
public static Map<String,String> getStatus(User user) throws Exception {
Map<String, String> status = new HashMap<>();
Map<String,String> userTables = DBManagement.getUserStatusTables(user.getType());
String[][] userTables = DBManagement.getUserStatusTables(user.getType());
String graduationDesignId = null;
for(Map.Entry<String,String> entry:userTables.entrySet()){
String[] ti = entry.getKey().split(".");
String[] ts = entry.getValue().split(".");
for(String[] s:userTables){
String[] ti = s[0].split("\\.");
String[] ts = s[1].split("\\.");
List<String> ls = new ArrayList<>();
ls.add("id");
Map<String,String> limits = new HashMap<>();
@ -81,12 +82,13 @@ public class ProcessManagement {
case"reply_ secretary_record_status":
return new C_SecretaryFillReplyRecord();
case"reply_ teacher_team_score_status":
return new C_TeacherFillTeamFillScoreOpinion();
return new C_TeacherTeamFillScoreOpinion();
case"reply_college_score_status":
return new C_CollegeFillScoreOpinion();
case"reply_school_score_status":
return new C_SchoolFillScoreOpinion();
default:
return null;
}
}
}

@ -0,0 +1,18 @@
package core.process;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface Utils {
static void formatResult(List<String[]> result, List<Map<String, String>> studentsInfo) {
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);
}
}
}

@ -1,8 +1,10 @@
package core.user;
import core.process.Condition;
import core.process.ProcessManagement;
import core.user.userFun.AccountManageable;
import core.user.userFun.ProcessConfigurable;
import core.user.utils.AccountManagement;
import java.util.List;
import java.util.Map;
@ -115,4 +117,9 @@ public abstract class User implements AccountManageable, ProcessConfigurable{
this.setE_mail_location(vMap.get("e_mail_location"));
this.setPhone_number(vMap.get("phone_number"));
}
public void initCondition() throws Exception {
this.condition = ProcessManagement.getCondition(this);
}
}

@ -1,5 +1,6 @@
package core.user.utils;
import core.user.Student;
import core.user.User;
import core.utils.GetObjectByName;
import dao.DBManagement;
@ -49,7 +50,11 @@ public interface AccountManagement {
}
static User register(String userType, Map<String, String> vMap) throws Exception {
DBManagement.insert(userType,vMap);
return createUser(userType, vMap);
if(userType.equals("student")){
initAllStatus(vMap.get("id"));
}
User user = createUser(userType, vMap);
return user;
}
static void logout(User user){
//todo
@ -60,6 +65,28 @@ public interface AccountManagement {
static User createUser(String userType, Map<String, String> vMap) throws Exception {
User user = GetObjectByName.getUserByName(userType);
user.setAttr(vMap);
user.initCondition();
return user;
}
String defaultStatus = "1";
static void initAllStatus(String id) throws GExcptSQL {
for(String table:DBManagement.graduationDesignTables){
Map<String,String> vMap = new HashMap<>();
vMap.put("id",id);
DBManagement.insert(table,vMap);
}
for(String[] s:DBManagement.allStatus){
Map<String,String> vMap = new HashMap<>();
Map<String,String> limits = new HashMap<>();
limits.put("id",id);
vMap.put(s[1],defaultStatus);
DBManagement.update(s[0],vMap,limits);
}
//
Map<String,String> vMap = new HashMap<>();
Map<String,String> limits = new HashMap<>();
limits.put("id",id);
vMap.put("student_id",id);
DBManagement.update("graduation_design",vMap,limits);
}
}

@ -2,7 +2,6 @@ package dao;
import java.sql.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import error.GExcptSQL;
@ -56,36 +55,49 @@ public class DBManagement {
"phone_number"
};
//<table1.x_id,table2.x_status>
public static Map<String,String> graduationDesignStudentTables = new HashMap<>(){
{
put("graduation_design.student_id","graduation_design.student_chooser_teacher_status");
put("graduation_design.student_id","graduation_design_information.student_fill_graduation_design_information_status");
put("graduation_design.student_id","graduation_design_opening_report.opening_report_status");
put("opening_report_secretary_team.leader_student_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status");
put("opening_report_secretary_team.student1_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status");
put("opening_report_secretary_team.student2_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status");
put("graduation_design.student_id","graduation_design_finished_product.finished_product_status");
put("reply_secretary_team.leader_student_id","graduation_design_reply_opinion_record_score.reply_ secretary_record_status");
put("reply_secretary_team.teacher1_id","graduation_design_reply_opinion_record_score.reply_ secretary_record_status");
put("reply_secretary_team.teacher2_id","graduation_design_reply_opinion_record_score.reply_ secretary_record_status");
}
public static String[][] graduationDesignStudentTables ={
{"graduation_design.student_id","graduation_design.student_choose_teacher_status"},
{"graduation_design.student_id","graduation_design_information.student_fill_graduation_design_information_status"},
{"graduation_design.student_id","graduation_design_opening_report.opening_report_status"},
{"graduation_design_opening_report_view.leader_student_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status"},
{"graduation_design_opening_report_view.student1_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status"},
{"graduation_design_opening_report_view.student2_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status"},
{"graduation_design.student_id","graduation_design_finished_product.finished_product_status"},
{"graduation_design_reply_view.leader_student_id","graduation_design_reply_opinion_record_score.reply_secretary_record_status"},
{"graduation_design_reply_view.teacher1_id","graduation_design_reply_opinion_record_score.reply_secretary_record_status"},
{"graduation_design_reply_view.teacher2_id","graduation_design_reply_opinion_record_score.reply_secretary_record_status"}
};
public static Map<String,String> graduationDesignTeacherTables = new HashMap<>(){
{
put("graduation_design.teacher_id","graduation_design.teacher_choose_student_status");
put("graduation_design.teacher_id","graduation_design_opening_report_opinion_record.opening_report_mentor_opinion_status");
put("opening_report_teacher_team.leader_teacher_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status");
put("opening_report_teacher_team.teacher1_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status");
put("opening_report_teacher_team.teacher2_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status");
put("graduation_design_opening_report_opinion_record.opening_report_college_teacher_id","graduation_design_opening_report_opinion_record.opening_report_college_opinion_status");
put("graduation_design.teacher_id","graduation_design_finished_product_mentor_score.finished_product_mentor_score_status");
put("graduation_design_finished_product_reviewer_score.reviewer_teacher_id","graduation_design_finished_product_reviewer_score.finished_product_reviewer_score_status");
put("reply_teacher_team.leader_teacher_id","graduation_design_reply_opinion_record_score.reply_ teacher_team_score_status");
put("reply_teacher_team. teacher1_id","graduation_design_reply_opinion_record_score.reply_ teacher_team_score_status");
put("reply_teacher_team. teacher2_id","graduation_design_reply_opinion_record_score.reply_ teacher_team_score_status");
put("graduation_design_reply_opinion_record_score.reply_college_teacher_id","graduation_design_reply_opinion_record_score.reply_college_score_status");
put("graduation_design_reply_opinion_record_score.reply_school_teacher_id","graduation_design_reply_opinion_record_score.reply_school_score_status");
}
public static String[][] graduationDesignTeacherTables = {
{"graduation_design.teacher_id","graduation_design.teacher_choose_student_status"},
{"graduation_design.teacher_id","graduation_design_opening_report_opinion_record.opening_report_mentor_opinion_status"},
{"graduation_design_opening_report_view.leader_teacher_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_view.teacher1_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_view.teacher2_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_opinion_record.opening_report_college_teacher_id","graduation_design_opening_report_opinion_record.opening_report_college_opinion_status"},
{"graduation_design.teacher_id","graduation_design_finished_product_mentor_score.finished_product_mentor_score_status"},
{"graduation_design_finished_product_reviewer_score.reviewer_teacher_id","graduation_design_finished_product_reviewer_score.finished_product_reviewer_score_status"},
{"graduation_design_reply_view.leader_teacher_id","graduation_design_reply_opinion_record_score.reply_teacher_team_score_status"},
{"graduation_design_reply_view.teacher1_id","graduation_design_reply_opinion_record_score.reply_teacher_team_score_status"},
{"graduation_design_reply_view.teacher2_id","graduation_design_reply_opinion_record_score.reply_teacher_team_score_status"},
{"graduation_design_reply_opinion_record_score.reply_college_teacher_id","graduation_design_reply_opinion_record_score.reply_college_score_status"},
{"graduation_design_reply_opinion_record_score.reply_school_teacher_id","graduation_design_reply_opinion_record_score.reply_school_score_status"}
};
public static String[][] allStatus = {
{"graduation_design","teacher_choose_student_status"},
{"graduation_design","student_choose_teacher_status"},
{"graduation_design_information","student_fill_graduation_design_information_status"},
{"graduation_design_opening_report","opening_report_status"},
{"graduation_design_opening_report_opinion_record","opening_report_mentor_opinion_status"},
{"graduation_design_opening_report_opinion_record","opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_opinion_record","opening_report_college_opinion_status"},
{"graduation_design_opening_report_opinion_record","opening_report_secretary_record_status"},
{"graduation_design_finished_product","finished_product_status"},
{"graduation_design_finished_product_mentor_score","finished_product_mentor_score_status"},
{"graduation_design_finished_product_reviewer_score","finished_product_reviewer_score_status"},
{"graduation_design_reply_opinion_record_score","reply_secretary_record_status"},
{"graduation_design_reply_opinion_record_score","reply_teacher_team_score_status"},
{"graduation_design_reply_opinion_record_score","reply_college_score_status"},
{"graduation_design_reply_opinion_record_score","reply_school_score_status"}
};
public static String driverClassName="org.mariadb.jdbc.Driver";
@ -118,7 +130,7 @@ public class DBManagement {
}
return null;
}
public static Map<String,String> getUserStatusTables(String userType){
public static String[][] getUserStatusTables(String userType){
if(userType.equals("student")){
return graduationDesignStudentTables;
}
@ -159,6 +171,11 @@ public class DBManagement {
String sql = update.getSQL();
update(sql);
}
public static void updateAll(String table, List<String> fields, String increment) throws GExcptSQL {
UpdateAll updateAll = new UpdateAll(table,fields,increment);
String sql = updateAll.getSQL();
update(sql);
}
public static List<String[]> query(String sql) throws Exception {
if(!ifInit) return null;
List<String[]> ls;
@ -178,7 +195,7 @@ public class DBManagement {
ls.add(s);
}
} catch (SQLException e) {
throw new GExcptSQL("Connect Failure");
throw new GExcptSQL("Connect Failure\n"+sql);
}finally {
if(con!=null) {
try {
@ -198,7 +215,7 @@ public class DBManagement {
Statement stmt = con.createStatement();
stmt.executeUpdate(sql);
} catch (SQLException e) {
throw new GExcptSQL("Connect Failure");
throw new GExcptSQL("Connect Failure\n"+sql);
}finally {
if(con!=null) {
try {
@ -209,4 +226,6 @@ public class DBManagement {
}
}
}
}

@ -0,0 +1,48 @@
package dao;
import java.util.List;
public class UpdateAll extends SQLStmt {
private static final String fs ="UPDATE ";
List<String> fields;
String increment;
public UpdateAll(String table, List<String> fields, String increment) {
super(table);
this.setFields(fields);
this.setIncrement(increment);
}
@Override
public String getSQL() {
return this.getFs()+this.getUs();
}
@Override
public String getFs() {
return fs+this.getTable()+" ";
}
public String getUs(){
String us = "SET ";
for(String s:this.getFields()){
us+=s+" = "+s+" + "+this.getIncrement()+", ";
}
return utils.Utils.cutTail(us,2);
}
public List<String> getFields() {
return fields;
}
public void setFields(List<String> fields) {
this.fields = fields;
}
public String getIncrement() {
return increment;
}
public void setIncrement(String increment) {
this.increment = increment;
}
}

@ -6,7 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebFilter(filterName = "OnlineCheck",urlPatterns = "/home.jsp")
@WebFilter(filterName = "OnlineCheck",urlPatterns = "/home/*")
public class OnlineCheck implements Filter {
public void destroy() {
}

@ -2,7 +2,7 @@ package gdms;
public interface Configuration {
//file
String filePath = "/";
String filePath = "C:/Users/zhai_/Desktop/";
//database
String dbUrl="jdbc:mariadb://localhost:3306/gdms";
String dbUsername="gdms";

@ -1,6 +1,8 @@
package gdms;
import dao.DBManagement;
import error.GExcptInit;
import error.GExcptSQL;
import java.util.*;
@ -15,14 +17,72 @@ public class GDMS {
}
}
private static TimerTask getTimerTask(String s) throws GExcptInit {
if(s==""){
return new TimerTask() {
@Override
public void run() {
;
}
};
switch (s){
case "teacher_choose_student_start_date":
return new TimerTask() {
@Override
public void run() {
List<String> fields = new ArrayList<>();
fields.add("teacher_choose_student_status");
try {
DBManagement.updateAll("graduation_design",fields,"1");
} catch (GExcptSQL gExcptSQL) {
gExcptSQL.printStackTrace();
System.exit(1);
}
}
};
case "student_choose_teacher_start_date":
return new TimerTask() {
@Override
public void run() {
List<String> fields = new ArrayList<>();
fields.add("teacher_choose_student_status");
try {
DBManagement.updateAll("graduation_design",fields,"1");
} catch (GExcptSQL gExcptSQL) {
gExcptSQL.printStackTrace();
System.exit(1);
}
}
};
case "choose_end_date":
return new TimerTask() {
@Override
public void run() {
;
}
};
case "opening_report_opinion_deadline_date":
return new TimerTask() {
@Override
public void run() {
;
}
};
case "finished_product_deadline_date":
return new TimerTask() {
@Override
public void run() {
;
}
};
case "finished_product_review_deadline_date":
return new TimerTask() {
@Override
public void run() {
;
}
};
case "reply_opinion_deadline_date":
return new TimerTask() {
@Override
public void run() {
;
}
};
}
throw new GExcptInit("GlobalTimePoint.json error");

@ -5,5 +5,5 @@
"opening_report_opinion_deadline_date": "",
"finished_product_deadline_date": "",
"finished_product_review_deadline_date": "",
"reply_opition_deadline_date": ""
"reply_opinion_deadline_date": ""
}

@ -2,7 +2,9 @@ package gdms;
import core.operation.utils.Utils;
import core.process.C_StudentSelectTeacher;
import dao.DBManagement;
import dao.Select;
import dao.UpdateAll;
import java.util.ArrayList;
import java.util.HashMap;
@ -11,14 +13,12 @@ import java.util.Map;
public class test {
public static void main(String[] args){
int i=0;
do{
i++;
System.out.println(i);
}while(i<3);
List<String> ls = new ArrayList<>();
ls.add("teacher_choose_student_status");
ls.add("student_choose_teacher_status");
UpdateAll s = new UpdateAll("graduation_design",ls,"10");
System.out.println(s.getSQL());
}
static void changeB(String a){
a="B";
}
}

@ -20,7 +20,7 @@ public class S_MentorFillReview extends HttpServlet {
p.setGraduationDesignId(id);
p.setVMap(vMap);
try {
p.fillInformation();
p.teacherTeamFillOpeningReportOpinion();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");

@ -20,7 +20,7 @@ public class S_ReviewerFillReview extends HttpServlet {
p.setGraduationDesignId(id);
p.setVMap(vMap);
try {
p.fillInformation();
p.TeacherTeamFillOpeningReportOpinion();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");

@ -1,6 +1,5 @@
package servlet;
import core.process.C_StudentSearchTeacher;
import core.process.C_StudentSelectTeacher;
import core.user.User;
import javax.servlet.ServletException;
@ -26,4 +25,5 @@ public class S_StudentSelectTeacher extends HttpServlet {
response.sendRedirect("/op_fail.jsp");
}
}
}

@ -13,17 +13,14 @@ import java.io.IOException;
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 files = request.getParameter("file");
System.out.print("123");
System.out.print( request.getPart("file"));
System.out.print("123");
String id = request.getParameter("id");
String fileURL;
try {
String fileURL = servlet.Utils.saveFile(request, fileType);
fileURL = servlet.Utils.saveFile(request, fileType);
}catch (Exception e)
{
System.out.print(e);
response.sendRedirect("/op_fail.jsp");
}
System.out.print("222");
}
}

@ -36,7 +36,7 @@
String type=user.getType();
pageContext.setAttribute("userType",type);
Condition condition=user.getCondition();
//List<Process> pList=condition.getProcesses();
/*List<Process> pList=condition.getProcesses();*/
int length=0;
int index=0;
%>

@ -7,19 +7,17 @@
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%String a=request.getParameter("id");
String b[][]=new String[3][3];
for(int i=0;i<3;i++)
for(int j=0;j<3;j++)
b[i][j]="hello";
<%
String id=request.getParameter("id");
String searchType=request.getParameter("searchType");
%>
<%%>
<div class="list-child">
<div class="name"><span class="the-name"><%=a%></span></div>
<div class="name"><span class="the-name"><%=searchType%></span></div>
<div class="other-msgs">
<%for(int k=0;k<2;k++)
for (int n=0;n<2;n++)
out.print(" <div class=\"one-msg\">电话号码:"+b[k][n]+"</div>");
out.print(" <div class=\"one-msg\">电话号码:"+k+n+"</div>");
%>
<div class="one-msg">电话号码18711191679</div>
</div>

@ -11,7 +11,6 @@
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="core.process.C_TeacherSearchStudent" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
@ -54,7 +53,7 @@
</div>
<div class="search-frame">
<input class="search-input" type="text" name="id" value="" placeholder="输入学号查找">
<div class="search-button"></div>
<div class="search-button ${type}"></div>
</div>
</div>
<div class="count-select">

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: zhai_
Date: 2019/1/15
Time: 16:43
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>

@ -1,10 +1,12 @@
$(document).ready(function () {
$(document).off('click',searchmsg).on('click','.search-button',searchmsg);
$(document).off('keydown',searchmsg).on('keydown','.search-input',KDsearchmsg);
$(document).off('click',searchStuMsg).on('click','.search-button.teacher',searchStuMsg);
$(document).off('click',searchTeaMsg).on('click','.search-button.student',searchTeaMsg);
$(document).off('keydown',KDsearchSmsg).on('keydown','.search-button.teacher',KDsearchSmsg);
$(document).off('keydown',KDsearchTmsg).on('keydown','.search-button.student',KDsearchTmsg);
$(document).off('click',teacherSelect).on('click','.select-it.teacher',teacherSelect);
$(document).off('click',studentSelect).on('click','.select-it.student',studentSelect);
})
function searchmsg(e) {
function searchStuMsg(e) {
if($('.search-input').val()=='')
{
e.preventDefault();
@ -12,15 +14,36 @@ function searchmsg(e) {
}
else {
var id=$('.search-input').val();
var rqDate={"id":id};
var searchType='teacher';
var rqDate={"id":id,"searchType":searchType};
var Url1='result_list.jsp';
$('.list-frame').load(Url1,rqDate);
}
}
function KDsearchmsg(e) {
function searchTeaMsg(e) {
if($('.search-input').val()=='')
{
e.preventDefault();
alert('请输入学号');
}
else {
var id=$('.search-input').val();
var searchType='student';
var rqDate={"id":id,"searchType":searchType};
var Url1='result_list.jsp';
$('.list-frame').load(Url1,rqDate);
}
}
function KDsearchSmsg(e) {
if(e.keyCode==13)
{
searchStuMsg(e);
}
}
function KDsearchTmsg(e) {
if(e.keyCode==13)
{
searchmsg(e);
searchTeaMsg(e);
}
}
function select_one(Url2,button) {
@ -40,5 +63,5 @@ function studentSelect() {
}
function teacherSelect() {
var button=$(this);
select_one("testfrom.jsp",button);
select_one("/home/teacher-select-student",button);
}

@ -5,7 +5,7 @@ $(document).ready(function () {
})
function sendFile() {
var fileData =new FormData();
var Url4='student-upload-finished-product';
var Url4='/student-upload-finished-product';
var file=$('#select')[0].files[0];
if($('.true-select').val()=='')
{

Loading…
Cancel
Save