版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
軟件項目設(shè)計報告實驗報告管理系統(tǒng)所在班級12計卓小構(gòu)成員江靈瞳印海平錢晨晨學院名稱信電工程學院專業(yè)名稱計算機科學與技術(shù)指引教師胡局新起止日期.12.16-.1.151月15日目錄1緒論 11.1開發(fā)背景 11.2本次設(shè)計完畢工作 11.3任務(wù)分工 11.4任務(wù) 12系統(tǒng)分析 22.1需求分析 22.2可行性分析 22.3用例圖 23系統(tǒng)設(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文獻夾組織構(gòu)造 63.8學生模塊實現(xiàn) 63.9教師模塊實現(xiàn) 19結(jié)論 351緒論1.1開發(fā)背景實驗教學是學生技能培養(yǎng)重要環(huán)節(jié)之一,學生實驗報告質(zhì)量在一定限度上反映了實驗教學質(zhì)量,實驗報告管理水平也反映了實驗教學管理水平。當前,大某些學校所提交實驗報告大多還停留在以紙為介質(zhì)方式上,這將嚴重制約著實驗教學開展。一方面,諸多課程實驗成果在紙質(zhì)實驗報告中不能體現(xiàn)或不能完全體現(xiàn),另一方面紙質(zhì)實驗報告批改和分析也是實驗授課教師一種很重承擔,如何提高學生實驗報告表象能力,提高教師批改實驗報告效率并及時發(fā)現(xiàn)和糾正實驗報告中存在問題是許多課程實驗授課教師所面對一種難題。1.2本次設(shè)計完畢工作教師登錄該系統(tǒng)可以上傳、下載實驗報告、查看學生做實驗報告并給學生打分、教師可以查看實驗驗課程、實驗課程列表、查看實驗提交狀況等。學生登錄該系統(tǒng)可以上傳、下載實驗報告、查看實驗課程和實驗課程列表。1.3任務(wù)分工組織構(gòu)造:為了完畢學生信息管理系統(tǒng)項目開發(fā),班級構(gòu)成了一種項目團隊,人員分工:為了明確項目團隊中每個人任務(wù)分工,現(xiàn)制定人員分工,如下表2.1所示:表2.1人員分工成員角色負責模塊內(nèi)容A江靈瞳學生上傳,下載,學生查看實驗課程,查看實驗列表B印海平教師上傳,下載,和教師填寫分數(shù),數(shù)據(jù)庫設(shè)計C錢晨晨教師查看實驗課程,查看實驗列表,查看實驗上交狀況,登錄1.4任務(wù)咱們?nèi)齻€人各自分工完畢自己模塊內(nèi)容,一方面,江靈瞳構(gòu)造整個系統(tǒng)框架,然后印海平設(shè)計數(shù)據(jù)庫,在咱們一起先設(shè)計前臺界面,之后咱們就各自實現(xiàn)各自模塊功能。
2系統(tǒng)分析2.1需求分析1)實驗課程設(shè)立,設(shè)立課程編號、課程名、時間、次數(shù)、教師編號、教師名、實驗班級;2)實驗列表設(shè)立,設(shè)立實驗編號、實驗名、班級、學生學號、學生名、教師名、實驗途徑、提交狀態(tài)、分數(shù);3)樹型類別設(shè)立,設(shè)立編號、名字、途徑、學生名、教師名、樹狀態(tài)。2.2可行性分析2.2.1引言編寫目:背景:徐州工程學院是一所培養(yǎng)應(yīng)用型人才普通高等學院。為了完善管理學校實驗報告太多沒有地方保存了,經(jīng)決定開發(fā)實驗報告管理系統(tǒng)。2.2.2可行性研究前提規(guī)定:實驗報告系統(tǒng)必要提供學生信息和教師信息基本設(shè)立;提供強大條件搜索功能個實驗課程查詢、實驗列表浮現(xiàn)等管理功能;可以分不同權(quán)限、不同顧客對該系統(tǒng)進行操作。此外,該系統(tǒng)還必要保證數(shù)據(jù)安全性、完整性和精確性。目的:實驗報告管理系統(tǒng)目的是實現(xiàn)學生紙質(zhì)實驗報告太多沒有地方長期保存,這樣用一種系統(tǒng)可以將一種課程所有學生實驗報告進行管理以便存儲。條件、假定和限制:時間限制,咱們必要在兩周時間里完畢項目,在這期間系統(tǒng)分析員需要整頓好分析成果,分派各成員任務(wù),每天需要人員跟蹤記錄整頓文檔。程序開發(fā)人員須在5天時間里進行系統(tǒng)設(shè)計、程序編碼、系統(tǒng)測試、程序調(diào)試。期間,還涉及一種雙休日假期。2.2.3結(jié)論依照上面分析,在技術(shù)上不會存在什么問題,因而項目延期也許性很小。只要在分派時間里都能順利地完畢任務(wù),再加上團隊凝聚力齊心合力,相信在這兩周內(nèi)會獲得一種滿意成果。2.3用例圖圖2.1用例圖
3系統(tǒng)設(shè)計與實現(xiàn)3.1系統(tǒng)目的依照需求分析描述以及與組建成員溝通,現(xiàn)制定系統(tǒng)實現(xiàn)目的如下:a.界面設(shè)計簡潔、和諧、美觀大方。b.操作簡樸、快捷以便。c.數(shù)據(jù)存儲安全、可靠。d.信息分類清晰、精確。e.強大查詢功能,保證數(shù)據(jù)查詢靈活性。f.為管理員提供真實數(shù)據(jù)信息。g.對顧客輸入數(shù)據(jù),系統(tǒng)進行嚴格數(shù)據(jù)檢查,盡量排除以為錯誤。3.2系統(tǒng)功能構(gòu)造圖3.1系統(tǒng)功能構(gòu)造3.3功能流程及工作流程學生模塊:a.查看實驗課程系統(tǒng)操作人員打開學生模塊主界面,輸入有關(guān)信息(學號、密碼)進入模塊,點擊年按鈕就可以看到所需要信息。b.查看實驗列表系統(tǒng)操作人員打開學生模塊主界面,輸入有關(guān)信息進入模塊,點擊課程就可以看到所要信息。c.下載實驗報告模板當該學生進入自己界面時,找到要做實驗報告課程,點擊下載按鈕。d.上傳實驗報告當學生做完實驗報告后,進入系統(tǒng),點擊上傳按鈕。教師模塊:a.查看實驗課程系統(tǒng)操作人員打開學生模塊主界面,輸入有關(guān)信息(工號、密碼)進入模塊,點擊年按鈕就可以看到所需要信息。b.查看實驗列表系統(tǒng)操作人員打開教師模塊主界面,輸入有關(guān)信息進入模塊,點擊課程就可以看到所要信息c.查看提交狀況教師進入教師界面,點擊自己教課程,點擊查看按鈕。d.上傳實驗報告模板當該教師進入自己界面時,找到要做實驗報告課程實驗名稱,點擊上傳按鈕。e.下載學生實驗當該教師進入自己界面時,找到實驗列表詳情,點擊下載按鈕。f.打分當該教師進入自己界面時,下載學生實驗報告看完后,在實驗列表詳情中點擊打分按鈕。3.4系統(tǒng)流程圖圖3.2系統(tǒng)流程圖3.5構(gòu)建開發(fā)環(huán)境a.操作系統(tǒng):windows7或XPb.java開發(fā)包:JDK1.6c.數(shù)據(jù)庫:MYSQLd.辨別率:最佳效果為1024*768像素3.7文獻夾組織構(gòu)造圖3.7文獻夾組織構(gòu)造3.8學生模塊實現(xiàn)packagecom.xzit.entity;publicclassExperclass{ privateintEid; privateStringcourseID; privateStringcourseName; privateStringcourseTime; privateStringcoursePeriod;//課程學時 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計卓'"; 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計卓'"; 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計卓'"; 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;//文獻名稱 privateStringfileStuClass;//課程班級 privateStringfileCourDate;//年 privateStringfileCourName;//課程名稱 privateStringfileExperName;//實驗名稱 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()為獲取當前系統(tǒng)時間 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教師模塊實現(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;//文獻名稱 privateStringfileStuClass;//課程班級 privateStringfileCourDate;//年 privateStringfileCourName;//課程名稱 privateStringfileExperName;//實驗名稱 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()為獲取當前系統(tǒng)時間 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;//課程學時 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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 廣東警官學院《導(dǎo)演學》2023-2024學年第一學期期末試卷
- 廣東環(huán)境保護工程職業(yè)學院《工程熱力學D》2023-2024學年第一學期期末試卷
- 廣東第二師范學院《糧食質(zhì)量安全與控制實驗》2023-2024學年第一學期期末試卷
- 廣東財貿(mào)職業(yè)學院《社會工作專業(yè)英語》2023-2024學年第一學期期末試卷
- 贛南科技學院《大氣污染控制》2023-2024學年第一學期期末試卷
- 贛東學院《創(chuàng)新創(chuàng)業(yè)教育》2023-2024學年第一學期期末試卷
- 三年級品德與社會下冊第三單元第一課我們的生活需要誰教案新人教版
- 三年級數(shù)學上冊8分數(shù)的初步認識1分數(shù)的初步認識第1課時幾分之一導(dǎo)學案新人教版
- 三年級數(shù)學上冊二千克和克第2課時克的認識教案蘇教版
- 三年級數(shù)學下冊五面積第1課時什么是面積教案北師大版
- 民用無人駕駛航空器產(chǎn)品標識要求
- 2025年上半年河南省西峽縣部分事業(yè)單位招考易考易錯模擬試題(共500題)試卷后附參考答案-1
- 深交所創(chuàng)業(yè)板注冊制發(fā)行上市審核動態(tài)(2020-2022)
- 手術(shù)室護理組長競聘
- 電力系統(tǒng)繼電保護試題以及答案(二)
- 小學生防打架斗毆安全教育
- 2024年醫(yī)院產(chǎn)科工作計劃例文(4篇)
- 2024-2025學年九年級英語上學期期末真題復(fù)習 專題09 單詞拼寫(安徽專用)
- 網(wǎng)絡(luò)運營代銷合同范例
- 2024年全國統(tǒng)一高考英語試卷(新課標Ⅰ卷)含答案
- 中國音樂史與名作賞析智慧樹知到期末考試答案章節(jié)答案2024年山東師范大學
評論
0/150
提交評論