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

# Conflicts:
#	src/core/process/C_TeacherSearchStudent.java
#	web/jsFile/upload_action.js
hechu1
何楚 6 years ago
commit a1a3f84473

@ -8,7 +8,14 @@
<element id="module-output" name="GDMS" />
</element>
<element id="directory" name="lib">
<element id="file-copy" path="C:/Program Files/apache-tomcat-9.0.13/lib/tomcat-jdbc.jar" />
<element id="library" level="project" name="lib" />
<element id="library" level="project" name="tomcat-lib" />
<element id="file-copy" path="C:/Program Files/Apache Software Foundation/Tomcat 9.0/lib/tomcat-jdbc.jar" />
<element id="file-copy" path="$PROJECT_DIR$/web/WEB-INF/lib/jstl.jar" />
<element id="file-copy" path="$PROJECT_DIR$/web/WEB-INF/lib/standard.jar" />
<element id="file-copy" path="$PROJECT_DIR$/web/WEB-INF/lib/commons-io-2.6.jar" />
<element id="file-copy" path="$PROJECT_DIR$/web/WEB-INF/lib/commons-fileupload-1.3.1.jar" />
<element id="file-copy" path="$PROJECT_DIR$/web/WEB-INF/lib/mariadb-java-client-2.3.0.jar" />
</element>
</element>
</root>

@ -1626,516 +1626,536 @@
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="398" parent="335" name="score">
<column id="398" parent="335" name="reviewer_teacher_id">
<Position>2</Position>
<DataType>float|0s</DataType>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="399" parent="335" name="opinion">
<column id="399" parent="335" name="score">
<Position>3</Position>
<DataType>text|0s</DataType>
<DataType>float|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="400" parent="335" name="reviewer_score_date">
<column id="400" parent="335" name="opinion">
<Position>4</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="401" parent="335" name="finished_product_reviewer_score_status">
<column id="401" parent="335" name="reviewer_score_date">
<Position>5</Position>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="402" parent="335" name="finished_product_reviewer_score_status">
<Position>6</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="402" parent="335" name="PRIMARY">
<key id="403" parent="335" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="403" parent="336" name="id">
<column id="404" parent="336" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="404" parent="336" name="chinese_name">
<column id="405" parent="336" name="chinese_name">
<Position>2</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="405" parent="336" name="english_name">
<column id="406" parent="336" name="english_name">
<Position>3</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="406" parent="336" name="type_of_topic">
<column id="407" parent="336" name="type_of_topic">
<Position>4</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="407" parent="336" name="source_of_design">
<column id="408" parent="336" name="source_of_design">
<Position>5</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="408" parent="336" name="nature_of_design">
<column id="409" parent="336" name="nature_of_design">
<Position>6</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="409" parent="336" name="description_of_topic">
<column id="410" parent="336" name="description_of_topic">
<Position>7</Position>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="410" parent="336" name="student_fill_graduation_design_information_status">
<column id="411" parent="336" name="student_fill_graduation_design_information_status">
<Position>8</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="411" parent="336" name="PRIMARY">
<key id="412" parent="336" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="412" parent="337" name="id">
<column id="413" parent="337" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="413" parent="337" name="report_date">
<column id="414" parent="337" name="report_date">
<Position>2</Position>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="414" parent="337" name="report_location">
<column id="415" parent="337" name="report_location">
<Position>3</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="415" parent="337" name="report_url">
<column id="416" parent="337" name="report_url">
<Position>4</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="416" parent="337" name="report_teacher_leader_team_id">
<column id="417" parent="337" name="report_teacher_leader_team_id">
<Position>5</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="417" parent="337" name="report_secretary_leader_team_id">
<column id="418" parent="337" name="report_secretary_leader_team_id">
<Position>6</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="418" parent="337" name="estimated_word_count">
<column id="419" parent="337" name="estimated_word_count">
<Position>7</Position>
<DataType>int(11)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="419" parent="337" name="opening_report_status">
<column id="420" parent="337" name="opening_report_status">
<Position>8</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="420" parent="337" name="PRIMARY">
<key id="421" parent="337" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="421" parent="338" name="id">
<column id="422" parent="338" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="422" parent="338" name="mentor_opinion">
<column id="423" parent="338" name="opening_report_college_teacher_id">
<Position>2</Position>
<DataType>text|0s</DataType>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="423" parent="338" name="mentor_opinion_date">
<column id="424" parent="338" name="mentor_opinion">
<Position>3</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="424" parent="338" name="secretary_record">
<column id="425" parent="338" name="mentor_opinion_date">
<Position>4</Position>
<DataType>text|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="425" parent="338" name="secretary_record_date">
<column id="426" parent="338" name="secretary_record">
<Position>5</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="426" parent="338" name="report_teacher_team_opinion">
<column id="427" parent="338" name="secretary_record_date">
<Position>6</Position>
<DataType>text|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="427" parent="338" name="report_teacher_team_opinion_date">
<column id="428" parent="338" name="report_teacher_team_opinion">
<Position>7</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="428" parent="338" name="college_opinion">
<column id="429" parent="338" name="report_teacher_team_opinion_date">
<Position>8</Position>
<DataType>text|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="429" parent="338" name="college_opinion_date">
<column id="430" parent="338" name="college_opinion">
<Position>9</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="430" parent="338" name="opening_report_mentor_opinion_status">
<column id="431" parent="338" name="college_opinion_date">
<Position>10</Position>
<DataType>char(1)|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="431" parent="338" name="opening_report_teacher_team_opinion_status">
<column id="432" parent="338" name="opening_report_mentor_opinion_status">
<Position>11</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="432" parent="338" name="opening_report_college_opinion_status">
<column id="433" parent="338" name="opening_report_teacher_team_opinion_status">
<Position>12</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="433" parent="338" name="opening_report_secretary_record_status">
<column id="434" parent="338" name="opening_report_college_opinion_status">
<Position>13</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="434" parent="338" name="PRIMARY">
<column id="435" parent="338" name="opening_report_secretary_record_status">
<Position>14</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="436" parent="338" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="435" parent="339" name="id">
<column id="437" parent="339" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="436" parent="339" name="date">
<column id="438" parent="339" name="date">
<Position>2</Position>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="437" parent="339" name="location">
<column id="439" parent="339" name="location">
<Position>3</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="438" parent="339" name="teacher_team_leader_id">
<column id="440" parent="339" name="teacher_team_leader_id">
<Position>4</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="439" parent="339" name="secretary_team_leader_id">
<column id="441" parent="339" name="secretary_team_leader_id">
<Position>5</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="440" parent="339" name="PRIMARY">
<key id="442" parent="339" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="441" parent="340" name="id">
<column id="443" parent="340" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="442" parent="340" name="mentor_opinion text">
<column id="444" parent="340" name="reply_college_teacher_id">
<Position>2</Position>
<DataType>text|0s</DataType>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="443" parent="340" name="mentor_opinion_date date">
<column id="445" parent="340" name="reply_school_teacher_id">
<Position>3</Position>
<DataType>date|0s</DataType>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="444" parent="340" name="secretary_record">
<column id="446" parent="340" name="mentor_opinion text">
<Position>4</Position>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="445" parent="340" name="secretary_record_date date">
<column id="447" parent="340" name="mentor_opinion_date date">
<Position>5</Position>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="446" parent="340" name="teacher_team_opinion">
<column id="448" parent="340" name="secretary_record">
<Position>6</Position>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="447" parent="340" name="teacher_team_score">
<column id="449" parent="340" name="secretary_record_date date">
<Position>7</Position>
<DataType>float|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="448" parent="340" name="teacher_team_opinion_date">
<column id="450" parent="340" name="teacher_team_opinion">
<Position>8</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="449" parent="340" name="college_opinion">
<column id="451" parent="340" name="teacher_team_score">
<Position>9</Position>
<DataType>text|0s</DataType>
<DataType>float|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="450" parent="340" name="college_score">
<column id="452" parent="340" name="teacher_team_opinion_date">
<Position>10</Position>
<DataType>float|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="451" parent="340" name="college_opinion_date">
<column id="453" parent="340" name="college_opinion">
<Position>11</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="452" parent="340" name="school_opinion">
<column id="454" parent="340" name="college_score">
<Position>12</Position>
<DataType>text|0s</DataType>
<DataType>float|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="453" parent="340" name="school_score">
<column id="455" parent="340" name="college_opinion_date">
<Position>13</Position>
<DataType>float|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="454" parent="340" name="school_opinion_date">
<column id="456" parent="340" name="school_opinion">
<Position>14</Position>
<DataType>date|0s</DataType>
<DataType>text|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="455" parent="340" name="reply_ secretary_record_status">
<column id="457" parent="340" name="school_score">
<Position>15</Position>
<DataType>char(1)|0s</DataType>
<DataType>float|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="456" parent="340" name="reply_ teacher_team_score_status">
<column id="458" parent="340" name="school_opinion_date">
<Position>16</Position>
<DataType>char(1)|0s</DataType>
<DataType>date|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="457" parent="340" name="reply_ college_score_status">
<column id="459" parent="340" name="reply_ secretary_record_status">
<Position>17</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="458" parent="340" name="reply_school_score_status">
<column id="460" parent="340" name="reply_ teacher_team_score_status">
<Position>18</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="459" parent="340" name="PRIMARY">
<column id="461" parent="340" name="reply_ college_score_status">
<Position>19</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="462" parent="340" name="reply_school_score_status">
<Position>20</Position>
<DataType>char(1)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="463" parent="340" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="460" parent="341" name="leader_student_id">
<column id="464" parent="341" name="leader_student_id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="461" parent="341" name="student1_id">
<column id="465" parent="341" name="student1_id">
<Position>2</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="462" parent="341" name="student2_id">
<column id="466" parent="341" name="student2_id">
<Position>3</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="463" parent="341" name="PRIMARY">
<key id="467" parent="341" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>leader_student_id</ColNames>
<Primary>1</Primary>
</key>
<column id="464" parent="342" name="leader_teacher_id">
<column id="468" parent="342" name="leader_teacher_id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="465" parent="342" name="teacher1_id">
<column id="469" parent="342" name="teacher1_id">
<Position>2</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="466" parent="342" name="teacher2_id">
<column id="470" parent="342" name="teacher2_id">
<Position>3</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="467" parent="342" name="PRIMARY">
<key id="471" parent="342" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>leader_teacher_id</ColNames>
<Primary>1</Primary>
</key>
<column id="468" parent="343" name="profession_code">
<column id="472" parent="343" name="profession_code">
<Position>1</Position>
<DataType>char(8)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="469" parent="343" name="college">
<column id="473" parent="343" name="college">
<Position>2</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="470" parent="343" name="department">
<column id="474" parent="343" name="department">
<Position>3</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="471" parent="343" name="profession">
<column id="475" parent="343" name="profession">
<Position>4</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="472" parent="343" name="PRIMARY">
<key id="476" parent="343" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>profession_code</ColNames>
<Primary>1</Primary>
</key>
<column id="473" parent="344" name="leader_student_id">
<column id="477" parent="344" name="leader_student_id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="474" parent="344" name="student1_id">
<column id="478" parent="344" name="student1_id">
<Position>2</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="475" parent="344" name="student2_id">
<column id="479" parent="344" name="student2_id">
<Position>3</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="476" parent="344" name="PRIMARY">
<key id="480" parent="344" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>leader_student_id</ColNames>
<Primary>1</Primary>
</key>
<column id="477" parent="345" name="leader_teacher_id">
<column id="481" parent="345" name="leader_teacher_id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="478" parent="345" name="teacher1_id">
<column id="482" parent="345" name="teacher1_id">
<Position>2</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="479" parent="345" name="teacher2_id">
<column id="483" parent="345" name="teacher2_id">
<Position>3</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="480" parent="345" name="PRIMARY">
<key id="484" parent="345" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>leader_teacher_id</ColNames>
<Primary>1</Primary>
</key>
<column id="481" parent="346" name="id">
<column id="485" parent="346" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="482" parent="346" name="password">
<column id="486" parent="346" name="password">
<Position>2</Position>
<DataType>char(255)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="483" parent="346" name="name">
<column id="487" parent="346" name="name">
<Position>3</Position>
<DataType>char(30)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="484" parent="346" name="e_mail_location">
<column id="488" parent="346" name="e_mail_location">
<Position>4</Position>
<DataType>char(40)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="485" parent="346" name="phone_number">
<column id="489" parent="346" name="phone_number">
<Position>5</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="486" parent="346" name="grade">
<column id="490" parent="346" name="grade">
<Position>6</Position>
<DataType>char(4)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="487" parent="346" name="profession_code">
<column id="491" parent="346" name="profession_code">
<Position>7</Position>
<DataType>char(8)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="488" parent="346" name="PRIMARY">
<key id="492" parent="346" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="489" parent="347" name="id">
<column id="493" parent="347" name="id">
<Position>1</Position>
<DataType>char(20)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="490" parent="347" name="password">
<column id="494" parent="347" name="password">
<Position>2</Position>
<DataType>char(255)|0s</DataType>
<NotNull>1</NotNull>
<ColumnKind>normal</ColumnKind>
</column>
<column id="491" parent="347" name="name">
<column id="495" parent="347" name="name">
<Position>3</Position>
<DataType>char(30)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="492" parent="347" name="e_mail_location">
<column id="496" parent="347" name="e_mail_location">
<Position>4</Position>
<DataType>char(40)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="493" parent="347" name="phone_number">
<column id="497" parent="347" name="phone_number">
<Position>5</Position>
<DataType>char(20)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="494" parent="347" name="job_title">
<column id="498" parent="347" name="job_title">
<Position>6</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="495" parent="347" name="education">
<column id="499" parent="347" name="education">
<Position>7</Position>
<DataType>varchar(255)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<column id="496" parent="347" name="profession_code">
<column id="500" parent="347" name="profession_code">
<Position>8</Position>
<DataType>char(8)|0s</DataType>
<ColumnKind>normal</ColumnKind>
</column>
<key id="497" parent="347" name="PRIMARY">
<key id="501" parent="347" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="false" project-jdk-name="10" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -17,14 +17,14 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="10" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5.37" level="application_server_libraries" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5" level="application_server_libraries" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://E:/tomcat8/apache-tomcat-8.5.37/lib/tomcat-jdbc.jar!/" />
<root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib/tomcat-jdbc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />

@ -4,7 +4,7 @@
name="jdbc/gdms"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mariadb://localhost:3306/gdms"
targetURL="jdbc:mariadb://localhost:3306/gdms"
username="gdms"
password="GDMS"/>
</Context>

@ -3,7 +3,7 @@ password char 256
name varchar 50
e_mail_location varchar 50
phonenumber varchar 30
url varchar 256
targetURL varchar 256
administrator
id

@ -3,7 +3,7 @@ password char 255//用户密码
name char 30//用户姓名
e_mail_location char 40//邮箱
phone_number char 20//电话号码
url varchar 255//......路径
targetURL varchar 255//......路径
administrator//管理员
id//管理员ID

@ -11,21 +11,15 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class UploadFileOperation extends Operation {
public class UploadFile extends Operation {
@Override
public Map<String, Object> execute(User subject) throws Exception {
File file = (File) this.getOptions().get("file");
String table = (String) this.getOptions().get("file_type");
Map<String,String> limits = (Map<String, String>) this.getOptions().get("limits");
String field = core.operation.utils.Utils.getFileField(table);
String filePath = core.operation.utils.Utils.getFilePathName(table,file.getName());
String filePath = (String) this.getOptions().get("file_url");
Map<String,String> vMap = new HashMap<>();
vMap.put(field,filePath);
file.renameTo(new File(filePath));
//todo
List<String> ls = new ArrayList<>();
ls.add(field);
List<String[]> resultLs = DBManagement.select(ls,table,limits,0,1);

@ -1,6 +1,6 @@
{
"options":{
"file": "File",
"file_url": "String",
"file_type": "String",
"limits":"Map<String,String>"
},

@ -35,19 +35,4 @@ public interface Utils {
static String getFileField(String table){
return fileTableField.get(table);
}
static String getFilePath(String table){
return Configuration.filePath+table+"/";
}
static String getFileName(String fileName){
SimpleDateFormat simpleDateFormat;
simpleDateFormat = new SimpleDateFormat("yyMMddHHmmssSSS");
Date date = new Date();
String str = simpleDateFormat.format(date);
str+=(int)(Math.random()*100000);
str+= utils.Utils.getFileType(fileName);
return str;
}
static String getFilePathName(String table, String fileName){
return getFilePath(table)+getFileName(fileName);
}
}

@ -0,0 +1,50 @@
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_CollegeFillOpeningReportOpinion 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("college_opinion_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||this.getVMap()==null)
return false;
return true;
}
public String getGraduationDesignId() {
return graduationDesignId;
}
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
public Map<String, String> getVMap() {
return vMap;
}
}

@ -0,0 +1,45 @@
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_CollegeFillScoreOpinion extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
static String table="graduation_design_reply_opinion_record_score";
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("college_opinion_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;
}
public Map<String, String> getVMap() {
return vMap;
}
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
}

@ -0,0 +1,43 @@
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_MentorFillOpeningReportOpinion extends TempProcess{
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("mentor_opinion_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.getVMap()==null||this.getGraduationDesignId()==null)
return false;
return true;
}
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
public Map<String, String> getVMap() {
return vMap;
}
}

@ -0,0 +1,58 @@
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_MentorFillReview extends TempProcess {
public String teacherID;
public String teacher_opinion;
public Map<String,String> vMap;
static String table="graduation_design_finished_product_mentor_score";
public String getTeacher_opinion() {
return teacher_opinion;
}
public void setTeacher_opinion(String teacher_opinion) {
this.teacher_opinion = teacher_opinion;
}
public String getTeacherID() {
return teacherID;
}
public void setTeacherID(String teacherID) {
this.teacherID = teacherID;
}
public Map<String, String> getvMap() {
return vMap;
}
public void setvMap(Map<String, String> vMap) {
this.vMap = vMap;
}
public void TeacherTeamFillOpeningReportOpinion() throws Exception{
if(!check()) throw new GExcptInit("MentorFillReview 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("review_opinion_date",date);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getTeacherID());
fillInformation.addOptions("limits",limits);
fillInformation.execute(null);
}
@Override
protected boolean check() {
if(this.getTeacherID().equals(null)||this.getTeacher_opinion().equals(null)||this.getvMap().equals(null))
return false;
else
return true;
}
}

@ -0,0 +1,53 @@
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_SchoolFillScoreOpinion extends TempProcess {
String graduationDesignId;
Map<String,String> vMap;
static String table="graduation_design_reply_opinion_record_score";
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("school_opinion_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,50 @@
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,51 @@
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_SecretaryFillReplyRecord extends TempProcess{
String graduationDesignId;
Map<String,String> vMap;
static String table="graduation_design_reply_opinion_record_score";
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;
}
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,47 @@
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_StudentFillGraduationDesignInformation 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);
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;
}
}

@ -1,24 +1,29 @@
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 {
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(String teacherID) throws Exception {
public Map<String,String> search() throws Exception {
if(!check()) throw new GExcptInit("teacherID Attrs init error!");
Search search = new Search() ;
search.setOptions(new HashMap<>());
String table = "teacher";
search.addOptions("table",table);
List<String> fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>();
limits.put("id",teacherID);
limits.put("id",this.getTeacherID());
search.addOptions("limits",limits);
search.addOptions("start",0);
search.addOptions("end",1);
@ -27,6 +32,20 @@ public class C_StudentSearchTeacher {
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,22 +1,46 @@
package core.process;
import core.operation.Select;
import error.GExcptInit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class C_StudentSelectTeacher extends core.process.Process {
public void select(String studentID,String teacherID)throws Exception{
public class C_StudentSelectTeacher extends TempProcess {
String studentId;
String teacherId;
public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!");
Select select=new Select();
select.setOptions(new HashMap<>());
String student_id=studentID;
select.addOptions("student_id",student_id);
String teacher_id=teacherID;
select.addOptions("teacher_id",teacher_id);
select.addOptions("student_id",this.getStudentId());
select.addOptions("teacher_id",this.getTeacherId());
Map<String,Object> options=select.execute(null);
}
protected boolean check() {
if(this.getStudentId()==null||this.getTeacherId()==null)
return false;
return true;
}
public String getTeacherId() {
return teacherId;
}
public void setTeacherId(String teacherId) {
this.teacherId = teacherId;
}
public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId;
}
}

@ -0,0 +1,48 @@
package core.process;
import core.operation.UploadFile;
import error.GExcptInit;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class C_StudentUploadFinishedProduct {
File finishedProduct;
String graduationDesignId;
static String file_type = "finished_product";
public void uploadOpeningReport() throws Exception{
if(!check()) throw new GExcptInit("Upload FinishedProduct Attrs init error!");
UploadFile uploadFile=new UploadFile();
uploadFile.setOptions(new HashMap<>());
uploadFile.addOptions("file",this.getFinishedProduct());
uploadFile.addOptions("file_type",file_type);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGraduationDesignId());
uploadFile.addOptions("limits",limits);
uploadFile.execute(null);
}
protected boolean check() {
if(this.getFinishedProduct()==null||this.getGraduationDesignId()==null)
return false;
return true;
}
public File getFinishedProduct() {
return finishedProduct;
}
public void setFinishedProduct(File finishedProduct) {
this.finishedProduct = finishedProduct;
}
public String getGraduationDesignId() {
return graduationDesignId;
}
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
}

@ -0,0 +1,49 @@
package core.process;
import core.operation.UploadFile;
import error.GExcptInit;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class C_StudentUploadOpeningReport extends TempProcess{
File openingReport;
String graduationDesignId;
static String file_type = "opening_report";
public void uploadOpeningReport() throws Exception{
if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!");
UploadFile uploadFileOperation=new UploadFile();
uploadFileOperation.setOptions(new HashMap<>());
uploadFileOperation.addOptions("file",this.getOpeningReport());
uploadFileOperation.addOptions("file_type",file_type);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGraduationDesignId());
uploadFileOperation.addOptions("limits",limits);
uploadFileOperation.execute(null);
}
protected boolean check() {
if(this.getGraduationDesignId()==null||this.getOpeningReport()==null)
return false;
return true;
}
public File getOpeningReport() {
return openingReport;
}
public void setOpeningReport(File openingReport) {
this.openingReport = openingReport;
}
public String getGraduationDesignId() {
return graduationDesignId;
}
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
}

@ -1,34 +1,77 @@
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 {
Map<String,String> StudentInfo=new HashMap<String,String>();
public Map<String,String> search(String studentID) throws Exception{
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<>());
String table = "student";
search.addOptions("table",table);
List<String> fields = new ArrayList<>();
fields.add("*");
search.addOptions("field",fields);
Map<String,String> limits = new HashMap<>();
limits.put("id",studentID);
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("学号",s[0]);
StudentInfo.put("名字",s[2]);
StudentInfo.put("邮箱",s[3]);
StudentInfo.put("电话",s[4]);
return StudentInfo;
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;
}
}

@ -1,33 +1,46 @@
package core.process;
import core.operation.Select;
import error.GExcptInit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class C_TeacherSelectStudent extends Process {
List<String> list;
public C_TeacherSelectStudent clone(){
C_TeacherSelectStudent tst = new C_TeacherSelectStudent();
tst.setInfo( this.getInfo());
List<String> list = new ArrayList<>();
for(String s:this.list){
list.add(new String(s));
}
return null;
}
public void select(String teacherID,String studentID)throws Exception{
public class C_TeacherSelectStudent extends TempProcess {
String studentId;
String teacherId;
public void select()throws Exception{
if(!check()) throw new GExcptInit("ID Attrs init error!");
Select select=new Select();
select.setOptions(new HashMap<>());
String teacher_id=teacherID;
select.addOptions("teacher_id",teacher_id);
String student_id=studentID;
select.addOptions("student_id",student_id);
select.addOptions("teacher_id",this.getTeacherId());
select.addOptions("student_id",this.getStudentId());
Map<String,Object> options=select.execute(null);
}
protected boolean check() {
if(this.getStudentId()==null||this.getTeacherId()==null)
return false;
return true;
}
public String getTeacherId() {
return teacherId;
}
public void setTeacherId(String teacherId) {
this.teacherId = teacherId;
}
public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId;
}
}

@ -0,0 +1,50 @@
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_TeacherTeamFillOpeningReportOpinion 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("report_teacher_team_opinion_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,49 @@
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_TeacherTeamFillScoreOpinion extends TempProcess {
String graduationDesignId;
Map<String,String> vMap;
static String table="graduation_design_reply_opinion_record_score";
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("teacher_team_opinion_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;
}
}

@ -4,13 +4,16 @@ import core.operation.Operation;
public abstract class Process{
private char status;
private String status;
private String permission;
private Operation operation;
private String buttonName;
private String info;
private static String buttonName;
protected static String targetURL;
protected static String iconURL;
protected abstract boolean check();
public String getPermission() {
return permission;
}
@ -31,10 +34,6 @@ public abstract class Process{
return buttonName;
}
public void setButtonName(String buttonName) {
this.buttonName = buttonName;
}
public String getInfo() {
return info;
}
@ -43,11 +42,19 @@ public abstract class Process{
this.info = info;
}
public char getStatus() {
public String getStatus() {
return status;
}
public void setStatus(char status) {
public void setStatus(String status) {
this.status = status;
}
public static String getTargetURL() {
return targetURL;
}
public static String getIconURL() {
return iconURL;
}
}

@ -2,17 +2,19 @@ package core.process;
import core.user.User;
import dao.DBManagement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ProcessManagement {
public static Condition getCondition(User user) {
Map<String,Character> status = getStatus(user);
public static Condition getCondition(User user) throws Exception {
Map<String,String> status = getStatus(user);
return getCondition(user,status);
}
public static Condition getCondition(User user, Map<String,Character> status){
public static Condition getCondition(User user, Map<String, String> status){
Condition condition = new Condition();
for(Map.Entry<String,Character> entry:status.entrySet()){
for(Map.Entry<String,String> entry:status.entrySet()){
String[] s = entry.getKey().split(".");
TempProcess tempProcess = (TempProcess) getProcess(s[1]);
tempProcess.setGraduationDesignId(s[0]);
@ -28,17 +30,29 @@ public class ProcessManagement {
}
//Map<graduation_design_id.x_status,status>
public static Map<String,Character> getStatus(User user){
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 graduationDesignId = null;
for(Map.Entry<String,String> entry:userTables.entrySet()){
String[] ti = entry.getKey().split(".");
String[] ts = entry.getValue().split(".");
List<String> ls = new ArrayList<>();
ls.add("id");
Map<String,String> limits = new HashMap<>();
limits.put(ti[1],user.getId());
List<String[]> resultLs = DBManagement.select(ls,ti[0],limits,0,1);
if(resultLs.size()==0) continue;
graduationDesignId = resultLs.get(0)[0];
ls = new ArrayList<>();
ls.add(ts[1]);
limits = new HashMap<>();
limits.put("id",graduationDesignId);
resultLs = DBManagement.select(ls,ts[0],limits,0,1);
status.put(graduationDesignId+"."+ts[1],resultLs.get(0)[0]);
}
return null;
return status;
}
public static Process getProcess(String process){
return null;

@ -5,7 +5,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import error.GExcptSQL;
import gdms.Configuration;
import org.apache.tomcat.jdbc.pool.DataSource;
@ -60,19 +59,32 @@ public class DBManagement {
public static Map<String,String> graduationDesignStudentTables = new HashMap<>(){
{
put("graduation_design.student_id","graduation_design.student_chooser_teacher_status");
put("opening_report_secretary_team.leader_student_id","");
put("opening_report_secretary_team.student1_id","");
put("opening_report_secretary_team.student2_id","");
put("reply_secretary_team.leader_student_id","");
put("reply_secretary_team.student1_id","");
put("reply_secretary_team.student2_id","");
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 Map<String,String> graduationDesignTeacherTables = new HashMap<>(){
{
put("","");
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 driverClassName="org.mariadb.jdbc.Driver";

@ -0,0 +1,7 @@
package error;
public class GExcptInit extends GExcpt {
public GExcptInit(String info) {
super(info);
}
}

@ -0,0 +1,34 @@
package gdms;
import error.GExcptInit;
import java.util.*;
public class GDMS {
static Map<String, Date> schedules;
static String schedulePath = "";
public static void init() throws GExcptInit {
initSchedule();
Timer timer = new Timer(true);
for(Map.Entry<String, Date> schedule:schedules.entrySet()){
timer.schedule(getTimerTask(schedule.getKey()),schedule.getValue());
}
}
private static TimerTask getTimerTask(String s) throws GExcptInit {
if(s==""){
return new TimerTask() {
@Override
public void run() {
;
}
};
}
throw new GExcptInit("GlobalTimePoint.json error");
}
private static void initSchedule() {
}
}

@ -0,0 +1,9 @@
{
"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": ""
}

@ -1,18 +0,0 @@
package gdms;
public class main {
public static void check()throws Exception{
checkJson();
}
private static void checkJson() throws Exception{
//todo
}
public static void init(){
}
public static void run() throws Exception {
check();
init();
}
}

@ -17,18 +17,6 @@ public class test {
System.out.println(i);
}while(i<3);
List<String> list = new ArrayList<>();
list.add("q");
list.add("w");
Map<String,String> map=new HashMap<>();
map.put("a","b");
map.put("c","d");
Select sql = new Select(list,"zx",map,1,2);
System.out.println(sql.getSQL());
System.out.println(Utils.getFilePathName("a","b"));
String a = "a";
changeB(a);
System.out.println(a);
}
static void changeB(String a){
a="B";

@ -0,0 +1,31 @@
package servlet;
import core.process.C_CollegeFillOpeningReportOpinion;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("college-fill-opening-report-opinion")
public class S_CollegeFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
C_CollegeFillOpeningReportOpinion p =new C_CollegeFillOpeningReportOpinion();
p.setGraduationDesignId(id);
p.setVMap(vMap);
try {
p.fillInformation();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
static String[] vName = {
"college_opinion"
};
}

@ -0,0 +1,32 @@
package servlet;
import core.process.C_CollegeFillScoreOpinion;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("college-fill-score-opinion")
public class S_CollegeFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
C_CollegeFillScoreOpinion p =new C_CollegeFillScoreOpinion();
p.setGraduationDesignId(id);
p.setVMap(vMap);
try {
p.fillInformation();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
static String[] vName = {
"college_opinion",
"college_score"
};
}

@ -0,0 +1,31 @@
package servlet;
import core.process.C_MentorFillOpeningReportOpinion;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("mentor-fill-opening-report-opinion")
public class S_MentorFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
C_MentorFillOpeningReportOpinion p = new C_MentorFillOpeningReportOpinion();
p.setGraduationDesignId(id);
p.setVMap(vMap);
try {
p.fillInformation();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
static String[] vName = {
"mentor_opinion"
};
}

@ -0,0 +1,22 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("mentor-fill-review")
public class S_MentorFillReview extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"total_grade",
"review_opinion"
};
}

@ -0,0 +1,22 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("reviewer-fill-review")
public class S_ReviewerFillReview extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"score",
"opinion"
};
}

@ -0,0 +1,22 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("school-fill-score-opinion")
public class S_SchoolFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"school_opinion",
"school_score"
};
}

@ -0,0 +1,21 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("secretary-fill-opening-report-record")
public class S_SecretaryFillOpeningReportRecord extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"secretary_record"
};
}

@ -0,0 +1,21 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("secretary-fill-reply-record")
public class S_SecretaryFillReplyRecord extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"secretary_record"
};
}

@ -0,0 +1,27 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("/student-fill-graduation-design-information")
public class S_StudentFillGraduationDesignInformation extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"chinese_name",
"english_name",
"type_of_topic",
"source_of_design",
"nature_of_design",
"description_of_topic"
};
}

@ -4,21 +4,26 @@ import core.process.C_StudentSearchTeacher;
import core.process.C_StudentSelectTeacher;
import core.user.User;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/student-select-teacher")
public class S_StudentSelectTeacher extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String student_id=request.getParameter("id");
String teacherId=request.getParameter("id");
User user=(User)request.getSession().getAttribute("user");
String teacher_id=user.getId();
String studentId=user.getId();
try {
new C_StudentSelectTeacher().select(student_id,teacher_id);
C_StudentSelectTeacher SST=new C_StudentSelectTeacher();
SST.setTeacherId(teacherId);
SST.setStudentId(studentId);
SST.select();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
}

@ -0,0 +1,20 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/student-upload-finished-product")
@MultipartConfig
public class S_StudentUploadFinishedProduct extends HttpServlet {
static String fileType = "graduation_design_finished_product";
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = "000";
//String id = request.getParameter("id");
String fileURL = servlet.Utils.saveFile(request, fileType);
}
}

@ -0,0 +1,23 @@
package servlet;
import core.user.User;
import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import java.io.IOException;
import java.util.UUID;
@WebServlet("/student-upload-opening-report")
@MultipartConfig
public class S_StudentUploadOpeningReport extends HttpServlet {
static String fileType = "graduation_design_opening_report";
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
String fileURL = servlet.Utils.saveFile(request, fileType);
}
}

@ -4,21 +4,26 @@ import core.process.C_TeacherSelectStudent;
import core.user.User;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/teacher-select-student")
public class S_TeacherSelectStudent extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String teacher_id=request.getParameter("id");
String studentId=request.getParameter("id");
User user=(User)request.getSession().getAttribute("user");
String student_id=user.getId();
String teacherId=user.getId();
try {
new C_TeacherSelectStudent().select(teacher_id,student_id);
C_TeacherSelectStudent TSS=new C_TeacherSelectStudent();
TSS.setTeacherId(teacherId);
TSS.setStudentId(studentId);
TSS.select();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
}

@ -0,0 +1,21 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("teacher-team-fill-opening-report-opinion")
public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"report_teacher_team_opinion"
};
}

@ -0,0 +1,22 @@
package servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
@WebServlet("teacher-team-fill-score-opinion")
public class S_TeacherTeamFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
}
static String[] vName = {
"teacher_team_opinion",
"teacher_team_score"
};
}

@ -0,0 +1,59 @@
package servlet;
import gdms.Configuration;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Part;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface Utils {
static Map<String,String> getVMap(String[] vName, HttpServletRequest request){
Map<String,String> vMap = new HashMap<>();
for(int i=0;i<vName.length;i++){
vMap.put(vName[i],request.getParameter(vName[i]));
}
return vMap;
}
static String getFilePath(String table){
return Configuration.filePath+table+"/";
}
static String getFileName(String fileName){
SimpleDateFormat simpleDateFormat;
simpleDateFormat = new SimpleDateFormat("yyMMddHHmmssSSS");
Date date = new Date();
String str = simpleDateFormat.format(date);
str+=(int)(Math.random()*100000);
str+= utils.Utils.getFileType(fileName);
return str;
}
static String getFilePathName(String table, String fileName){
return getFilePath(table)+getFileName(fileName);
}
static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException {
Part part = request.getPart("graduation_design");
String header = part.getHeader("content-disposition");
String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1);
String filePathName = servlet.Utils.getFilePathName(table,path);
File file = new File(filePathName);
InputStream inputStream = part.getInputStream();
FileOutputStream outputStream = new FileOutputStream(file);
int len;
byte[] bytes = new byte[1024];
while ((len = inputStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, len);
}
outputStream.close();
inputStream.close();
part.delete();
return filePathName;
}
}

@ -0,0 +1,44 @@
package servlet.account;
import java.io.IOException;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import core.user.Student;
import core.user.User;
import core.user.utils.AccountManagement;
import error.GExcptAccount;
import error.GExcptSQL;
@WebServlet("/login")
public class S_Login extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException {
String id=request.getParameter("id");
String password=request.getParameter("password");
User user;
try {
user = AccountManagement.login(id,password);
} catch (GExcptSQL | SQLException gExcptSQL) {
gExcptSQL.printStackTrace();
response.sendRedirect("/op_fail.jsp");
return;
} catch (GExcptAccount gExcptAccount) {
gExcptAccount.printStackTrace();
response.sendRedirect("/op_fail.jsp");
return;
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
return;
}
request.getSession().setAttribute("user",user);
response.sendRedirect("/home.jsp");
return;
}
}

@ -10,12 +10,11 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
@WebServlet("/register")
public class Register extends HttpServlet {
public class S_Register extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Map<String,String> user_info=new HashMap<>();

@ -1,44 +0,0 @@
package servlet.account;
import java.io.IOException;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import core.user.Student;
import core.user.User;
import core.user.utils.AccountManagement;
import error.GExcptAccount;
import error.GExcptSQL;
@WebServlet("/login")
public class login extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String id=request.getParameter("id");
String password=request.getParameter("password");
User user = null;
try {
user = AccountManagement.login(id,password);
} catch (GExcptSQL | SQLException gExcptSQL) {
gExcptSQL.printStackTrace();
response.sendRedirect("/op_fail.jsp");
return;
} catch (GExcptAccount gExcptAccount) {
gExcptAccount.printStackTrace();
response.sendRedirect("/op_fail.jsp");
return;
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
return;
}
request.getSession().setAttribute("user",user);
response.sendRedirect("/home.jsp");
return;
}
}

@ -82,7 +82,7 @@
to either the page, a String in 'var', or a Reader in 'varReader'.
</description>
<attribute>
<name>url</name>
<name>targetURL</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@ -281,7 +281,7 @@
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>url</name>
<name>targetURL</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@ -346,7 +346,7 @@
</tag>
<tag>
<name>url</name>
<name>targetURL</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
<body-content>JSP</body-content>
<description>

@ -21,7 +21,7 @@
out:default
out:escapeXml
if:test
import:url
import:targetURL
import:context
import:charEncoding
forEach:items
@ -36,12 +36,12 @@
param:name
param:value
redirect:context
redirect:url
redirect:targetURL
set:property
set:target
set:value
url:context
url:value
targetURL:context
targetURL:value
when:test
</param-value>
<description>
@ -139,7 +139,7 @@
to either the page, a String in 'var', or a Reader in 'varReader'.
</description>
<attribute>
<name>url</name>
<name>targetURL</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
@ -304,7 +304,7 @@
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>url</name>
<name>targetURL</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
@ -369,7 +369,7 @@
</tag>
<tag>
<name>url</name>
<name>targetURL</name>
<tag-class>org.apache.taglibs.standard.tag.el.core.UrlTag</tag-class>
<body-content>JSP</body-content>
<description>

