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

zgl
zgl 6 years ago
commit 0a4e6e35ed

@ -1,17 +1,11 @@
<component name="ArtifactManager">
<artifact type="exploded-war" name="GDMS:war exploded">
<output-path>$PROJECT_DIR$/out/artifacts/GDMS_war_exploded</output-path>
<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="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 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 id="module-output" name="gdms" />
</element>
</element>
</root>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="gdms@localhost" uuid="d0989a90-3d64-4aea-93d3-6e27652a2f33">
<data-source source="LOCAL" name="gdms@localhost" uuid="9ab10673-d584-44a7-a783-8ac833d52c51">
<driver-ref>mariadb</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>

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

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

@ -9,36 +9,21 @@
<webroots>
<root url="file://$MODULE_DIR$/web" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<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="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" scope="PROVIDED" name="lib" level="project" />
<orderEntry type="library" exported="" scope="PROVIDED" name="tomcat-lib" level="project" />
<orderEntry type="module-library" exported="" scope="PROVIDED">
<orderEntry type="library" scope="PROVIDED" name="Tomcat 9.0.14" level="application_server_libraries" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://C:/Program Files/Apache Software Foundation/Tomcat 8.5" />
</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!/" />
<root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 9.0/lib/tomcat-jdbc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />

@ -7,7 +7,7 @@ import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class C_StudentUploadFinishedProduct {
public class C_StudentUploadFinishedProduct extends TempProcess{
File finishedProduct;
String graduationDesignId;

@ -35,8 +35,8 @@ public class ProcessManagement {
Map<String,String> userTables = DBManagement.getUserStatusTables(user.getType());
String graduationDesignId = null;
for(Map.Entry<String,String> entry:userTables.entrySet()){
String[] ti = entry.getKey().split(".");
String[] ts = entry.getValue().split(".");
String[] ti = entry.getKey().split("\\.");
String[] ts = entry.getValue().split("\\.");
List<String> ls = new ArrayList<>();
ls.add("id");
Map<String,String> limits = new HashMap<>();
@ -55,6 +55,11 @@ public class ProcessManagement {
return status;
}
public static Process getProcess(String process){
return null;
switch (process){
case "finished_product_status":
return new C_StudentUploadFinishedProduct();
default:
return null;
}
}
}

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

@ -1,5 +1,6 @@
package core.user.utils;
import core.user.Student;
import core.user.User;
import core.utils.GetObjectByName;
import dao.DBManagement;
@ -49,7 +50,12 @@ public interface AccountManagement {
}
static User register(String userType, Map<String, String> vMap) throws Exception {
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){
//todo
@ -60,6 +66,13 @@ public interface AccountManagement {
static User createUser(String userType, Map<String, String> vMap) throws Exception {
User user = GetObjectByName.getUserByName(userType);
user.setAttr(vMap);
user.initCondition();
return user;
}
String defaultStatus = "1";
static void initAllStatus(String id){
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");
}
};
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";

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

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

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