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

zgl
zgl 6 years ago
commit 0a4e6e35ed

@ -1,17 +1,11 @@
<component name="ArtifactManager"> <component name="ArtifactManager">
<artifact type="exploded-war" name="GDMS:war exploded"> <artifact type="exploded-war" name="gdms:war exploded">
<output-path>$PROJECT_DIR$/out/artifacts/GDMS_war_exploded</output-path> <output-path>$PROJECT_DIR$/out/artifacts/gdms_war_exploded</output-path>
<root id="root"> <root id="root">
<element id="javaee-facet-resources" facet="GDMS/web/Web" /> <element id="javaee-facet-resources" facet="gdms/web/Web" />
<element id="directory" name="WEB-INF"> <element id="directory" name="WEB-INF">
<element id="directory" name="classes"> <element id="directory" name="classes">
<element id="module-output" name="GDMS" /> <element id="module-output" name="gdms" />
<element id="dir-copy" path="C:/Program Files/Apache Software Foundation/Tomcat 8.5" />
</element>
<element id="directory" name="lib">
<element id="library" level="project" name="lib" />
<element id="extracted-dir" path="C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib/tomcat-jdbc.jar" path-in-jar="/" />
<element id="file-copy" path="C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib/tomcat-jdbc.jar" />
</element> </element>
</element> </element>
</root> </root>

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

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

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

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

@ -9,36 +9,21 @@
<webroots> <webroots>
<root url="file://$MODULE_DIR$/web" relative="/" /> <root url="file://$MODULE_DIR$/web" relative="/" />
</webroots> </webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src" />
</sourceRoots>
</configuration> </configuration>
</facet> </facet>
</component> </component>
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" scope="PROVIDED" name="lib" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Tomcat 9.0.14" level="application_server_libraries" />
<orderEntry type="library" exported="" scope="PROVIDED" name="tomcat-lib" level="project" /> <orderEntry type="module-library">
<orderEntry type="module-library" exported="" scope="PROVIDED">
<library> <library>
<CLASSES> <CLASSES>
<root url="file://C:/Program Files/Apache Software Foundation/Tomcat 8.5" /> <root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 9.0/lib/tomcat-jdbc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://C:/Program Files/Apache Software Foundation/Tomcat 8.5/webapps/docs/appdev/sample/src" />
<root url="file://C:/Program Files/Apache Software Foundation/Tomcat 8.5/work/Catalina/localhost/ROOT" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="library" exported="" scope="PROVIDED" name="Tomcat 8.5.37" level="application_server_libraries" />
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib/tomcat-jdbc.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />

@ -7,7 +7,7 @@ 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;

@ -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,11 @@ public class ProcessManagement {
return status; return status;
} }
public static Process getProcess(String process){ public static Process getProcess(String process){
switch (process){
case "finished_product_status":
return new C_StudentUploadFinishedProduct();
default:
return null; return null;
} }
} }
}

@ -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,12 @@ 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);
User user = createUser(userType, vMap);
if(userType=="student"){
//initAllStatus((Student) user);
}
return user;
} }
static void logout(User user){ static void logout(User user){
//todo //todo
@ -60,6 +66,13 @@ 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){
for(Map.Entry<String,String> entry:DBManagement.allStatus.entrySet()){
}
}
} }

@ -87,6 +87,12 @@ 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","");
}
};
public static String driverClassName="org.mariadb.jdbc.Driver"; public static String driverClassName="org.mariadb.jdbc.Driver";

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

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

@ -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);
} }
Loading…
Cancel
Save