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

# Conflicts:
#	.idea/artifacts/GDMS_war_exploded.xml
#	.idea/artifacts/gdms_Web_exploded.xml
#	.idea/artifacts/gdms_war_exploded.xml
#	.idea/misc.xml
hechu1
何楚 6 years ago
commit 8f2eb869a2

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <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> <driver-ref>mariadb</driver-ref>
<synchronize>true</synchronize> <synchronize>true</synchronize>
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver> <jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>

@ -0,0 +1,22 @@
com.intellij.database.serialization.ImportException: RDBMS is not specified int the model file
at com.intellij.database.serialization.ModelImporter.deserializeModel(ModelImporter.java:57)
at com.intellij.database.serialization.ModelSerializerKt.deserialize(ModelSerializer.kt:37)
at com.intellij.database.serialization.ModelSerializerKt.deserialize(ModelSerializer.kt:27)
at com.intellij.database.dataSource.DataSourceStorage.readModel(DataSourceStorage.java:683)
at com.intellij.database.dataSource.DataSourceStorage.readModel(DataSourceStorage.java:671)
at com.intellij.database.dataSource.DataSourceStorage.loadModels(DataSourceStorage.java:488)
at com.intellij.database.dataSource.DataSourceStorage.access$000(DataSourceStorage.java:90)
at com.intellij.database.dataSource.DataSourceStorage$2.run(DataSourceStorage.java:398)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</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>

@ -19,6 +19,7 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 9.0.14" level="application_server_libraries" />
<orderEntry type="module-library"> <orderEntry type="module-library">
<library> <library>
<CLASSES> <CLASSES>
@ -28,6 +29,5 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="library" scope="PROVIDED" name="Tomcat 9" level="application_server_libraries" />
</component> </component>
</module> </module>

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

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

@ -11,6 +11,9 @@ import java.util.Map;
public class C_CollegeFillOpeningReportOpinion extends TempProcess{ public class C_CollegeFillOpeningReportOpinion extends TempProcess{
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="学院开题意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/college-fill-opening-report-opinion";
static String table="graduation_design_opening_report_opinion_record"; static String table="graduation_design_opening_report_opinion_record";

@ -12,7 +12,9 @@ public class C_CollegeFillScoreOpinion extends TempProcess{
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="学院老师评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/college-fill-score-opinion";
static String table="graduation_design_reply_opinion_record_score"; static String table="graduation_design_reply_opinion_record_score";
public void fillInformation() throws Exception{ public void fillInformation() throws Exception{
@ -30,7 +32,7 @@ public class C_CollegeFillScoreOpinion extends TempProcess{
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }

@ -10,7 +10,11 @@ import java.util.Map;
public class C_MentorFillOpeningReportOpinion extends TempProcess{ public class C_MentorFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="导师开题意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/mentor-fill-opening-report-opinion";
static String table="graduation_design_opening_report_opinion_record"; static String table="graduation_design_opening_report_opinion_record";
@ -33,6 +37,16 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{
return false; return false;
return true; return true;
} }
@Override
public String getGraduationDesignId() {
return graduationDesignId;
}
@Override
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
public void setVMap(Map<String, String> vMap) { public void setVMap(Map<String, String> vMap) {
this.vMap = vMap; this.vMap = vMap;
} }

@ -9,30 +9,16 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class C_MentorFillReview extends TempProcess { public class C_MentorFillReview extends TempProcess {
public String teacherID;
public String teacher_opinion; public String graduationDesignId;
public Map<String,String> vMap; public Map<String,String> vMap;
private static String buttonName ="指导老师评阅";
protected static String targetURL="/home/mentor-fill-review";
protected static String iconURL="../cssFile/images/fill.png";
static String table="graduation_design_finished_product_mentor_score"; static String table="graduation_design_finished_product_mentor_score";
public String getTeacher_opinion() {
return teacher_opinion; public void teacherTeamFillOpeningReportOpinion() throws Exception{
}
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!"); if(!check()) throw new GExcptInit("MentorFillReview Attrs init error!");
FillInformation fillInformation=new FillInformation(); FillInformation fillInformation=new FillInformation();
fillInformation.setOptions(new HashMap<>()); fillInformation.setOptions(new HashMap<>());
@ -41,18 +27,30 @@ public class C_MentorFillReview extends TempProcess {
String date=df.format(new Date()); String date=df.format(new Date());
vMap.put("review_opinion_date",date); vMap.put("review_opinion_date",date);
Map<String, String>limits = new HashMap<>(); Map<String, String>limits = new HashMap<>();
limits.put("id",this.getTeacherID()); limits.put("id",this.getGraduationDesignId());
fillInformation.addOptions("limits",limits); fillInformation.addOptions("limits",limits);
fillInformation.execute(null); fillInformation.execute(null);
} }
@Override @Override
protected boolean check() { protected boolean check() {
if(this.getTeacherID().equals(null)||this.getTeacher_opinion().equals(null)||this.getvMap().equals(null)) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
else else
return true; 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,64 @@
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_ReviewerFillReview extends TempProcess {
public String graduationDesignId;
public Map<String,String> vMap;
private static String buttonName ="评阅老师评阅";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/reviewer-fill-review";
static String table="graduation_design_finished_product_reviewer_score";
public void TeacherTeamFillOpeningReportOpinion() throws Exception{
if(!check()) throw new GExcptInit("ReviewerFillReview 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("reviewer_score_date",date);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGraduationDesignId());
fillInformation.addOptions("limits",limits);
fillInformation.execute(null);
}
@Override
protected boolean check() {
if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false;
else
return true;
}
public String getGraduationDesignId() {
return graduationDesignId;
}
public void setGraduationDesignId(String teacherID) {
this.graduationDesignId = graduationDesignId;
}
public Map<String, String> getVMap() {
return vMap;
}
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
}

@ -12,6 +12,9 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="学院老师评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/school-fill-score-opinion";
static String table="graduation_design_reply_opinion_record_score"; static String table="graduation_design_reply_opinion_record_score";
public void fillInformation() throws Exception{ public void fillInformation() throws Exception{
@ -28,7 +31,7 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
fillInformation.execute(null); fillInformation.execute(null);
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }
@ -45,6 +48,10 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
this.vMap = vMap; this.vMap = vMap;
} }
public Map<String, String> getVMap() {
return vMap;
}
} }

@ -8,10 +8,13 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class C_SecretaryFillOpeningReportOpinion extends TempProcess{ public class C_SecretaryFillOpeningReportRecord extends TempProcess{
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="提交开题纪要";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/secretary-fill-opening-report-record";
static String table="graduation_design_opening_report_opinion_record"; static String table="graduation_design_opening_report_opinion_record";
@ -29,7 +32,7 @@ public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
fillInformation.execute(null); fillInformation.execute(null);
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }
@ -46,5 +49,8 @@ public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
public void setVMap(Map<String, String> vMap) { public void setVMap(Map<String, String> vMap) {
this.vMap = vMap; this.vMap = vMap;
} }
public Map<String, String> getVMap() {
return vMap;
}
} }

@ -12,6 +12,9 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="提交答辩记录";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/secretary-fill-reply-record";
static String table="graduation_design_reply_opinion_record_score"; static String table="graduation_design_reply_opinion_record_score";
@ -30,7 +33,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }
@ -46,6 +49,9 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
this.vMap = vMap; this.vMap = vMap;
} }
public Map<String, String> getVMap() {
return vMap;
}
} }

@ -11,6 +11,9 @@ import java.util.Map;
public class C_StudentFillGraduationDesignInformation extends TempProcess{ public class C_StudentFillGraduationDesignInformation extends TempProcess{
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="填写选题信息";
protected static String iconURL="../cssFile/images/filText.png";
protected static String targetURL="/home/student-fill-graduation-design-information";
static String table="graduation_design_opening_report_opinion_record"; static String table="graduation_design_opening_report_opinion_record";
@ -25,7 +28,7 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{
fillInformation.execute(null); fillInformation.execute(null);
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }
@ -43,5 +46,9 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{
this.vMap = vMap; this.vMap = vMap;
} }
public Map<String, String> getVMap() {
return vMap;
}
} }

