实验报告管理系统报告样本_第1页
实验报告管理系统报告样本_第2页
实验报告管理系统报告样本_第3页
实验报告管理系统报告样本_第4页
实验报告管理系统报告样本_第5页
已阅读5页,还剩50页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

软件项目设计报告实验报告管理系统所在班级12计卓小构成员江灵瞳印海平钱晨晨学院名称信电工程学院专业名称计算机科学与技术指引教师胡局新起止日期.12.16-.1.151月15日目录1绪论 11.1开发背景 11.2本次设计完毕工作 11.3任务分工 11.4任务 12系统分析 22.1需求分析 22.2可行性分析 22.3用例图 23系统设计与实现 43.1系统目的 43.2系统功能构造 43.3功能流程及工作流程 43.4系统流程图 53.5构建开发环境 53.7文献夹组织构造 63.8学生模块实现 63.9教师模块实现 19结论 351绪论1.1开发背景实验教学是学生技能培养重要环节之一,学生实验报告质量在一定限度上反映了实验教学质量,实验报告管理水平也反映了实验教学管理水平。当前,大某些学校所提交实验报告大多还停留在以纸为介质方式上,这将严重制约着实验教学开展。一方面,诸多课程实验成果在纸质实验报告中不能体现或不能完全体现,另一方面纸质实验报告批改和分析也是实验授课教师一种很重承担,如何提高学生实验报告表象能力,提高教师批改实验报告效率并及时发现和纠正实验报告中存在问题是许多课程实验授课教师所面对一种难题。1.2本次设计完毕工作教师登录该系统可以上传、下载实验报告、查看学生做实验报告并给学生打分、教师可以查看实验验课程、实验课程列表、查看实验提交状况等。学生登录该系统可以上传、下载实验报告、查看实验课程和实验课程列表。1.3任务分工组织构造:为了完毕学生信息管理系统项目开发,班级构成了一种项目团队,人员分工:为了明确项目团队中每个人任务分工,现制定人员分工,如下表2.1所示:表2.1人员分工成员角色负责模块内容A江灵瞳学生上传,下载,学生查看实验课程,查看实验列表B印海平教师上传,下载,和教师填写分数,数据库设计C钱晨晨教师查看实验课程,查看实验列表,查看实验上交状况,登录1.4任务咱们三个人各自分工完毕自己模块内容,一方面,江灵瞳构造整个系统框架,然后印海平设计数据库,在咱们一起先设计前台界面,之后咱们就各自实现各自模块功能。

2系统分析2.1需求分析1)实验课程设立,设立课程编号、课程名、时间、次数、教师编号、教师名、实验班级;2)实验列表设立,设立实验编号、实验名、班级、学生学号、学生名、教师名、实验途径、提交状态、分数;3)树型类别设立,设立编号、名字、途径、学生名、教师名、树状态。2.2可行性分析2.2.1引言编写目:背景:徐州工程学院是一所培养应用型人才普通高等学院。为了完善管理学校实验报告太多没有地方保存了,经决定开发实验报告管理系统。2.2.2可行性研究前提规定:实验报告系统必要提供学生信息和教师信息基本设立;提供强大条件搜索功能个实验课程查询、实验列表浮现等管理功能;可以分不同权限、不同顾客对该系统进行操作。此外,该系统还必要保证数据安全性、完整性和精确性。目的:实验报告管理系统目的是实现学生纸质实验报告太多没有地方长期保存,这样用一种系统可以将一种课程所有学生实验报告进行管理以便存储。条件、假定和限制:时间限制,咱们必要在两周时间里完毕项目,在这期间系统分析员需要整顿好分析成果,分派各成员任务,每天需要人员跟踪记录整顿文档。程序开发人员须在5天时间里进行系统设计、程序编码、系统测试、程序调试。期间,还涉及一种双休日假期。2.2.3结论依照上面分析,在技术上不会存在什么问题,因而项目延期也许性很小。只要在分派时间里都能顺利地完毕任务,再加上团队凝聚力齐心合力,相信在这两周内会获得一种满意成果。2.3用例图图2.1用例图

3系统设计与实现3.1系统目的依照需求分析描述以及与组建成员沟通,现制定系统实现目的如下:a.界面设计简洁、和谐、美观大方。b.操作简朴、快捷以便。c.数据存储安全、可靠。d.信息分类清晰、精确。e.强大查询功能,保证数据查询灵活性。f.为管理员提供真实数据信息。g.对顾客输入数据,系统进行严格数据检查,尽量排除以为错误。3.2系统功能构造图3.1系统功能构造3.3功能流程及工作流程学生模块:a.查看实验课程系统操作人员打开学生模块主界面,输入有关信息(学号、密码)进入模块,点击年按钮就可以看到所需要信息。b.查看实验列表系统操作人员打开学生模块主界面,输入有关信息进入模块,点击课程就可以看到所要信息。c.下载实验报告模板当该学生进入自己界面时,找到要做实验报告课程,点击下载按钮。d.上传实验报告当学生做完实验报告后,进入系统,点击上传按钮。教师模块:a.查看实验课程系统操作人员打开学生模块主界面,输入有关信息(工号、密码)进入模块,点击年按钮就可以看到所需要信息。b.查看实验列表系统操作人员打开教师模块主界面,输入有关信息进入模块,点击课程就可以看到所要信息c.查看提交状况教师进入教师界面,点击自己教课程,点击查看按钮。d.上传实验报告模板当该教师进入自己界面时,找到要做实验报告课程实验名称,点击上传按钮。e.下载学生实验当该教师进入自己界面时,找到实验列表详情,点击下载按钮。f.打分当该教师进入自己界面时,下载学生实验报告看完后,在实验列表详情中点击打分按钮。3.4系统流程图图3.2系统流程图3.5构建开发环境a.操作系统:windows7或XPb.java开发包:JDK1.6c.数据库:MYSQLd.辨别率:最佳效果为1024*768像素3.7文献夹组织构造图3.7文献夹组织构造3.8学生模块实现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");//设立日期格式 Stringdatetime=df.format(newDate());//newDate()为获取当前系统时间 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教师模块实现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");//设立日期格式 Stringdatetime=df.format(newDate());//newDate()为获取当前系统时间 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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论