@ -103,7 +103,7 @@ Scope for var.
<description>
The URL of the resource to import.
</description>
<name>url</name>
<name>targetURL</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@ -403,7 +403,7 @@ Value of the parameter.
<description>
The URL of the resource to redirect to.
</description>
<name>url</name>
<name>targetURL</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@ -500,13 +500,13 @@ Scope for var.
<description>
Creates a URL with optional query parameters.
</description>
<name>url</name>
<name>targetURL</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
Name of the exported scoped variable for the
processed url. The type of the scoped variable is
processed targetURL. The type of the scoped variable is
String.
</description>
<name>var</name>

@ -170,7 +170,7 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>url</name>
<name>targetURL</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>

@ -30,7 +30,7 @@
dateParam:type
setDataSource:dataSource
setDataSource:driver
setDataSource:url
setDataSource:targetURL
setDataSource:user
setDataSource:password
</param-value>
@ -195,7 +195,7 @@ ue.
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>url</name>
<name>targetURL</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>

@ -263,7 +263,7 @@ JDBC parameter: driver class name.
JDBC parameter: URL associated with
the database.
</description>
<name>url</name>
<name>targetURL</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>

@ -56,7 +56,6 @@
<input type="button" class="submit-text" value="提交">
</form>
</div>
</div>
</div>
</body>

@ -5,7 +5,7 @@ $(document).ready(function () {
})
function sendFile() {
var fileData =new FormData();
var Url4='testfrom.jsp';
var Url4='student-upload-finished-product';
var file=$('.true-select').files;
if($('.true-select').val()=='')
{

Loading…
Cancel
Save