@ -36,6 +36,25 @@ public class C_StudentSearchTeacher extends TempProcess{
TeacherInfo.put("phone_number",s[4]); TeacherInfo.put("phone_number",s[4]);
return TeacherInfo; 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() { protected boolean check() {
if(this.getTeacherID()==null) if(this.getTeacherID()==null)

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

@ -7,10 +7,13 @@ import java.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class C_StudentUploadFinishedProduct { public class C_StudentUploadFinishedProduct extends TempProcess {
File finishedProduct; File finishedProduct;
String graduationDesignId; String graduationDesignId;
private static String buttonName ="提交定稿";
protected static String iconURL="../cssFile/images/upload.png";
protected static String targetURL="/home/student-upload-finished-product";
static String file_type = "finished_product"; static String file_type = "finished_product";
public void uploadOpeningReport() throws Exception{ public void uploadOpeningReport() throws Exception{

@ -10,8 +10,10 @@ import java.util.Map;
public class C_StudentUploadOpeningReport extends TempProcess{ public class C_StudentUploadOpeningReport extends TempProcess{
File openingReport; File openingReport;
String graduationDesignId; String graduationDesignId;
private static String buttonName ="提交开题报告";
static String file_type = "opening_report"; static String file_type = "opening_report";
protected static String targetURL="/home/student-upload-opening-report";
protected static String iconURL="../cssFile/images/upload.png";
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!");

@ -48,18 +48,11 @@ public class C_TeacherSearchStudent extends TempProcess {
limits.put("id",this.getStudentId()); 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",10);
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");
List<Map<String,String>> studentsInfo = new ArrayList<>(); List<Map<String,String>> studentsInfo = new ArrayList<>();
for(String[] s:result){ core.process.Utils.formatResult(result, studentsInfo);
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; return studentsInfo;
} }
protected boolean check() { protected boolean check() {

@ -1,5 +1,6 @@
package core.process; package core.process;
import core.operation.Search;
import core.operation.Select; import core.operation.Select;
import error.GExcptInit; import error.GExcptInit;
@ -11,6 +12,9 @@ import java.util.Map;
public class C_TeacherSelectStudent extends TempProcess { public class C_TeacherSelectStudent extends TempProcess {
String studentId; String studentId;
String teacherId; String teacherId;
private static String buttonName ="选择学生";
protected static String iconURL="";
protected static String targetURL="/home/teacher-select-student";
public void select()throws Exception{ public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!"); if(!check()) throw new GExcptInit("ID Attrs init error!");
@ -20,6 +24,24 @@ public class C_TeacherSelectStudent extends TempProcess {
select.addOptions("student_id",this.getStudentId()); select.addOptions("student_id",this.getStudentId());
Map<String,Object> options=select.execute(null); 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() { protected boolean check() {
if(this.getStudentId()==null||this.getTeacherId()==null) if(this.getStudentId()==null||this.getTeacherId()==null)
return false; return false;

@ -12,6 +12,9 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
private static String buttonName ="开题小组意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/teacher-team-fill-opening-report-opinion";
static String table="graduation_design_opening_report_opinion_record"; static String table="graduation_design_opening_report_opinion_record";
@ -29,7 +32,7 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
fillInformation.execute(null); fillInformation.execute(null);
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }
@ -47,4 +50,9 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
this.vMap = vMap; this.vMap = vMap;
} }
public Map<String, String> getVMap() {
return vMap;
}
} }

@ -10,6 +10,9 @@ import java.util.Map;
public class C_TeacherTeamFillScoreOpinion extends TempProcess { public class C_TeacherTeamFillScoreOpinion extends TempProcess {
private static String buttonName = "答辩小组评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/teacher-team-fill-score-opinion";
String graduationDesignId; String graduationDesignId;
Map<String,String> vMap; Map<String,String> vMap;
@ -29,7 +32,7 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess {
fillInformation.execute(null); fillInformation.execute(null);
} }
protected boolean check() { protected boolean check() {
if(this.getGraduationDesignId()==null) if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false; return false;
return true; return true;
} }
@ -45,5 +48,7 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess {
public void setVMap(Map<String, String> vMap) { public void setVMap(Map<String, String> vMap) {
this.vMap = vMap; this.vMap = vMap;
} }
public Map<String, String> getVMap() {
return vMap;
}
} }

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

@ -4,7 +4,7 @@ import core.operation.Operation;
public abstract class Process{ public abstract class Process{
private static String buttonName; protected static String buttonName;
protected static String targetURL; protected static String targetURL;
protected static String iconURL; protected static String iconURL;

@ -35,8 +35,8 @@ public class ProcessManagement {
Map<String,String> userTables = DBManagement.getUserStatusTables(user.getType()); Map<String,String> userTables = DBManagement.getUserStatusTables(user.getType());
String graduationDesignId = null; String graduationDesignId = null;
for(Map.Entry<String,String> entry:userTables.entrySet()){ for(Map.Entry<String,String> entry:userTables.entrySet()){
String[] ti = entry.getKey().split("."); String[] ti = entry.getKey().split("\\.");
String[] ts = entry.getValue().split("."); String[] ts = entry.getValue().split("\\.");
List<String> ls = new ArrayList<>(); List<String> ls = new ArrayList<>();
ls.add("id"); ls.add("id");
Map<String,String> limits = new HashMap<>(); Map<String,String> limits = new HashMap<>();
@ -55,6 +55,39 @@ public class ProcessManagement {
return status; return status;
} }
public static Process getProcess(String process){ public static Process getProcess(String process){
return null; switch (process) {
case "teacher_choose_student_status":
return new C_TeacherSelectStudent();
case "student_choose_teacher_status":
return new C_StudentSelectTeacher();
case"student_fill_graduation_design_information_status":
return new C_StudentFillGraduationDesignInformation();
case"opening_report_status":
return new C_StudentUploadOpeningReport();
case"opening_report_mentor_opinion_status":
return new C_MentorFillOpeningReportOpinion();
case"opening_report_teacher_team_opinion_status":
return new C_TeacherTeamFillOpeningReportOpinion();
case"opening_report_college_opinion_status":
return new C_CollegeFillOpeningReportOpinion();
case"opening_report_secretary_record_status":
return new C_SecretaryFillOpeningReportRecord();
case"finished_product_status":
return new C_StudentUploadFinishedProduct();
case"finished_product_mentor_score_status":
return new C_MentorFillReview();
case"finished_product_reviewer_score_status":
return new C_ReviewerFillReview();
case"reply_ secretary_record_status":
return new C_SecretaryFillReplyRecord();
case"reply_ teacher_team_score_status":
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; package core.user;
import core.process.Condition; import core.process.Condition;
import core.process.ProcessManagement;
import core.user.userFun.AccountManageable; import core.user.userFun.AccountManageable;
import core.user.userFun.ProcessConfigurable; import core.user.userFun.ProcessConfigurable;
import core.user.utils.AccountManagement;
import java.util.List; import java.util.List;
import java.util.Map; 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.setE_mail_location(vMap.get("e_mail_location"));
this.setPhone_number(vMap.get("phone_number")); 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; package core.user.utils;
import core.user.Student;
import core.user.User; import core.user.User;
import core.utils.GetObjectByName; import core.utils.GetObjectByName;
import dao.DBManagement; import dao.DBManagement;
@ -49,7 +50,11 @@ public interface AccountManagement {
} }
static User register(String userType, Map<String, String> vMap) throws Exception { static User register(String userType, Map<String, String> vMap) throws Exception {
DBManagement.insert(userType,vMap); 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){ static void logout(User user){
//todo //todo
@ -60,6 +65,22 @@ public interface AccountManagement {
static User createUser(String userType, Map<String, String> vMap) throws Exception { static User createUser(String userType, Map<String, String> vMap) throws Exception {
User user = GetObjectByName.getUserByName(userType); User user = GetObjectByName.getUserByName(userType);
user.setAttr(vMap); user.setAttr(vMap);
user.initCondition();
return user; 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(Map.Entry<String,String> entry:DBManagement.allStatus.entrySet()){
Map<String,String> vMap = new HashMap<>();
Map<String,String> limits = new HashMap<>();
limits.put("id",id);
vMap.put(entry.getValue(),defaultStatus);
DBManagement.update(entry.getKey(),vMap,limits);
}
}
} }

@ -87,6 +87,26 @@ public class DBManagement {
put("graduation_design_reply_opinion_record_score.reply_school_teacher_id","graduation_design_reply_opinion_record_score.reply_school_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 Map<String,String> allStatus = new HashMap<>(){
{
put("graduation_design","teacher_choose_student_status");
put("graduation_design","student_choose_teacher_status");
put("graduation_design_information","student_fill_graduation_design_information_status");
put("graduation_design_opening_report","opening_report_status");
put("graduation_design_opening_report_opinion_record","opening_report_mentor_opinion_status");
put("graduation_design_opening_report_opinion_record","opening_report_teacher_team_opinion_status");
put("graduation_design_opening_report_opinion_record","opening_report_college_opinion_status");
put("graduation_design_opening_report_opinion_record","opening_report_secretary_record_status");
put("graduation_design_finished_product","finished_product_status");
put("graduation_design_finished_product_mentor_score","finished_product_mentor_score_status");
put("graduation_design_finished_product_reviewer_score","finished_product_reviewer_score_status");
put("graduation_design_reply_opinion_record_score","reply_ secretary_record_status");
put("graduation_design_reply_opinion_record_score","reply_ teacher_team_score_status");
put("graduation_design_reply_opinion_record_score","reply_college_score_status");
put("graduation_design_reply_opinion_record_score","reply_school_score_status");
}
};
public static String driverClassName="org.mariadb.jdbc.Driver"; public static String driverClassName="org.mariadb.jdbc.Driver";

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

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

@ -11,11 +11,9 @@ import java.util.Map;
public class test { public class test {
public static void main(String[] args){ public static void main(String[] args){
int i=0; String s = "graduation_design_finished_product_reviewer_score.reviewer_teacher_id";
do{ String[] ss = s.split("\\.");
i++; System.out.println(ss[0]);
System.out.println(i);
}while(i<3);
} }
static void changeB(String a){ static void changeB(String a){

@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/college-fill-opening-report-opinion") @WebServlet("/home/college-fill-opening-report-opinion")
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"); String id = request.getParameter("id");

@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/college-fill-score-opinion") @WebServlet("/home/college-fill-score-opinion")
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"); String id = request.getParameter("id");

@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/mentor-fill-opening-report-opinion") @WebServlet("/home/mentor-fill-opening-report-opinion")
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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/mentor-fill-review") @WebServlet("/home/mentor-fill-review")
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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/reviewer-fill-review") @WebServlet("/home/reviewer-fill-review")
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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/school-fill-score-opinion") @WebServlet("/home/school-fill-score-opinion")
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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/secretary-fill-opening-report-record") @WebServlet("/home/secretary-fill-opening-report-record")
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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/secretary-fill-reply-record") @WebServlet("/home/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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/student-fill-graduation-design-information") @WebServlet("/home/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 {

@ -9,7 +9,7 @@ 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("/student-select-teacher") @WebServlet("/home/student-select-teacher")
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);
@ -26,4 +26,5 @@ public class S_StudentSelectTeacher extends HttpServlet {
response.sendRedirect("/op_fail.jsp"); response.sendRedirect("/op_fail.jsp");
} }
} }
} }

@ -8,22 +8,19 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
@WebServlet("/student-upload-finished-product") @WebServlet("/home/student-upload-finished-product")
@MultipartConfig @MultipartConfig
public class S_StudentUploadFinishedProduct extends HttpServlet { public class S_StudentUploadFinishedProduct extends HttpServlet {
static String fileType = "graduation_design_finished_product"; static String fileType = "graduation_design_finished_product";
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = "000"; String id = request.getParameter("id");
//String files = request.getParameter("file"); String fileURL;
System.out.print("123");
System.out.print( request.getPart("file"));
System.out.print("123");
try { try {
String fileURL = servlet.Utils.saveFile(request, fileType); fileURL = servlet.Utils.saveFile(request, fileType);
}catch (Exception e) }catch (Exception e)
{ {
System.out.print(e); System.out.print(e);
response.sendRedirect("/op_fail.jsp");
} }
System.out.print("222");
} }
} }

@ -12,7 +12,7 @@ import javax.servlet.http.Part;
import java.io.IOException; import java.io.IOException;
import java.util.UUID; import java.util.UUID;
@WebServlet("/student-upload-opening-report") @WebServlet("/home/student-upload-opening-report")
@MultipartConfig @MultipartConfig
public class S_StudentUploadOpeningReport extends HttpServlet { public class S_StudentUploadOpeningReport extends HttpServlet {
static String fileType = "graduation_design_opening_report"; static String fileType = "graduation_design_opening_report";

@ -9,7 +9,7 @@ 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("/teacher-select-student") @WebServlet("/home/teacher-select-student")
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);

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/teacher-team-fill-opening-report-opinion") @WebServlet("/home/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"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("/teacher-team-fill-score-opinion") @WebServlet("/home/teacher-team-fill-score-opinion")
public class S_TeacherTeamFillScoreOpinion 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"); String id = request.getParameter("id");

@ -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>

@ -63,5 +63,5 @@ function studentSelect() {
} }
function teacherSelect() { function teacherSelect() {
var button=$(this); var button=$(this);
select_one("testfrom.jsp",button); select_one("/home/teacher-select-student",button);
} }

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

Loading…
Cancel
Save