parent
8f599b3e18
commit
7c09829e78
@ -1,11 +1,44 @@
|
||||
package core.process;
|
||||
import core.user.User;
|
||||
import dao.DBManagement;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ProcessManagement {
|
||||
public Condition getCondition(String userType, List<Integer> index){
|
||||
public static Condition getCondition(User user) {
|
||||
Map<String,Character> status = getStatus(user);
|
||||
return getCondition(user,status);
|
||||
}
|
||||
public static Condition getCondition(User user, Map<String,Character> status){
|
||||
Condition condition = new Condition();
|
||||
for(Map.Entry<String,Character> entry:status.entrySet()){
|
||||
String[] s = entry.getKey().split(".");
|
||||
TempProcess tempProcess = (TempProcess) getProcess(s[1]);
|
||||
tempProcess.setGraduationDesignId(s[0]);
|
||||
tempProcess.setStatus(entry.getValue());
|
||||
condition.add(tempProcess);
|
||||
}
|
||||
condition.add(getLastProcesses(user));
|
||||
return condition;
|
||||
}
|
||||
|
||||
private static List<Process> getLastProcesses(User user) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//Map<graduation_design_id.x_status,status>
|
||||
public static Map<String,Character> getStatus(User user){
|
||||
Map<String,String> userTables = DBManagement.getUserTables(user.getType());
|
||||
for(Map.Entry<String,String> entry:userTables.entrySet()){
|
||||
String[] ti = entry.getKey().split(".");
|
||||
String[] ts = entry.getValue().split(".");
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public Process getProcess(int index){
|
||||
public static Process getProcess(String process){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue