實(shí)驗(yàn)報(bào)告管理系統(tǒng)報(bào)告樣本_第1頁
實(shí)驗(yàn)報(bào)告管理系統(tǒng)報(bào)告樣本_第2頁
實(shí)驗(yàn)報(bào)告管理系統(tǒng)報(bào)告樣本_第3頁
實(shí)驗(yàn)報(bào)告管理系統(tǒng)報(bào)告樣本_第4頁
實(shí)驗(yàn)報(bào)告管理系統(tǒng)報(bào)告樣本_第5頁
已閱讀5頁,還剩50頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

軟件項(xiàng)目設(shè)計(jì)報(bào)告實(shí)驗(yàn)報(bào)告管理系統(tǒng)所在班級(jí)12計(jì)卓小構(gòu)成員江靈瞳印海平錢晨晨學(xué)院名稱信電工程學(xué)院專業(yè)名稱計(jì)算機(jī)科學(xué)與技術(shù)指引教師胡局新起止日期.12.16-.1.151月15日目錄1緒論 11.1開發(fā)背景 11.2本次設(shè)計(jì)完畢工作 11.3任務(wù)分工 11.4任務(wù) 12系統(tǒng)分析 22.1需求分析 22.2可行性分析 22.3用例圖 23系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn) 43.1系統(tǒng)目的 43.2系統(tǒng)功能構(gòu)造 43.3功能流程及工作流程 43.4系統(tǒng)流程圖 53.5構(gòu)建開發(fā)環(huán)境 53.7文獻(xiàn)夾組織構(gòu)造 63.8學(xué)生模塊實(shí)現(xiàn) 63.9教師模塊實(shí)現(xiàn) 19結(jié)論 351緒論1.1開發(fā)背景實(shí)驗(yàn)教學(xué)是學(xué)生技能培養(yǎng)重要環(huán)節(jié)之一,學(xué)生實(shí)驗(yàn)報(bào)告質(zhì)量在一定限度上反映了實(shí)驗(yàn)教學(xué)質(zhì)量,實(shí)驗(yàn)報(bào)告管理水平也反映了實(shí)驗(yàn)教學(xué)管理水平。當(dāng)前,大某些學(xué)校所提交實(shí)驗(yàn)報(bào)告大多還停留在以紙為介質(zhì)方式上,這將嚴(yán)重制約著實(shí)驗(yàn)教學(xué)開展。一方面,諸多課程實(shí)驗(yàn)成果在紙質(zhì)實(shí)驗(yàn)報(bào)告中不能體現(xiàn)或不能完全體現(xiàn),另一方面紙質(zhì)實(shí)驗(yàn)報(bào)告批改和分析也是實(shí)驗(yàn)授課教師一種很重承擔(dān),如何提高學(xué)生實(shí)驗(yàn)報(bào)告表象能力,提高教師批改實(shí)驗(yàn)報(bào)告效率并及時(shí)發(fā)現(xiàn)和糾正實(shí)驗(yàn)報(bào)告中存在問題是許多課程實(shí)驗(yàn)授課教師所面對(duì)一種難題。1.2本次設(shè)計(jì)完畢工作教師登錄該系統(tǒng)可以上傳、下載實(shí)驗(yàn)報(bào)告、查看學(xué)生做實(shí)驗(yàn)報(bào)告并給學(xué)生打分、教師可以查看實(shí)驗(yàn)驗(yàn)課程、實(shí)驗(yàn)課程列表、查看實(shí)驗(yàn)提交狀況等。學(xué)生登錄該系統(tǒng)可以上傳、下載實(shí)驗(yàn)報(bào)告、查看實(shí)驗(yàn)課程和實(shí)驗(yàn)課程列表。1.3任務(wù)分工組織構(gòu)造:為了完畢學(xué)生信息管理系統(tǒng)項(xiàng)目開發(fā),班級(jí)構(gòu)成了一種項(xiàng)目團(tuán)隊(duì),人員分工:為了明確項(xiàng)目團(tuán)隊(duì)中每個(gè)人任務(wù)分工,現(xiàn)制定人員分工,如下表2.1所示:表2.1人員分工成員角色負(fù)責(zé)模塊內(nèi)容A江靈瞳學(xué)生上傳,下載,學(xué)生查看實(shí)驗(yàn)課程,查看實(shí)驗(yàn)列表B印海平教師上傳,下載,和教師填寫分?jǐn)?shù),數(shù)據(jù)庫設(shè)計(jì)C錢晨晨教師查看實(shí)驗(yàn)課程,查看實(shí)驗(yàn)列表,查看實(shí)驗(yàn)上交狀況,登錄1.4任務(wù)咱們?nèi)齻€(gè)人各自分工完畢自己模塊內(nèi)容,一方面,江靈瞳構(gòu)造整個(gè)系統(tǒng)框架,然后印海平設(shè)計(jì)數(shù)據(jù)庫,在咱們一起先設(shè)計(jì)前臺(tái)界面,之后咱們就各自實(shí)現(xiàn)各自模塊功能。

2系統(tǒng)分析2.1需求分析1)實(shí)驗(yàn)課程設(shè)立,設(shè)立課程編號(hào)、課程名、時(shí)間、次數(shù)、教師編號(hào)、教師名、實(shí)驗(yàn)班級(jí);2)實(shí)驗(yàn)列表設(shè)立,設(shè)立實(shí)驗(yàn)編號(hào)、實(shí)驗(yàn)名、班級(jí)、學(xué)生學(xué)號(hào)、學(xué)生名、教師名、實(shí)驗(yàn)途徑、提交狀態(tài)、分?jǐn)?shù);3)樹型類別設(shè)立,設(shè)立編號(hào)、名字、途徑、學(xué)生名、教師名、樹狀態(tài)。2.2可行性分析2.2.1引言編寫目:背景:徐州工程學(xué)院是一所培養(yǎng)應(yīng)用型人才普通高等學(xué)院。為了完善管理學(xué)校實(shí)驗(yàn)報(bào)告太多沒有地方保存了,經(jīng)決定開發(fā)實(shí)驗(yàn)報(bào)告管理系統(tǒng)。2.2.2可行性研究前提規(guī)定:實(shí)驗(yàn)報(bào)告系統(tǒng)必要提供學(xué)生信息和教師信息基本設(shè)立;提供強(qiáng)大條件搜索功能個(gè)實(shí)驗(yàn)課程查詢、實(shí)驗(yàn)列表浮現(xiàn)等管理功能;可以分不同權(quán)限、不同顧客對(duì)該系統(tǒng)進(jìn)行操作。此外,該系統(tǒng)還必要保證數(shù)據(jù)安全性、完整性和精確性。目的:實(shí)驗(yàn)報(bào)告管理系統(tǒng)目的是實(shí)現(xiàn)學(xué)生紙質(zhì)實(shí)驗(yàn)報(bào)告太多沒有地方長(zhǎng)期保存,這樣用一種系統(tǒng)可以將一種課程所有學(xué)生實(shí)驗(yàn)報(bào)告進(jìn)行管理以便存儲(chǔ)。條件、假定和限制:時(shí)間限制,咱們必要在兩周時(shí)間里完畢項(xiàng)目,在這期間系統(tǒng)分析員需要整頓好分析成果,分派各成員任務(wù),每天需要人員跟蹤記錄整頓文檔。程序開發(fā)人員須在5天時(shí)間里進(jìn)行系統(tǒng)設(shè)計(jì)、程序編碼、系統(tǒng)測(cè)試、程序調(diào)試。期間,還涉及一種雙休日假期。2.2.3結(jié)論依照上面分析,在技術(shù)上不會(huì)存在什么問題,因而項(xiàng)目延期也許性很小。只要在分派時(shí)間里都能順利地完畢任務(wù),再加上團(tuán)隊(duì)凝聚力齊心合力,相信在這兩周內(nèi)會(huì)獲得一種滿意成果。2.3用例圖圖2.1用例圖

