Compare commits
119 Commits
@ -1,17 +0,0 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-war" name="GDMS:war exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/GDMS_war_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="GDMS/web/Web" />
|
||||
<element id="directory" name="WEB-INF">
|
||||
<element id="directory" name="classes">
|
||||
<element id="module-output" name="GDMS" />
|
||||
</element>
|
||||
<element id="directory" name="lib">
|
||||
<element id="library" level="project" name="lib" />
|
||||
<element id="library" level="project" name="tomcat-lib" />
|
||||
</element>
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,17 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-war" name="gdms:war exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/gdms_war_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="gdms/web/Web" />
|
||||
<element id="directory" name="WEB-INF">
|
||||
<element id="directory" name="classes">
|
||||
<element id="module-output" name="gdms" />
|
||||
</element>
|
||||
<element id="directory" name="lib">
|
||||
<element id="file-copy" path="C:/Program Files/Apache Software Foundation/Tomcat 9.0/lib/tomcat-jdbc.jar" />
|
||||
<element id="library" level="project" name="lib" />
|
||||
</element>
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -1,2 +0,0 @@
|
||||
#n:testsql
|
||||
!<md> [null, 0, null, null, -2147483648, -2147483648]
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
#n:gdms
|
Binary file not shown.
@ -1,11 +0,0 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="zhai_">
|
||||
<words>
|
||||
<w>excpt</w>
|
||||
<w>gdms</w>
|
||||
<w>hmmss</w>
|
||||
<w>mariadb</w>
|
||||
<w>synchronizable</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JsonSchemaMappingsProjectConfiguration">
|
||||
<state>
|
||||
<map>
|
||||
<entry key="bukkit-plugin">
|
||||
<value>
|
||||
<SchemaInfo>
|
||||
<option name="name" value="bukkit-plugin" />
|
||||
<option name="relativePathToSchema" value="http://json.schemastore.org/bukkit-plugin" />
|
||||
<option name="applicationDefined" value="true" />
|
||||
<option name="patterns">
|
||||
<list>
|
||||
<Item>
|
||||
<option name="path" value="src/core/user/student.json" />
|
||||
</Item>
|
||||
</list>
|
||||
</option>
|
||||
</SchemaInfo>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</state>
|
||||
</component>
|
||||
</project>
|
@ -1,10 +1,10 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/web/WEB-INF/lib" />
|
||||
<root url="file://$PROJECT_DIR$/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/web/WEB-INF/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
@ -1,10 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="tomcat-lib">
|
||||
<CLASSES>
|
||||
<root url="file://C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib" recursive="false" />
|
||||
</library>
|
||||
</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>
|
@ -1,124 +0,0 @@
|
||||
<?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>
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
package core.process;
|
||||
|
||||
import dao.DBManagement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class C_FillInformation extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/fill_Information.jsp";
|
||||
}
|
||||
public abstract List<String> getInputName();
|
||||
public List<String[]> search() throws Exception {
|
||||
List<String> columns = new ArrayList<>();
|
||||
columns.add("*");
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",getGraduationDesignId());
|
||||
List<String[]> ls = DBManagement.select(columns,"graduation_design_information",limits,0,10);
|
||||
return ls;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package core.process;
|
||||
|
||||
public abstract class C_FillSbjMsg extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/fillSbjMsg.jsp";
|
||||
}
|
||||
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.FillInformation;
|
||||
import error.GExcptInit;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
|
||||
|
||||
String graduationDesignId;
|
||||
Map<String,String> vMap;
|
||||
|
||||
static String table="graduation_design_opening_report_opinion_record";
|
||||
|
||||
public void fillInformation() throws Exception{
|
||||
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||
FillInformation fillInformation=new FillInformation();
|
||||
fillInformation.setOptions(new HashMap<>());
|
||||
fillInformation.addOptions("table",table);
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
|
||||
String date=df.format(new Date());
|
||||
vMap.put("secretary_record_date",date);
|
||||
Map<String, String>limits = new HashMap<>();
|
||||
limits.put("id",this.getGraduationDesignId());
|
||||
fillInformation.addOptions("limits",limits);
|
||||
fillInformation.execute(null);
|
||||
}
|
||||
protected boolean check() {
|
||||
if(this.getGraduationDesignId()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String getGraduationDesignId() {
|
||||
return graduationDesignId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGraduationDesignId(String graduationDesignId) {
|
||||
this.graduationDesignId = graduationDesignId;
|
||||
}
|
||||
|
||||
public void setVMap(Map<String, String> vMap) {
|
||||
this.vMap = vMap;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.FillInformation;
|
||||
import error.GExcptInit;
|
||||
import error.GExcptSQL;
|
||||
import gdms.Configuration;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class C_SecretaryFillOpeningReportRecord extends C_FillInformation{
|
||||
|
||||
String graduationDesignId;
|
||||
Map<String,String> vMap;
|
||||
private static String buttonName ="提交开题纪要";
|
||||
private static String iconURL="../cssFile/images/fill.png";
|
||||
private static String targetURL="/home/secretary-fill-opening-report-record";
|
||||
private static String info = "";
|
||||
|
||||
private static String table="graduation_design_opening_report_opinion_record";
|
||||
private static String field ="opening_report_secretary_record_status";
|
||||
|
||||
public void fillInformation() throws Exception{
|
||||
if(!check()) throw new GExcptInit("FillInformation Attrs init error!");
|
||||
FillInformation fillInformation=new FillInformation();
|
||||
fillInformation.setOptions(new HashMap<>());
|
||||
fillInformation.addOptions("table",table);
|
||||
String date= Configuration.dateFormat.format(new Date());
|
||||
vMap.put("secretary_record_date",date);
|
||||
Map<String, String>limits = new HashMap<>();
|
||||
limits.put("id",this.getGraduationDesignId());
|
||||
fillInformation.addOptions("limits",limits);
|
||||
fillInformation.addOptions("vMap",vMap);
|
||||
fillInformation.execute(null);
|
||||
updateStatus();
|
||||
}
|
||||
protected boolean check() {
|
||||
if(this.getGraduationDesignId()==null||this.getVMap()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String getGraduationDesignId() {
|
||||
return graduationDesignId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGraduationDesignId(String graduationDesignId) {
|
||||
this.graduationDesignId = graduationDesignId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus() throws GExcptSQL {
|
||||
core.process.Utils.updateStatus(graduationDesignId,table, field);
|
||||
}
|
||||
|
||||
public void setVMap(Map<String, String> vMap) {
|
||||
this.vMap = vMap;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
public List<String> getInputName() {
|
||||
List<String> ls = new ArrayList<>();
|
||||
ls.add("secretary_record");
|
||||
ls.add(null);
|
||||
return ls;
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package core.process;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class C_Select extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/select.jsp";
|
||||
}
|
||||
public abstract List<String[]> search(String id)throws Exception;
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.Search;
|
||||
import error.GExcptInit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class C_StudentSearchTeacher extends TempProcess{
|
||||
String teacherID;
|
||||
|
||||
static String table = "teacher";
|
||||
|
||||
Map<String,String> TeacherInfo=new HashMap<String, String>();
|
||||
public Map<String,String> search() throws Exception {
|
||||
if(!check()) throw new GExcptInit("teacherID Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getTeacherID());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",1);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
String[] s = result.get(0);
|
||||
TeacherInfo.put("id",s[0]);
|
||||
TeacherInfo.put("name",s[2]);
|
||||
TeacherInfo.put("e_mail_location",s[3]);
|
||||
TeacherInfo.put("phone_number",s[4]);
|
||||
return TeacherInfo;
|
||||
}
|
||||
|
||||
protected boolean check() {
|
||||
if(this.getTeacherID()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public String getTeacherID(){
|
||||
return teacherID;
|
||||
}
|
||||
public void setTeacherID(String teacherID){
|
||||
this.teacherID=teacherID;
|
||||
}
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.Search;
|
||||
import error.GExcptInit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class C_TeacherSearchStudent extends TempProcess {
|
||||
String studentId;
|
||||
|
||||
static String table="student";
|
||||
|
||||
public Map<String,String> search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("studentId Attrs init error!");
|
||||
Map<String,String> studentInfo =new HashMap<>();
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getStudentId());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",1);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
String[] s = result.get(0);
|
||||
studentInfo.put("id",s[0]);
|
||||
studentInfo.put("name",s[2]);
|
||||
studentInfo.put("e_mail_location",s[3]);
|
||||
studentInfo.put("phone_number",s[4]);
|
||||
return studentInfo;
|
||||
}
|
||||
public List<Map<String,String>> _search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("studentId Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getStudentId());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",1);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
List<Map<String,String>> studentsInfo = new ArrayList<>();
|
||||
for(String[] s:result){
|
||||
Map<String,String> studentInfo = new HashMap<>();
|
||||
studentInfo.put("id",s[0]);
|
||||
studentInfo.put("name",s[2]);
|
||||
studentInfo.put("e_mail_location",s[3]);
|
||||
studentInfo.put("phone_number",s[4]);
|
||||
studentsInfo.add(studentInfo);
|
||||
}
|
||||
return studentsInfo;
|
||||
}
|
||||
protected boolean check() {
|
||||
if(this.getStudentId()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public String getStudentId(){
|
||||
return studentId;
|
||||
}
|
||||
public void setStudentId(String studentId){
|
||||
this.studentId=studentId;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package core.process;
|
||||
|
||||
public abstract class C_UploadFile extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/upload_file.jsp";
|
||||
}
|
||||
public abstract String getFileType();
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package core.process;
|
||||
|
||||
import dao.DBManagement;
|
||||
import error.GExcptSQL;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface Utils {
|
||||
static void formatResult(List<String[]> result) {
|
||||
for(String[] s:result){
|
||||
s[1] = null;
|
||||
}
|
||||
}
|
||||
|
||||
static void updateStatus(String id, String table, String field) throws GExcptSQL {
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",id);
|
||||
DBManagement.updateStatus(table,field,"2",limits);
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package dao;
|
||||
|
||||
public class SelectAll extends SQLStmt {
|
||||
static String fs = "SELECT";
|
||||
private int startRow;
|
||||
private int endRow;
|
||||
SelectAll(String table,int startRow, int endRow) {
|
||||
super(table);
|
||||
this.setStartRow(startRow);
|
||||
this.setEndRow(endRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSQL() {
|
||||
return getFs()+getTs()+getLs();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getFs() {
|
||||
return fs+" * ";
|
||||
}
|
||||
private String getTs(){
|
||||
return "FROM "+this.getTable()+" ";
|
||||
}
|
||||
private String getLs(){
|
||||
String sql="LIMIT "+this.getStartRow()+", "+this.getEndRow();
|
||||
return sql;
|
||||
}
|
||||
public int getStartRow() {
|
||||
return startRow;
|
||||
}
|
||||
|
||||
public void setStartRow(int startRow) {
|
||||
this.startRow = startRow;
|
||||
}
|
||||
|
||||
public int getEndRow() {
|
||||
return endRow;
|
||||
}
|
||||
|
||||
public void setEndRow(int endRow) {
|
||||
this.endRow = endRow;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package dao;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class UpdateStatus extends SQLStmt {
|
||||
static String fs = "UPDATE ";
|
||||
String field;
|
||||
String increment;
|
||||
Map<String,String> limits;
|
||||
public UpdateStatus(String table, String field, String increment, Map<String, String> limits) {
|
||||
super(table);
|
||||
this.setField(field);
|
||||
this.setIncrement(increment);
|
||||
this.setLimits(limits);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSQL() {
|
||||
return getFs()+getUs()+getLs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFs() {
|
||||
return fs+this.getTable()+" ";
|
||||
}
|
||||
private String getLs(){
|
||||
return dao.Utils.whereAnd(this.getLimits());
|
||||
}
|
||||
public String getUs(){
|
||||
String us = "SET ";
|
||||
us+=this.getField()+" = "+this.getField()+" + "+this.getIncrement()+" ";
|
||||
return us;
|
||||
}
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public String getIncrement() {
|
||||
return increment;
|
||||
}
|
||||
|
||||
public void setIncrement(String increment) {
|
||||
this.increment = increment;
|
||||
}
|
||||
|
||||
public Map<String, String> getLimits() {
|
||||
return limits;
|
||||
}
|
||||
|
||||
public void setLimits(Map<String, String> limits) {
|
||||
this.limits = limits;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package error;
|
||||
|
||||
public class GExcptFileIO extends GExcpt {
|
||||
public GExcptFileIO(String info) {
|
||||
super(info);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package filter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebFilter(urlPatterns = "/*")
|
||||
public class CharSet implements Filter {
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest req, ServletResponse resp,
|
||||
FilterChain chain) throws ServletException, IOException {
|
||||
HttpServletRequest httpServletRequest = (HttpServletRequest) req;
|
||||
// 对request包装增强
|
||||
HttpServletRequest myrequest = new MyRequest(httpServletRequest);
|
||||
((HttpServletResponse)resp).setContentType("text/html;charset=utf-8");
|
||||
chain.doFilter(myrequest, resp);
|
||||
|
||||
}
|
||||
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
|
||||
}
|
||||
}
|
||||
class MyRequest extends HttpServletRequestWrapper {
|
||||
|
||||
private HttpServletRequest request;
|
||||
|
||||
private boolean hasEncode;
|
||||
|
||||
public MyRequest(HttpServletRequest request) {
|
||||
super(request);
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
// 对需要增强方法 进行覆盖
|
||||
@Override
|
||||
public Map<String, String[]> getParameterMap() {
|
||||
// 先获得请求方式
|
||||
String method = request.getMethod();
|
||||
if (method.equalsIgnoreCase("post")) {
|
||||
// post请求
|
||||
try {
|
||||
// 处理post乱码
|
||||
request.setCharacterEncoding("utf-8");
|
||||
return request.getParameterMap();
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (method.equalsIgnoreCase("get")) {
|
||||
// get请求
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
if (!hasEncode) { // 确保get手动编码逻辑只运行一次
|
||||
for (String parameterName : parameterMap.keySet()) {
|
||||
String[] values = parameterMap.get(parameterName);
|
||||
if (values != null) {
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
try {
|
||||
// 处理get乱码
|
||||
values[i] = new String(values[i].getBytes("ISO-8859-1"), "utf-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
hasEncode = true;
|
||||
}
|
||||
return parameterMap;
|
||||
}
|
||||
|
||||
return super.getParameterMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(String name) {
|
||||
Map<String, String[]> parameterMap = getParameterMap();
|
||||
String[] values = parameterMap.get(name);
|
||||
if (values == null) {
|
||||
return null;
|
||||
}
|
||||
return values[0]; // 取回参数的第一个值
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getParameterValues(String name) {
|
||||
Map<String, String[]> parameterMap = getParameterMap();
|
||||
String[] values = parameterMap.get(name);
|
||||
return values;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,13 @@
|
||||
package gdms;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public interface Configuration {
|
||||
//file
|
||||
String filePath = "/";
|
||||
String filePath = "C:/Users/zhai_/Desktop/gdms/";
|
||||
//database
|
||||
String dbUrl="jdbc:mariadb://localhost:3306/gdms";
|
||||
String dbUsername="gdms";
|
||||
String dbPassword="GDMS";
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
@ -1,34 +1,238 @@
|
||||
package gdms;
|
||||
|
||||
import dao.DBManagement;
|
||||
import error.GExcptFileIO;
|
||||
import error.GExcptFormat;
|
||||
import error.GExcptInit;
|
||||
import error.GExcptSQL;
|
||||
import net.sf.json.JSONObject;
|
||||
import utils.Utils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
public class GDMS {
|
||||
static Map<String, Date> schedules;
|
||||
static String schedulePath = "";
|
||||
public static void init() throws GExcptInit {
|
||||
static String scheduleName = "GlobalTimePoint.json";
|
||||
public static void init() throws GExcptInit, GExcptFormat {
|
||||
initSchedule();
|
||||
Timer timer = new Timer(true);
|
||||
for(Map.Entry<String, Date> schedule:schedules.entrySet()){
|
||||
timer.schedule(getTimerTask(schedule.getKey()),schedule.getValue());
|
||||
}
|
||||
System.out.println("GDMS init finished");
|
||||
}
|
||||
|
||||
|
||||
private static TimerTask getTimerTask(String s) throws GExcptInit {
|
||||
if(s==""){
|
||||
switch (s){
|
||||
case "teacher_choose_student_start_date":
|
||||
return new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("teacher_choose_student start!");
|
||||
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() {
|
||||
System.out.println("teacher_choose_student start!");
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("student_choose_teacher_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() {
|
||||
;
|
||||
System.out.println("choose_topic finished!");
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("student_choose_teacher_status");
|
||||
fields.add("teacher_choose_student_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("student_fill_graduation_design_information_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_information",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("opening_report_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_opening_report",fields,"1");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("opening_report_mentor_opinion_status");
|
||||
fields.add("opening_report_teacher_team_opinion_status");
|
||||
fields.add("opening_report_college_opinion_status");
|
||||
fields.add("opening_report_secretary_record_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_opening_report_opinion_record",fields,"1");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
case "opening_report_opinion_deadline_date":
|
||||
return new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("opening_report_submit finished");
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("opening_report_mentor_opinion_status");
|
||||
fields.add("opening_report_teacher_team_opinion_status");
|
||||
fields.add("opening_report_college_opinion_status");
|
||||
fields.add("opening_report_secretary_record_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_opening_report_opinion_record",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("finished_product_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_finished_product",fields,"1");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
case "finished_product_deadline_date":
|
||||
return new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("finished_product_submit finished!");
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("finished_product_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_finished_product",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("finished_product_mentor_score_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_finished_product_mentor_score",fields,"1");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("finished_product_reviewer_score_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_finished_product_reviewer_score",fields,"1");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
case "finished_product_review_deadline_date":
|
||||
return new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("finished_product_review_submit finished!");
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("finished_product_mentor_score_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_finished_product_mentor_score",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("finished_product_reviewer_score_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_finished_product_reviewer_score",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
fields = new ArrayList<>();
|
||||
fields.add("reply_mentor_score_status");
|
||||
fields.add("reply_teacher_team_score_status");
|
||||
fields.add("reply_college_score_status");
|
||||
fields.add("reply_secretary_record_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_reply_opinion_record_score",fields,"1");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
throw new GExcptInit("GlobalTimePoint.json error");
|
||||
};
|
||||
case "reply_opinion_deadline_date":
|
||||
return new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("reply_opinion_submit finished!");
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("reply_mentor_score_status");
|
||||
fields.add("reply_teacher_team_score_status");
|
||||
fields.add("reply_college_score_status");
|
||||
fields.add("reply_secretary_record_status");
|
||||
try {
|
||||
DBManagement.updateAll("graduation_design_reply_opinion_record_score",fields,"4");
|
||||
} catch (GExcptSQL gExcptSQL) {
|
||||
gExcptSQL.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static void initSchedule() {
|
||||
throw new GExcptInit("GlobalTimePoint.json error");
|
||||
}
|
||||
|
||||
private static void initSchedule() throws GExcptFormat {
|
||||
schedules = new HashMap<>();
|
||||
String sets= null;
|
||||
try {
|
||||
sets = Utils.readFile(Configuration.filePath+scheduleName);
|
||||
} catch (GExcptFileIO gExcptFileIO) {
|
||||
gExcptFileIO.printStackTrace();
|
||||
}
|
||||
JSONObject jo=JSONObject.fromObject(sets);
|
||||
Iterator it = jo.keys();
|
||||
while (it.hasNext()) {
|
||||
String key = (String)it.next();
|
||||
Object value = jo.get(key);
|
||||
try {
|
||||
schedules.put(key, Configuration.dateFormat.parse((String) value));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
throw new GExcptFormat("json date format error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"teacher_choose_student_start_date":"",
|
||||
"student_choose_teacher_start_date": "",
|
||||
"choose_end_date": "",
|
||||
"opening_report_opinion_deadline_date": "",
|
||||
"finished_product_deadline_date": "",
|
||||
"finished_product_review_deadline_date": "",
|
||||
"reply_option_deadline_date": ""
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue