温馨宠物之家管理系统

24
温温温温温温温温温温温温温温温温温温孔孔孔孔孔 孔孔孔孔孔 [email protected] [email protected]

Upload: kendall-jefferson

Post on 03-Jan-2016

50 views

Category:

Documents


0 download

DESCRIPTION

温馨宠物之家管理系统. 孔令坤制作 [email protected]. 项目简介. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 温馨宠物之家管理系统

温馨宠物之家管理系统 温馨宠物之家管理系统

孔令坤制作 孔令坤制作 [email protected]@126.com

Page 2: 温馨宠物之家管理系统

22

项目简介项目简介

应温馨宠物之家的邀请,我公司特为此开发一套宠应温馨宠物之家的邀请,我公司特为此开发一套宠物医院管理系统。来维护贵公司宝贵的客户资源物医院管理系统。来维护贵公司宝贵的客户资源该项目采用该项目采用 B/SB/S 结构。采用当前最先进结构。采用当前最先进 MVCMVC 开发开发模式开发,使用当前最流行的模式开发,使用当前最流行的 javajava 语言,结合了语言,结合了jspjsp 技术,技术, servletservlet 技术,技术, SQLSQL 技术,技术, javascripejavascripett 技术,技术, HTMLHTML 等当前主流技术。严格遵循了等当前主流技术。严格遵循了 MVMVCC 开发流程。该项目在安全性,扩展性,可维护开发流程。该项目在安全性,扩展性,可维护性方面占了很大优势。是一个较为完美的项目。性方面占了很大优势。是一个较为完美的项目。

Page 3: 温馨宠物之家管理系统

33

项目简介 项目简介

该项目共有该项目共有 1111 个用例个用例0101 登录 登录 0202 退出退出0303 浏览兽医信息及专长 浏览兽医信息及专长 0404 浏览宠物主人信息浏览宠物主人信息0505 浏览宠物信息 浏览宠物信息 0606 添加宠物主人添加宠物主人0707 添加宠物 添加宠物 0808 修改宠物信息修改宠物信息0909 修改宠物主人信息 修改宠物主人信息 1010 添加病例添加病例1111 浏览病例浏览病例

Page 4: 温馨宠物之家管理系统

44

项目的基本结构项目的基本结构

Page 5: 温馨宠物之家管理系统

55

项目活动图项目活动图

Page 6: 温馨宠物之家管理系统

66

项目项目 E-RE-R 图图

用户名ID

密码

医院员工

宠物 ID

宠物主人

姓名

住址

电话

注册时间

兽 医 兽医 ID

兽医姓名

电话

备 注 ( 奖励)

宠 物

ID 昵称 种类号

主 人 ID

出生日期

病 例

病历编号

宠物编号

看病时间

诊断情况

医生 ID

属于

属于1 M

MN

NM

诊治

兽医专业列表

专业

专业号 专业名

专业号 兽 医号

种 类

属于种类号

种类名

1M

看病次数

Page 7: 温馨宠物之家管理系统

77

项目使用技术简介项目使用技术简介

• 1. servlet1. servlet• 2. jsp2. jsp• 3. javascript3. javascript• 4. SQL4. SQL• 5. EL5. EL• 6. JSTL6. JSTL

Page 8: 温馨宠物之家管理系统

88

项目的类图项目的类图

Page 9: 温馨宠物之家管理系统

99

好的技术模块好的技术模块• public ArrayList findCuromer() {public ArrayList findCuromer() {• Connection conn = null;Connection conn = null;

• PreparedStatement ps = null;PreparedStatement ps = null;• ResultSet rs = null;ResultSet rs = null;• ArrayList curomerList = new ArrayList();ArrayList curomerList = new ArrayList();• try {try {• conn = ConnectBean.getConnection();conn = ConnectBean.getConnection();• ps = conn.prepareStatement("select * from curomer ");ps = conn.prepareStatement("select * from curomer ");

• rs = ps.executeQuery();rs = ps.executeQuery();• while (rs.next()) {while (rs.next()) {• CuromerInfo curomerInfo = new CuromerInfo();CuromerInfo curomerInfo = new CuromerInfo();• int num = rs.getInt(1);int num = rs.getInt(1);• curomerInfo.setCuromerId(num + "");curomerInfo.setCuromerId(num + "");• curomerInfo.setCuromerName(rs.getString(2));curomerInfo.setCuromerName(rs.getString(2));• curomerInfo.setCuromerAddress(rs.getString(3));curomerInfo.setCuromerAddress(rs.getString(3));

• curomerInfo.setCuromerTel(rs.getString(4));curomerInfo.setCuromerTel(rs.getString(4));• curomerInfo.setCuromerEmail(rs.getString(5));curomerInfo.setCuromerEmail(rs.getString(5));• long times = rs.getTimestamp(6).getTime();long times = rs.getTimestamp(6).getTime();• curomerInfo.setStringTime(times);curomerInfo.setStringTime(times);• PetBo petBo = new PetBo();PetBo petBo = new PetBo();• curomerInfo.setPetInfo(petBo.findByCuromerId(num));curomerInfo.setPetInfo(petBo.findByCuromerId(num));• curomerList.add(curomerInfo);curomerList.add(curomerInfo);

• }}• } catch (SQLException e) {} catch (SQLException e) {• System.out.println(e.toString());System.out.println(e.toString());• } catch (Exception e) {} catch (Exception e) {• System.out.println(e.toString());System.out.println(e.toString());• } finally {} finally {• try {try {• if (conn != null)if (conn != null)• conn.close();conn.close();• } catch (SQLException e) {} catch (SQLException e) {

• e.printStackTrace();e.printStackTrace();• }}• }}

• return curomerList;return curomerList;

• }}