3系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)3.1系統(tǒng)目的依照需求分析描述以及與組建成員溝通,現(xiàn)制定系統(tǒng)實(shí)現(xiàn)目的如下:a.界面設(shè)計(jì)簡(jiǎn)潔、和諧、美觀大方。b.操作簡(jiǎn)樸、快捷以便。c.數(shù)據(jù)存儲(chǔ)安全、可靠。d.信息分類清晰、精確。e.強(qiáng)大查詢功能,保證數(shù)據(jù)查詢靈活性。f.為管理員提供真實(shí)數(shù)據(jù)信息。g.對(duì)顧客輸入數(shù)據(jù),系統(tǒng)進(jìn)行嚴(yán)格數(shù)據(jù)檢查,盡量排除以為錯(cuò)誤。3.2系統(tǒng)功能構(gòu)造圖3.1系統(tǒng)功能構(gòu)造3.3功能流程及工作流程學(xué)生模塊:a.查看實(shí)驗(yàn)課程系統(tǒng)操作人員打開學(xué)生模塊主界面,輸入有關(guān)信息(學(xué)號(hào)、密碼)進(jìn)入模塊,點(diǎn)擊年按鈕就可以看到所需要信息。b.查看實(shí)驗(yàn)列表系統(tǒng)操作人員打開學(xué)生模塊主界面,輸入有關(guān)信息進(jìn)入模塊,點(diǎn)擊課程就可以看到所要信息。c.下載實(shí)驗(yàn)報(bào)告模板當(dāng)該學(xué)生進(jìn)入自己界面時(shí),找到要做實(shí)驗(yàn)報(bào)告課程,點(diǎn)擊下載按鈕。d.上傳實(shí)驗(yàn)報(bào)告當(dāng)學(xué)生做完實(shí)驗(yàn)報(bào)告后,進(jìn)入系統(tǒng),點(diǎn)擊上傳按鈕。教師模塊:a.查看實(shí)驗(yàn)課程系統(tǒng)操作人員打開學(xué)生模塊主界面,輸入有關(guān)信息(工號(hào)、密碼)進(jìn)入模塊,點(diǎn)擊年按鈕就可以看到所需要信息。b.查看實(shí)驗(yàn)列表系統(tǒng)操作人員打開教師模塊主界面,輸入有關(guān)信息進(jìn)入模塊,點(diǎn)擊課程就可以看到所要信息c.查看提交狀況教師進(jìn)入教師界面,點(diǎn)擊自己教課程,點(diǎn)擊查看按鈕。d.上傳實(shí)驗(yàn)報(bào)告模板當(dāng)該教師進(jìn)入自己界面時(shí),找到要做實(shí)驗(yàn)報(bào)告課程實(shí)驗(yàn)名稱,點(diǎn)擊上傳按鈕。e.下載學(xué)生實(shí)驗(yàn)當(dāng)該教師進(jìn)入自己界面時(shí),找到實(shí)驗(yàn)列表詳情,點(diǎn)擊下載按鈕。f.打分當(dāng)該教師進(jìn)入自己界面時(shí),下載學(xué)生實(shí)驗(yàn)報(bào)告看完后,在實(shí)驗(yàn)列表詳情中點(diǎn)擊打分按鈕。3.4系統(tǒng)流程圖圖3.2系統(tǒng)流程圖3.5構(gòu)建開發(fā)環(huán)境a.操作系統(tǒng):windows7或XPb.java開發(fā)包:JDK1.6c.?dāng)?shù)據(jù)庫:MYSQLd.辨別率:最佳效果為1024*768像素3.7文獻(xiàn)夾組織構(gòu)造圖3.7文獻(xiàn)夾組織構(gòu)造3.8學(xué)生模塊實(shí)現(xiàn)packagecom.xzit.entity;publicclassExperclass{ privateintEid; privateStringcourseID; privateStringcourseName; privateStringcourseTime; privateStringcoursePeriod;//課程學(xué)時(shí) privateintexperimentNum; privateStringteacherName; privateStringclassName; publicExperclass(){ super(); } publicExperclass(inteid,StringcourseID,StringcourseName, StringcourseTime,intexperimentNum,StringteacherName, StringclassName){ super(); Eid=eid; this.courseID=courseID; this.courseName=courseName; this.courseTime=courseTime; this.experimentNum=experimentNum; this.teacherName=teacherName; this.className=className; } publicExperclass(inteid,StringcourseID,StringcourseName, StringcourseTime,StringcoursePeriod,intexperimentNum, StringteacherName,StringclassName){ super(); Eid=eid; this.courseID=courseID; this.courseName=courseName; this.courseTime=courseTime; this.coursePeriod=coursePeriod; this.experimentNum=experimentNum; this.teacherName=teacherName; this.className=className; } publicStringgetCoursePeriod(){ returncoursePeriod; } publicvoidsetCoursePeriod(StringcoursePeriod){ this.coursePeriod=coursePeriod; } publicStringgetCourseID(){ returncourseID; } publicvoidsetCourseID(StringcourseID){ this.courseID=courseID; } publicStringgetCourseName(){ returncourseName; } publicvoidsetCourseName(StringcourseName){ this.courseName=courseName; } publicStringgetCourseTime(){ returncourseTime; } publicvoidsetCourseTime(StringcourseTime){ this.courseTime=courseTime; } publicintgetExperimentNum(){ returnexperimentNum; } publicvoidsetExperimentNum(intexperimentNum){ this.experimentNum=experimentNum; } publicStringgetTeacherName(){ returnteacherName; } publicvoidsetTeacherName(StringteacherName){ this.teacherName=teacherName; } publicStringgetClassName(){ returnclassName; } publicvoidsetClassName(StringclassName){ this.className=className; } }packagecom.xzit.dao.impl;importjava.sql.Connection;importjava.sql.PreparedStatement;importjava.sql.ResultSet;importjava.util.ArrayList;importjava.util.HashMap;importjava.util.List;importjava.util.Map;importorg.apache.struts2.ServletActionContext;importcom.xzit.dao.ExperclassDao;importcom.xzit.entity.ExperContent;importcom.xzit.entity.Experclass;importcom.xzit.util.DBConnection;importcom.xzit.util.DataGrid;publicclassExperclassDaoimplextendsBaseDao<Experclass>implementsExperclassDao{ privateStringCourseTime; publicExperclassDaoimpl()throwsException{ //TODOAuto-generatedconstructorstub } privateConnectionconn=newDBConnection().getConn(); privatePreparedStatementstrat=null; publicDataGrid<Map<String,Object>>experclass(Stringcoursetime) throwsException{ DataGrid<Map<String,Object>>dg= newDataGrid<Map<String,Object>>(); //分頁信息 String_page=ServletActionContext.getRequest().getParameter("page"); intpage=Integer.parseInt(_page==null?"1":_page); String_rows=ServletActionContext.getRequest().getParameter("rows"); introws=Integer.parseInt(_rows==null?"20":_rows); Stringsql="select*fromexperclasstablewhereCourseTime='"+coursetime+"'andTeacherID='"+ ServletActionContext.getRequest().getSession().getAttribute("TeaId")+"'"; //Stringsql="selectCourseID,CourseName,CourseTime,CoursePeriod,ExperimentNum,TeacherName,ClassNamefromexperclasstablewhereCourseTime='"+courseTime+"'andClassName='"+ //ServletActionContext.getRequest().getSession().getAttribute("userclassname")+"'"; System.out.println("==============sql==========="+sql); List<Map<String,Object>>datamap=super.listMapList(sql,page,rows); dg.setRows(datamap); StringcountSQL="selectcount(*)fromexperclasstablewhereCourseTime='"+coursetime+"'andTeacherID='"+ ServletActionContext.getRequest().getSession().getAttribute("TeaId")+"'"; dg.setTotal(super.count(countSQL)); returndg; } publicDataGrid<Map<String,Object>>stuexperclass(StringcourseTime)throwsException{ //TODOAuto-generatedmethodstub DataGrid<Map<String,Object>>dg= newDataGrid<Map<String,Object>>(); //分頁信息 String_page=ServletActionContext.getRequest().getParameter("page"); intpage=Integer.parseInt(_page==null?"1":_page); String_rows=ServletActionContext.getRequest().getParameter("rows"); introws=Integer.parseInt(_rows==null?"20":_rows); //Stringsql="selectCourseID,CourseName,ExperimentNum,TeacherNamefromexperclasstablewhereCourseTime='-'andClassName='12計(jì)卓'"; Stringsql="selectCourseID,CourseName,CourseTime,CoursePeriod,ExperimentNum,TeacherName,ClassNamefromexperclasstablewhereCourseTime='"+courseTime+"'andClassName='"+ ServletActionContext.getRequest().getSession().getAttribute("userclassname")+"'"; List<Map<String,Object>>datamap=super.listMapList(sql,page,rows); dg.setRows(datamap); StringcountSQL="selectcount(*)fromexperclasstablewhereCourseTime='"+courseTime+"'andClassName='"+ ServletActionContext.getRequest().getSession().getAttribute("userclassname")+"'"; dg.setTotal(super.count(countSQL)); returndg; } publicDataGrid<Map<String,Object>>stuexperContentlist(StringcourseId)throwsException{ //TODOAuto-generatedmethodstub DataGrid<Map<String,Object>>dg= newDataGrid<Map<String,Object>>(); //分頁信息 String_page=ServletActionContext.getRequest().getParameter("page"); intpage=Integer.parseInt(_page==null?"1":_page); String_rows=ServletActionContext.getRequest().getParameter("rows"); introws=Integer.parseInt(_rows==null?"20":_rows); //Stringsql="selectCourseID,CourseName,ExperimentNum,TeacherNamefromexperclasstablewhereCourseTime='-'andClassName='12計(jì)卓'"; Stringsql="selectt1.ExperimentID,t1.ExperimentName,ExperimentPeriod,t1.TeacherName,t2.Status,t2.upfileDate,t1.ExperimentContentfromexpercontenttableast1joinexpertablesubmitast2ont1.ExperimentID=t2.ExperimentIDwheret1.CourseID='" +courseId+"'andStudentID="+ServletActionContext.getRequest().getSession().getAttribute("userId"); List<Map<String,Object>>datamap=super.listMapList(sql,page,rows); dg.setRows(datamap); StringcountSQL="selectcount(*)fromexpercontenttableast1joinexpertablesubmitast2ont1.ExperimentID=t2.ExperimentIDwheret1.CourseID='"+courseId+"'andStudentID="+ServletActionContext.getRequest().getSession().getAttribute("userId"); dg.setTotal(super.count(countSQL)); returndg; } publicExperContentqueryExperContent(StringexperimentID)throwsException{ //TODOAuto-generatedmethodstub Stringsql="selectt1.*fromexpercontenttableast1joinexpertablesubmitast2ont1.CourseID=t2.CourseIDwheret1.ExperimentID='"+experimentID+"'andStudentID='"+ServletActionContext.getRequest().getSession().getAttribute("userId")+"'"; System.out.println(sql); strat=conn.prepareStatement(sql);ResultSetrs=strat.executeQuery();ExperContentcontent=null;if(rs.next()){ content=newExperContent(); content.setExperimentID(rs.getString("ExperimentID")); content.setExperimentName(rs.getString("ExperimentName")); content.setExperimentContent(rs.getString("ExperimentContent")); content.setExperimentPeriod(rs.getInt("ExperimentPeriod")); content.setTeacherName(rs.getString("TeacherName")); //content.setTempletfile(rs.getString("Templetfile")); content.setTempletfile("upload/"+rs.getString("Templetfile").replace("\\","/")); } returncontent; } publicDataGrid<Map<String,Object>>getexperlist(StringcourseId)throwsException{ //TODOAuto-generatedmethodstub DataGrid<Map<String,Object>>dg= newDataGrid<Map<String,Object>>(); //分頁信息 String_page=ServletActionContext.getRequest().getParameter("page"); intpage=Integer.parseInt(_page==null?"1":_page); String_rows=ServletActionContext.getRequest().getParameter("rows"); introws=Integer.parseInt(_rows==null?"20":_rows); //Stringsql="selectCourseID,CourseName,ExperimentNum,TeacherNamefromexperclasstablewhereCourseTime='-'andClassName='12計(jì)卓'"; Stringsql="select*fromexpercontenttablewhereCourseID='" +courseId+"'"; List<Map<String,Object>>datamap=super.listMapList(sql,page,rows); dg.setRows(datamap); StringcountSQL="selectcount(*)fromexpercontenttablewhereCourseID='" +courseId+"'"; dg.setTotal(super.count(countSQL)); returndg; } publicStringgetCourseTime(){ returnCourseTime; } publicvoidsetCourseTime(StringcourseTime){ CourseTime=courseTime; } }packagecom.xzit.entity;publicclassExper{ privateStringExperimentID; privateStringExperimentName; privateStringClassName; privateStringStudentID; privateStringStudentName; privateStringTeacherID; privateStringTeacherName; privateStringFileName; privateStringFileRoad; privateStringStatus; privateStringUpfileDate; privateStringTestscore; publicExper(){ super(); } publicExper(StringexperimentID,StringexperimentName, StringstudentName,StringteacherName,StringfileRoad, Stringstatus){ super(); ExperimentID=experimentID; ExperimentName=experimentName; StudentName=studentName; TeacherName=teacherName; FileRoad=fileRoad; Status=status; } publicExper(StringexperimentID,StringexperimentName,StringclassName, StringstudentID,StringstudentName,StringteacherID, StringteacherName,StringfileName,StringfileRoad, Stringstatus,StringupfileDate,Stringtestscore){ super(); ExperimentID=experimentID; ExperimentName=experimentName; ClassName=className; StudentID=studentID; StudentName=studentName; TeacherID=teacherID; TeacherName=teacherName; FileName=fileName; FileRoad=fileRoad; Status=status; UpfileDate=upfileDate; Testscore=testscore; } publicStringgetClassName(){ returnClassName; } publicvoidsetClassName(StringclassName){ ClassName=className; } publicStringgetStudentID(){ returnStudentID; } publicvoidsetStudentID(StringstudentID){ StudentID=studentID; } publicStringgetTeacherID(){ returnTeacherID; } publicvoidsetTeacherID(StringteacherID){ TeacherID=teacherID; } publicStringgetFileName(){ returnFileName; } publicvoidsetFileName(StringfileName){ FileName=fileName; } publicStringgetUpfileDate(){ returnUpfileDate; } publicvoidsetUpfileDate(StringupfileDate){ UpfileDate=upfileDate; } publicStringgetTestscore(){ returnTestscore; } publicvoidsetTestscore(Stringtestscore){ Testscore=testscore; } publicStringgetExperimentID(){ returnExperimentID; } publicvoidsetExperimentID(StringexperimentID){ ExperimentID=experimentID; } publicStringgetExperimentName(){ returnExperimentName; } publicvoidsetExperimentName(StringexperimentName){ ExperimentName=experimentName; } publicStringgetStudentName(){ returnStudentName; } publicvoidsetStudentName(StringstudentName){ StudentName=studentName; } publicStringgetTeacherName(){ returnTeacherName; } publicvoidsetTeacherName(StringteacherName){ TeacherName=teacherName; } publicStringgetFileRoad(){ returnFileRoad; } publicvoidsetFileRoad(StringfileRoad){ FileRoad=fileRoad; } publicStringgetStatus(){ returnStatus; } publicvoidsetStatus(Stringstatus){ Status=status; } }packagecom.xzit.dao.impl;importjava.sql.Connection;importjava.sql.PreparedStatement;importjava.util.List;importjava.util.Map;importorg.apache.struts2.ServletActionContext;importcom.xzit.dao.ExperDao;importcom.xzit.entity.Exper;importcom.xzit.util.DBConnection;importcom.xzit.util.DataGrid;publicclassExperDaoListImpl<T>extendsBaseDao<Exper>implementsExperDao{ privateConnectionconn=newDBConnection().getConn(); privatePreparedStatementstrat=null; publicExperDaoListImpl()throwsException{ super(); //TODOAuto-generatedconstructorstub } publicExperexper()throwsException{ //TODOAuto-generatedmethodstub returnnull; } publicvoidsaveandUpdate(intsid,inteid)throwsException{ //TODOAuto-generatedmethodstub } publicList<Exper>list(intpage,introws)throwsException{ Stringsql="select*fromexpertablesubmit"; returnsuper.list(sql,Exper.class,page,rows); } publiclongcount()throwsException{ return0; } publicDataGrid<Map<String,Object>>getexpsublist(Stringexperid,Stringcourid) throwsException{ //TODOAuto-generatedmethodstub DataGrid<Map<String,Object>>dg= newDataGrid<Map<String,Object>>(); //分頁信息 String_page=ServletActionContext.getRequest().getParameter("page"); intpage=Integer.parseInt(_page==null?"1":_page); String_rows=ServletActionContext.getRequest().getParameter("rows"); introws=Integer.parseInt(_rows==null?"20":_rows); Stringsql="select*fromexpertablesubmitwhereExperimentID='"+experid+"'andCourseID='"+ courid+"'"; //Stringsql="selectCourseID,CourseName,CourseTime,CoursePeriod,ExperimentNum,TeacherName,ClassNamefromexperclasstablewhereCourseTime='"+courseTime+"'andClassName='"+ //ServletActionContext.getRequest().getSession().getAttribute("userclassname")+"'"; System.out.println("==============sql==========="+sql); List<Map<String,Object>>datamap=super.listMapList(sql,page,rows); dg.setRows(datamap); StringcountSQL="selectcount(*)fromexpertablesubmitwhereExperimentID='"+experid+"'andCourseID='"+ courid+"'"; dg.setTotal(super.count(countSQL)); returndg; } publicbooleanaddfron(Stringexperid,Stringcourid,Stringstuid, floatTestscores)throwsException{ //TODOAuto-generatedmethodstub Stringsql="updateexpertablesubmitsetTestscore="+Testscores+"whereExperimentID='"+experid+"'andStudentID='"+stuid+"'andCourseID='"+courid+"'"; strat=conn.prepareStatement(sql); intn=strat.executeUpdate(); if(n>0){ returntrue; } returnfalse; }}packagecom.xzit.entity;publicclassUpfile{ privateStringfileName;//文獻(xiàn)名稱 privateStringfileStuClass;//課程班級(jí) privateStringfileCourDate;//年 privateStringfileCourName;//課程名稱 privateStringfileExperName;//實(shí)驗(yàn)名稱 publicStringgetFileName(){ returnfileName; } publicvoidsetFileName(StringfileName){ this.fileName=fileName; } publicStringgetFileStuClass(){ returnfileStuClass; } publicvoidsetFileStuClass(StringfileStuClass){ this.fileStuClass=fileStuClass; } publicStringgetFileCourDate(){ returnfileCourDate; } publicvoidsetFileCourDate(StringfileCourDate){ this.fileCourDate=fileCourDate; } publicStringgetFileCourName(){ returnfileCourName; } publicvoidsetFileCourName(StringfileCourName){ this.fileCourName=fileCourName; } publicStringgetFileExperName(){ returnfileExperName; } publicvoidsetFileExperName(StringfileExperName){ this.fileExperName=fileExperName; } }packagecom.xzit.dao.impl;importjava.sql.Connection;importjava.sql.PreparedStatement;importjava.sql.ResultSet;importjava.text.SimpleDateFormat;importjava.util.Date;importorg.apache.struts2.ServletActionContext;importcom.xzit.dao.IUpfileDao;importcom.xzit.entity.Upfile;importcom.xzit.util.DBConnection;publicclassUpfileDaoextendsBaseDao<Upfile>implementsIUpfileDao{ privateConnectionconn=newDBConnection().getConn(); privatePreparedStatementstrat=null; publicUpfileDao()throwsException{ super(); } publicUpfileQueryFileClass(Stringcourid)throwsException{ //TODOAuto-generatedmethodstub Stringsql="select*fromexperclasstablewhereCourseID='"+courid+"'"; strat=conn.prepareStatement(sql);ResultSetrs=strat.executeQuery();Upfilecontent=null;while(rs.next()){ content=newUpfile(); content.setFileCourDate(rs.getString("CourseTime")); content.setFileCourName(rs.getString("CourseName")); content.setFileStuClass(rs.getString("ClassName"));} returncontent; } publicStringSaveFileRoad(Stringexperid,Stringpath,Stringupfilename)throwsException{ //TODOAuto-generatedmethodstub SimpleDateFormatdf=newSimpleDateFormat("yyyy-MM-dd");//設(shè)立日期格式 Stringdatetime=df.format(newDate());//newDate()為獲取當(dāng)前系統(tǒng)時(shí)間 Stringsql="updateexpertablesubmitsetFileRoad='"+path+"',Status='是',UpfileDate='"+datetime +"',FileName='"+upfilename+"'whereExperimentID='"+experid+"'andStudentID='"+ServletActionContext.getRequest().getSession().getAttribute("userId")+"'"; strat=conn.prepareStatement(sql); intn=strat.executeUpdate(); if(n>0){ return"success"; } return"false"; } publicStringteaSaveFileRoad(Stringexperid,Stringpath,Stringcourid) throwsException{ //TODOAuto-generatedmethodstub Stringsql="updateexpercontenttablesetTempletfile='"+path+"'whereExperimentID='"+experid+"'andCourseID='"+courid+"'"; strat=conn.prepareStatement(sql); intn=strat.executeUpdate(); if(n>0){ return"success"; } return"false"; } }3.9教師模塊實(shí)現(xiàn)packagecom.xzit.entity;publicclassExperContent{ privateStringExperimentID; privateStringExperimentName; privateStringExperimentContent; privateintExperimentPeriod; privateStringTeacherName; privateStringTempletfile; publicStringgetExperimentID(){ returnExperimentID; } publicvoidsetExperimentID(StringexperimentID){ ExperimentID=experimentID; } publicStringgetExperimentName(){ returnExperimentName; } publicvoidsetExperimentName(StringexperimentName){ ExperimentName=experimentName; } publicStringgetExperimentContent(){ returnExperimentContent; } publicvoidsetExperimentContent(StringexperimentContent){ ExperimentContent=experimentContent; } publicintgetExperimentPeriod(){ returnExperimentPeriod; } publicvoidsetExperimentPeriod(intexperimentPeriod){ ExperimentPeriod=experimentPeriod; } publicStringgetTeacherName(){ returnTeacherName; } publicvoidsetTeacherName(StringteacherName){ TeacherName=teacherName; } publicStringgetTempletfile(){ returnTempletfile; } publicvoidsetTempletfile(Stringtempletfile){ Templetfile=templetfile; } publicExperContent(){ super(); } publicExperContent(StringexperimentID,StringexperimentName, StringexperimentContent,intexperimentPeriod,StringteacherName, Stringtempletfile){ super(); ExperimentID=experimentID; ExperimentName=experimentName; ExperimentContent=experimentContent; ExperimentPeriod=experimentPeriod; TeacherName=teacherName; Templetfile=templetfile; } }packagecom.xzit.entity;publicclassUpfile{ privateStringfileName;//文獻(xiàn)名稱 privateStringfileStuClass;//課程班級(jí) privateStringfileCourDate;//年 privateStringfileCourName;//課程名稱 privateStringfileExperName;//實(shí)驗(yàn)名稱 publicStringgetFileName(){ returnfileName; } publicvoidsetFileName(StringfileName){ this.fileName=fileName; } publicStringgetFileStuClass(){ returnfileStuClass; } publicvoidsetFileStuClass(StringfileStuClass){ this.fileStuClass=fileStuClass; } publicStringgetFileCourDate(){ returnfileCourDate; } publicvoidsetFileCourDate(StringfileCourDate){ this.fileCourDate=fileCourDate; } publicStringgetFileCourName(){ returnfileCourName; } publicvoidsetFileCourName(StringfileCourName){ this.fileCourName=fileCourName; } publicStringgetFileExperName(){ returnfileExperName; } publicvoidsetFileExperName(StringfileExperName){ this.fileExperName=fileExperName; } }packagecom.xzit.dao.impl;importjava.sql.Connection;importjava.sql.PreparedStatement;importjava.sql.ResultSet;importjava.text.SimpleDateFormat;importjava.util.Date;importorg.apache.struts2.ServletActionContext;importcom.xzit.dao.IUpfileDao;importcom.xzit.entity.Upfile;importcom.xzit.util.DBConnection;publicclassUpfileDaoextendsBaseDao<Upfile>implementsIUpfileDao{ privateConnectionconn=newDBConnection().getConn(); privatePreparedStatementstrat=null; publicUpfileDao()throwsException{ super(); } publicUpfileQueryFileClass(Stringcourid)throwsException{ //TODOAuto-generatedmethodstub Stringsql="select*fromexperclasstablewhereCourseID='"+courid+"'"; strat=conn.prepareStatement(sql);ResultSetrs=strat.executeQuery();Upfilecontent=null;while(rs.next()){ content=newUpfile(); content.setFileCourDate(rs.getString("CourseTime")); content.setFileCourName(rs.getString("CourseName")); content.setFileStuClass(rs.getString("ClassName"));} returncontent; } publicStringSaveFileRoad(Stringexperid,Stringpath,Stringupfilename)throwsException{ //TODOAuto-generatedmethodstub SimpleDateFormatdf=newSimpleDateFormat("yyyy-MM-dd");//設(shè)立日期格式 Stringdatetime=df.format(newDate());//newDate()為獲取當(dāng)前系統(tǒng)時(shí)間 Stringsql="updateexpertablesubmitsetFileRoad='"+path+"',Status='是',UpfileDate='"+datetime +"',FileName='"+upfilename+"'whereExperimentID='"+experid+"'andStudentID='"+ServletActionContext.getRequest().getSession().getAttribute("userId")+"'"; strat=conn.prepareStatement(sql); intn=strat.executeUpdate(); if(n>0){ return"success"; } return"false"; } publicStringteaSaveFileRoad(Stringexperid,Stringpath,Stringcourid) throwsException{ //TODOAuto-generatedmethodstub Stringsql="updateexpercontenttablesetTempletfile='"+path+"'whereExperimentID='"+experid+"'andCourseID='"+courid+"'"; strat=conn.prepareStatement(sql); intn=strat.executeUpdate(); if(n>0){ return"success"; } return"false"; } }packagecom.xzit.entity;publicclassExperclass{ privateintEid; privateStringcourseID; privateStringcourseName; privateStringcourseTime; privateStringcoursePeriod;//課程學(xué)時(shí) privateintexperimentNum; privateStringteacherName; privateStringclassName; publicExperclass(){ super(); } publicExperclass(inteid,StringcourseID,StringcourseName, StringcourseTime,intexperimentNum,StringteacherName, StringclassName){ super(); Eid=eid; this.courseID=courseID; this.courseName=courseName; this.courseTime=courseTime; this.experimentNum=experimentNum; this.teacherName=teacherName; this.className=className; } publicExperclass(inteid,StringcourseID,StringcourseName, StringcourseTime,StringcoursePeriod,intexperimentNum, StringteacherName,StringclassName){ super(); Eid=eid; this.courseID=courseID; this.courseName=courseName; this.courseTime=courseTime; this.coursePeriod=coursePeriod; this.experimentNum=experimentNum; this.teacherName=teacherName; this.className=className; } publicStringgetCoursePeriod(){ returncoursePeriod; } publicvoidsetCoursePeriod(StringcoursePeriod){ this.coursePeriod=coursePeriod; } publicStringgetCourseID(){ returncourseID; } publicvoidsetCourseID(StringcourseID){ this.courseID=courseID; } publicStringgetCourseName(){ returncourseName; } publicvoidsetCourseName(StringcourseName){ this.courseName=courseName; } publicStringgetCourseTime(){ returncourseTime; } publicvoidsetCourseTime(StringcourseTime){ this.courseTime=courseTime; } publicintgetExperimentNum(){ returnexperimentNum; } publicvoidsetExperimentNum(intexperimentNum){ this.experimentNum=experimentNum; } publicStringgetTeacherName(){ returnteacherName; } publicvoidsetTeacherName(StringteacherName){ this.teacherName=teacherName; } publicStringgetClassName(){ returnclassName; } publicvoidsetClassName(StringclassName){ this.className=className; } }packagecom.xzit.dao.impl;importjava.sql.Connection;importjava.sql.PreparedStatement;importjava.sql.ResultSet;importjava.util.ArrayList;importjava.util.HashMap;importjava.util.List;importjava.util.Map;importorg.apache.struts2.ServletActionContext;importcom.xzit.dao.ExperclassDao;importcom.xzit.entity.ExperContent;importcom.xzit.entity.Experclass;importcom.xzit.util.DBConnection;importcom.xzit.util.DataGrid;publicclassExperclassDaoimplextendsBaseDao<Experclass>implementsExperclassDao{ privateStringCourseTime; publicExperclassDaoimpl()throwsException{ //TODOAuto-generatedconstructorstub } privateConnectionconn=newDBConnection().getConn(); privatePreparedStatementstrat=null; publicDataGrid<Map<String,Object>>experclass(Stringcoursetime) throwsException{ DataGrid<Map<String,Object>>dg= newDataGrid<Map<String,Object>>(); //分頁信息 String_page=ServletActionContext.getRequest().getParameter("page

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論