debug condition

hechu1
zhai_lw 6 years ago
parent ad7086f650
commit 49bcc9b319

@ -1917,12 +1917,12 @@
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="456" parent="340" name="mentor_opinion text">
<column id="456" parent="340" name="mentor_opinion">
<Position>4</Position>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="457" parent="340" name="mentor_opinion_date date">
<column id="457" parent="340" name="mentor_opinion_date">
<Position>5</Position>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
@ -1932,7 +1932,7 @@
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="459" parent="340" name="secretary_record_date date">
<column id="459" parent="340" name="secretary_record_date">
<Position>7</Position>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>

@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="zhai_">
<words>
<w>mariadb</w>
</words>
</dictionary>
</component>

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

@ -12,7 +12,7 @@ public class C_CollegeFillScoreOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="学院老师评分";
protected 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";

@ -12,7 +12,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="导师开题意见";
protected static String buttonName ="导师开题意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/mentor-fill-opening-report-opinion";

@ -12,7 +12,7 @@ public class C_MentorFillReview extends TempProcess {
public String graduationDesignId;
public Map<String,String> vMap;
private static String buttonName ="指导老师评阅";
protected static String buttonName ="指导老师评阅";
protected static String targetURL="/home/mentor-fill-review";
protected static String iconURL="../cssFile/images/fill.png";

@ -11,7 +11,7 @@ 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 buttonName ="评阅老师评阅";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/reviewer-fill-review";

@ -12,7 +12,7 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="学院老师评分";
protected static String buttonName ="学院老师评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/school-fill-score-opinion";

@ -12,7 +12,7 @@ public class C_SecretaryFillOpeningReportRecord extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="提交开题纪要";
protected static String buttonName ="提交开题纪要";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/secretary-fill-opening-report-record";

@ -12,7 +12,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="提交答辩记录";
protected static String buttonName ="提交答辩记录";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/secretary-fill-reply-record";

@ -11,7 +11,7 @@ import java.util.Map;
public class C_StudentFillGraduationDesignInformation extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="填写选题信息";
protected static String buttonName ="填写选题信息";
protected static String iconURL="../cssFile/images/filText.png";
protected static String targetURL="/home/student-fill-graduation-design-information";

@ -12,7 +12,7 @@ import java.util.Map;
public class C_StudentSelectTeacher extends TempProcess {
String studentId;
String teacherId;
private static String buttonName ="选择老师";
protected static String buttonName ="选择老师";
protected static String targetURL="/home/student-select-teacher";
protected static String iconURL="../cssFile/images/select.png";

@ -11,7 +11,7 @@ public class C_StudentUploadFinishedProduct extends TempProcess {
File finishedProduct;
String graduationDesignId;
private static String buttonName ="提交定稿";
protected static String buttonName ="提交定稿";
protected static String iconURL="../cssFile/images/upload.png";
protected static String targetURL="/home/student-upload-finished-product";

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

@ -12,7 +12,7 @@ import java.util.Map;
public class C_TeacherSelectStudent extends TempProcess {
String studentId;
String teacherId;
private static String buttonName ="选择学生";
protected static String buttonName ="选择学生";
protected static String iconURL="";
protected static String targetURL="/home/teacher-select-student";

@ -12,7 +12,7 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
private static String buttonName ="开题小组意见";
protected static String buttonName ="开题小组意见";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/teacher-team-fill-opening-report-opinion";

@ -10,7 +10,7 @@ import java.util.Map;
public class C_TeacherTeamFillScoreOpinion extends TempProcess {
private static String buttonName = "答辩小组评分";
protected static String buttonName = "答辩小组评分";
protected static String iconURL="../cssFile/images/fill.png";
protected static String targetURL="/home/teacher-team-fill-score-opinion";
String graduationDesignId;

@ -15,7 +15,7 @@ public class ProcessManagement {
public static Condition getCondition(User user, Map<String, String> status){
Condition condition = new Condition();
for(Map.Entry<String,String> entry:status.entrySet()){
String[] s = entry.getKey().split(".");
String[] s = entry.getKey().split("\\.");
TempProcess tempProcess = (TempProcess) getProcess(s[1]);
tempProcess.setGraduationDesignId(s[0]);
tempProcess.setStatus(entry.getValue());
@ -26,17 +26,18 @@ public class ProcessManagement {
}
private static List<Process> getLastProcesses(User user) {
return null;
List<Process> lp = new ArrayList<>();
return lp;
}
//Map<graduation_design_id.x_status,status>
public static Map<String,String> getStatus(User user) throws Exception {
Map<String, String> status = new HashMap<>();
Map<String,String> userTables = DBManagement.getUserStatusTables(user.getType());
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("\\.");
for(String[] s:userTables){
String[] ti = s[0].split("\\.");
String[] ts = s[1].split("\\.");
List<String> ls = new ArrayList<>();
ls.add("id");
Map<String,String> limits = new HashMap<>();

@ -75,12 +75,18 @@ public interface AccountManagement {
vMap.put("id",id);
DBManagement.insert(table,vMap);
}
for(Map.Entry<String,String> entry:DBManagement.allStatus.entrySet()){
for(String[] s:DBManagement.allStatus){
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);
vMap.put(s[1],defaultStatus);
DBManagement.update(s[0],vMap,limits);
}
//
Map<String,String> vMap = new HashMap<>();
Map<String,String> limits = new HashMap<>();
limits.put("id",id);
vMap.put("student_id",id);
DBManagement.update("graduation_design",vMap,limits);
}
}

@ -2,7 +2,6 @@ package dao;
import java.sql.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import error.GExcptSQL;
@ -56,56 +55,49 @@ public class DBManagement {
"phone_number"
};
//<table1.x_id,table2.x_status>
public static Map<String,String> graduationDesignStudentTables = new HashMap<>(){
{
put("graduation_design.student_id","graduation_design.student_chooser_teacher_status");
put("graduation_design.student_id","graduation_design_information.student_fill_graduation_design_information_status");
put("graduation_design.student_id","graduation_design_opening_report.opening_report_status");
put("opening_report_secretary_team.leader_student_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status");
put("opening_report_secretary_team.student1_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status");
put("opening_report_secretary_team.student2_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status");
put("graduation_design.student_id","graduation_design_finished_product.finished_product_status");
put("reply_secretary_team.leader_student_id","graduation_design_reply_opinion_record_score.reply_ secretary_record_status");
put("reply_secretary_team.teacher1_id","graduation_design_reply_opinion_record_score.reply_ secretary_record_status");
put("reply_secretary_team.teacher2_id","graduation_design_reply_opinion_record_score.reply_ secretary_record_status");
}
public static String[][] graduationDesignStudentTables ={
{"graduation_design.student_id","graduation_design.student_choose_teacher_status"},
{"graduation_design.student_id","graduation_design_information.student_fill_graduation_design_information_status"},
{"graduation_design.student_id","graduation_design_opening_report.opening_report_status"},
{"graduation_design_opening_report_view.leader_student_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status"},
{"graduation_design_opening_report_view.student1_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status"},
{"graduation_design_opening_report_view.student2_id","graduation_design_opening_report_opinion_record.opening_report_secretary_record_status"},
{"graduation_design.student_id","graduation_design_finished_product.finished_product_status"},
{"graduation_design_reply_view.leader_student_id","graduation_design_reply_opinion_record_score.reply_secretary_record_status"},
{"graduation_design_reply_view.teacher1_id","graduation_design_reply_opinion_record_score.reply_secretary_record_status"},
{"graduation_design_reply_view.teacher2_id","graduation_design_reply_opinion_record_score.reply_secretary_record_status"}
};
public static Map<String,String> graduationDesignTeacherTables = new HashMap<>(){
{
put("graduation_design.teacher_id","graduation_design.teacher_choose_student_status");
put("graduation_design.teacher_id","graduation_design_opening_report_opinion_record.opening_report_mentor_opinion_status");
put("opening_report_teacher_team.leader_teacher_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status");
put("opening_report_teacher_team.teacher1_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status");
put("opening_report_teacher_team.teacher2_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status");
put("graduation_design_opening_report_opinion_record.opening_report_college_teacher_id","graduation_design_opening_report_opinion_record.opening_report_college_opinion_status");
put("graduation_design.teacher_id","graduation_design_finished_product_mentor_score.finished_product_mentor_score_status");
put("graduation_design_finished_product_reviewer_score.reviewer_teacher_id","graduation_design_finished_product_reviewer_score.finished_product_reviewer_score_status");
put("reply_teacher_team.leader_teacher_id","graduation_design_reply_opinion_record_score.reply_ teacher_team_score_status");
put("reply_teacher_team. teacher1_id","graduation_design_reply_opinion_record_score.reply_ teacher_team_score_status");
put("reply_teacher_team. teacher2_id","graduation_design_reply_opinion_record_score.reply_ teacher_team_score_status");
put("graduation_design_reply_opinion_record_score.reply_college_teacher_id","graduation_design_reply_opinion_record_score.reply_college_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 String[][] graduationDesignTeacherTables = {
{"graduation_design.teacher_id","graduation_design.teacher_choose_student_status"},
{"graduation_design.teacher_id","graduation_design_opening_report_opinion_record.opening_report_mentor_opinion_status"},
{"graduation_design_opening_report_view.leader_teacher_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_view.teacher1_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_view.teacher2_id","graduation_design_opening_report_opinion_record.opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_opinion_record.opening_report_college_teacher_id","graduation_design_opening_report_opinion_record.opening_report_college_opinion_status"},
{"graduation_design.teacher_id","graduation_design_finished_product_mentor_score.finished_product_mentor_score_status"},
{"graduation_design_finished_product_reviewer_score.reviewer_teacher_id","graduation_design_finished_product_reviewer_score.finished_product_reviewer_score_status"},
{"graduation_design_reply_view.leader_teacher_id","graduation_design_reply_opinion_record_score.reply_teacher_team_score_status"},
{"graduation_design_reply_view.teacher1_id","graduation_design_reply_opinion_record_score.reply_teacher_team_score_status"},
{"graduation_design_reply_view.teacher2_id","graduation_design_reply_opinion_record_score.reply_teacher_team_score_status"},
{"graduation_design_reply_opinion_record_score.reply_college_teacher_id","graduation_design_reply_opinion_record_score.reply_college_score_status"},
{"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[][] allStatus = {
{"graduation_design","teacher_choose_student_status"},
{"graduation_design","student_choose_teacher_status"},
{"graduation_design_information","student_fill_graduation_design_information_status"},
{"graduation_design_opening_report","opening_report_status"},
{"graduation_design_opening_report_opinion_record","opening_report_mentor_opinion_status"},
{"graduation_design_opening_report_opinion_record","opening_report_teacher_team_opinion_status"},
{"graduation_design_opening_report_opinion_record","opening_report_college_opinion_status"},
{"graduation_design_opening_report_opinion_record","opening_report_secretary_record_status"},
{"graduation_design_finished_product","finished_product_status"},
{"graduation_design_finished_product_mentor_score","finished_product_mentor_score_status"},
{"graduation_design_finished_product_reviewer_score","finished_product_reviewer_score_status"},
{"graduation_design_reply_opinion_record_score","reply_secretary_record_status"},
{"graduation_design_reply_opinion_record_score","reply_teacher_team_score_status"},
{"graduation_design_reply_opinion_record_score","reply_college_score_status"},
{"graduation_design_reply_opinion_record_score","reply_school_score_status"}
};
public static String driverClassName="org.mariadb.jdbc.Driver";
@ -138,7 +130,7 @@ public class DBManagement {
}
return null;
}
public static Map<String,String> getUserStatusTables(String userType){
public static String[][] getUserStatusTables(String userType){
if(userType.equals("student")){
return graduationDesignStudentTables;
}
@ -198,7 +190,7 @@ public class DBManagement {
ls.add(s);
}
} catch (SQLException e) {
throw new GExcptSQL("Connect Failure");
throw new GExcptSQL("Connect Failure\n"+sql);
}finally {
if(con!=null) {
try {
@ -218,7 +210,7 @@ public class DBManagement {
Statement stmt = con.createStatement();
stmt.executeUpdate(sql);
} catch (SQLException e) {
throw new GExcptSQL("Connect Failure");
throw new GExcptSQL("Connect Failure\n"+sql);
}finally {
if(con!=null) {
try {

@ -1,6 +1,5 @@
package servlet;
import core.process.C_StudentSearchTeacher;
import core.process.C_StudentSelectTeacher;
import core.user.User;
import javax.servlet.ServletException;

@ -11,7 +11,6 @@
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="core.process.C_TeacherSearchStudent" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>

Loading…
Cancel
Save