Page 10: 温馨宠物之家管理系统

1010

好的技术模块好的技术模块• conn = ConnectBean.getConnection();conn = ConnectBean.getConnection();• if(!petName.trim().equals("") && !(kindId.trim().equals(""))){if(!petName.trim().equals("") && !(kindId.trim().equals(""))){• ps = conn.prepareStatement(" select * from view_vetTable where petNameps = conn.prepareStatement(" select * from view_vetTable where petName

=? and kindId=?");=? and kindId=?");• int tmp = Integer.parseInt(kindId);int tmp = Integer.parseInt(kindId);• ps.setString(1,petName);ps.setString(1,petName);• ps.setInt(2,tmp);ps.setInt(2,tmp);• }else if(!petName.trim().equals("") && (kindId.trim().equals(""))){}else if(!petName.trim().equals("") && (kindId.trim().equals(""))){• ps = conn.prepareStatement(" select * from view_vetTable where petNaps = conn.prepareStatement(" select * from view_vetTable where petNa

me=? ");me=? ");• ps.setString(1,petName);ps.setString(1,petName);• }else if(petName.trim().equals("") && !(kindId.trim().equals(""))){}else if(petName.trim().equals("") && !(kindId.trim().equals(""))){• ps = conn.prepareStatement("select * from view_vetTable where kindId=? ps = conn.prepareStatement("select * from view_vetTable where kindId=?

");");• int tmp=Integer.parseInt(kindId);int tmp=Integer.parseInt(kindId);• ps.setInt(1,tmp);ps.setInt(1,tmp);• }}• rs = ps.executeQuery();rs = ps.executeQuery();

Page 11: 温馨宠物之家管理系统

1111

好的技术模块好的技术模块• function verifyvetName2(form,eId){function verifyvetName2(form,eId){•• var msg="";var msg="";•• if(form.vetId[0].selected){if(form.vetId[0].selected){• msg = "msg = " 请选择兽医请选择兽医 ";";• showErrorMsg(eId,msg);showErrorMsg(eId,msg);• return false;return false;• }else{}else{• clearMsg(eId);clearMsg(eId);• return(true);return(true);•• }}• }}

Page 12: 温馨宠物之家管理系统

1212

好的技术模块好的技术模块function getName(form){function getName(form){    var petId=form.cromerName.value;var petId=form.cromerName.value;     for(var i=0;i<form.curomerId.length;i++){for(var i=0;i<form.curomerId.length;i++){         if(petId == form.curomerId[i].value){if(petId == form.curomerId[i].value){              form.curomerId[i].selected=true;form.curomerId[i].selected=true;                      break;break;                      }}         else{else{             form.curomerId[0].selected=true;form.curomerId[0].selected=true;             }}         }}         if(form.curomerId[0].selected){if(form.curomerId[0].selected){             alert( "alert( " 你输入的宠物主人你输入的宠物主人 IDID 不存在不存在 ");");                form.cromerName.value=""form.cromerName.value=""          }}   }}

Page 13: 温馨宠物之家管理系统

1313

function showMedInfo(){function showMedInfo(){form1.actionId.value="viewMed";form1.actionId.value="viewMed";form1.action="/klk/servlet/MedicalServlet";form1.action="/klk/servlet/MedicalServlet";form1.submit();form1.submit();}}function addInfo(){function addInfo(){form1.actionId.value="add";form1.actionId.value="add";form1.action="/klk/servlet/MedicalServlet";form1.action="/klk/servlet/MedicalServlet";form1.submit();form1.submit();}}function updateInfo(){function updateInfo(){form1.actionId.value="update";form1.actionId.value="update";form1.action="/klk/servlet/PetServlet";form1.action="/klk/servlet/PetServlet";form1.submit();form1.submit();}}function showInfo(){function showInfo(){form1.actionId.value="show";form1.actionId.value="show";form1.action="/klk/servlet/PetServlet";form1.action="/klk/servlet/PetServlet";form1.submit();form1.submit();}}

Page 14: 温馨宠物之家管理系统

1414

好的技术模块好的技术模块 <c:if test="${fn:length(petInfo)!= 0}" ><c:if test="${fn:length(petInfo)!= 0}" > <c:forEach items="${petInfo}" var="petInfo"><c:forEach items="${petInfo}" var="petInfo"><tr><tr><td height="57"><label><td height="57"><label> <input name="petId" type="radio" value="${petInfo.petId}" checked="checked" /><input name="petId" type="radio" value="${petInfo.petId}" checked="checked" /> </label></label> <label></label></td><label></label></td><td height="57">${petInfo.petName} &nbsp;</td><td height="57">${petInfo.petName} &nbsp;</td><td>${petInfo.kindInfo.kindName} &nbsp;</td><td>${petInfo.kindInfo.kindName} &nbsp;</td><td>${petInfo.stringDate} &nbsp;</td><td>${petInfo.stringDate} &nbsp;</td><td>${petInfo.curomerInfo.curomerName} &nbsp;</td><td>${petInfo.curomerInfo.curomerName} &nbsp;</td> </tr></tr></c:forEach></c:forEach></c:if></c:if><c:if test="${fn:length(petInfo) == 0}" ><c:if test="${fn:length(petInfo) == 0}" ><tr><td colspan="5"> <div align="center"><span class="STYLE5"><tr><td colspan="5"> <div align="center"><span class="STYLE5"> 你要的信息未找到你要的信息未找到 </span></span>

</div></td></div></td> </tr></tr></table></table></c:if> </c:if>

Page 15: 温馨宠物之家管理系统

1515

登陆界面登陆界面

Page 16: 温馨宠物之家管理系统

1616

项目主界面项目主界面

Page 17: 温馨宠物之家管理系统

1717

浏览兽医界面 浏览兽医界面 

Page 18: 温馨宠物之家管理系统

1818

浏览客户界面 浏览客户界面 

Page 19: 温馨宠物之家管理系统

1919

浏览宠物信息 浏览宠物信息 

Page 20: 温馨宠物之家管理系统

2020

添加宠物病历 添加宠物病历 

Page 21: 温馨宠物之家管理系统

2121

更新宠物信息更新宠物信息

Page 22: 温馨宠物之家管理系统

2222

添加宠物主人界面 添加宠物主人界面 

Page 23: 温馨宠物之家管理系统

2323

添加宠物信息添加宠物信息

Page 24: 温馨宠物之家管理系统

2424

心得体会心得体会 通过这次项目开发,让我对MVC模式有了正确的认识。也充分体会通过这次项目开发,让我对MVC模式有了正确的认识。也充分体会

到了MVC模式开发项目带来的巨大优势。 到了MVC模式开发项目带来的巨大优势。 在项目分析阶段,学会了全面的分析项目,对项目的开发流程有了完整在项目分析阶段,学会了全面的分析项目,对项目的开发流程有了完整认识。学会使用开发工具画用例图,活动图。 认识。学会使用开发工具画用例图,活动图。

在项目设计阶段,学会了数据库设计,学会了类设计。对数据库中表之在项目设计阶段,学会了数据库设计,学会了类设计。对数据库中表之间的关系有了全新的认识。 学会设计类与类之间的关系。间的关系有了全新的认识。 学会设计类与类之间的关系。

在项目编码阶段,充分体会到了在项目编码阶段,充分体会到了 MVC MVC 带来的好处。对今后的项目的开带来的好处。对今后的项目的开发积累了宝贵经验。 发积累了宝贵经验。

很感谢中心能给我们提供了这么好的机会。对前面学的知识进一步提很感谢中心能给我们提供了这么好的机会。对前面学的知识进一步提高。 也对自己有了更全面的认识。 为今后的学习生活积累了宝贵的高。 也对自己有了更全面的认识。 为今后的学习生活积累了宝贵的经验 经验 ..

在此也十分感谢我们的杨老师在此也十分感谢我们的杨老师 ,, 全老师全老师 ..他们给了我很大的帮助他们给了我很大的帮助 ..谢谢老谢谢老师师 !!