├── web ├── WEB-INF │ ├── classes │ │ ├── META-INF │ │ │ └── 宠物系统.kotlin_module │ │ └── c3p0-config.xml │ └── web.xml ├── static │ ├── img │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── code.bmp │ │ ├── logo.png │ │ ├── default.jpg │ │ └── pwd-icons-new.png │ └── css │ │ └── style.css ├── dir │ ├── base.jsp │ └── a1.jsp ├── pages │ ├── user │ │ ├── login_success.jsp │ │ ├── regist_success.jsp │ │ ├── login.jsp │ │ └── regist.jsp │ ├── mandp │ │ ├── mapindex.jsp │ │ ├── addmaster.jsp │ │ ├── inquiremap.jsp │ │ ├── inquireres.jsp │ │ ├── addpet.jsp │ │ └── updateCus.jsp │ └── amdoctor │ │ ├── anindex.jsp │ │ ├── inquireDor.jsp │ │ ├── aminfor.jsp │ │ └── addamdor.jsp └── index.jsp ├── out └── artifacts │ └── _war_exploded │ ├── WEB-INF │ ├── classes │ │ ├── META-INF │ │ │ └── 宠物系统.kotlin_module │ │ └── c3p0-config.xml │ └── web.xml │ ├── static │ ├── img │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── code.bmp │ │ ├── logo.png │ │ ├── default.jpg │ │ └── pwd-icons-new.png │ └── css │ │ └── style.css │ ├── dir │ ├── base.jsp │ └── a1.jsp │ ├── pages │ ├── user │ │ ├── login_success.jsp │ │ ├── regist_success.jsp │ │ ├── login.jsp │ │ └── regist.jsp │ ├── mandp │ │ ├── mapindex.jsp │ │ ├── addmaster.jsp │ │ ├── inquiremap.jsp │ │ ├── inquireres.jsp │ │ ├── addpet.jsp │ │ └── updateCus.jsp │ └── amdoctor │ │ ├── anindex.jsp │ │ ├── inquireDor.jsp │ │ ├── aminfor.jsp │ │ └── addamdor.jsp │ └── index.jsp ├── src ├── dao │ ├── UserDao.java │ ├── MrecordsDao.java │ ├── UserDaoimpl.java │ ├── DoctorDao.java │ ├── CustomerDao.java │ ├── MrecordsDaoimpl.java │ ├── PetDao.java │ ├── DoctorDaoimpl.java │ ├── CustomerDaoimpl.java │ ├── PetDaoimpl.java │ └── BaseDao.java ├── service │ ├── UserService.java │ ├── MrecordsService.java │ ├── UserServiceimpl.java │ ├── MrecordsServiceimpl.java │ ├── DoctorService.java │ ├── CustomerService.java │ ├── PetService.java │ ├── DoctorServiceimpl.java │ ├── CustomerServiceimpl.java │ └── PetServiceimpl.java ├── test │ ├── JDBCUtisTest.java │ ├── MrecordsTest.java │ ├── UserDaoTest.java │ ├── DoctorTest.java │ └── PetTest.java ├── utils │ ├── JDBCUtils.java │ └── webUtils.java ├── c3p0-config.xml ├── servlet │ ├── baseServlet.java │ ├── CustomerServlet.java │ ├── MrecordsServlet.java │ ├── DoctorServlet.java │ ├── userServlet.java │ └── PetServlet.java └── bean │ ├── User.java │ ├── doctor.java │ ├── pet.java │ ├── customer.java │ └── mrecords.java ├── .idea ├── .gitignore ├── modules.xml ├── misc.xml ├── libraries │ └── lib.xml ├── inspectionProfiles │ └── Project_Default.xml └── artifacts │ └── _war_exploded.xml ├── .gitignore ├── README.md ├── 宠物系统.iml └── cw.sql /web/WEB-INF/classes/META-INF/宠物系统.kotlin_module: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/WEB-INF/classes/META-INF/宠物系统.kotlin_module: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /web/static/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/web/static/img/1.jpg -------------------------------------------------------------------------------- /web/static/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/web/static/img/2.jpg -------------------------------------------------------------------------------- /web/static/img/code.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/web/static/img/code.bmp -------------------------------------------------------------------------------- /web/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/web/static/img/logo.png -------------------------------------------------------------------------------- /web/static/img/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/web/static/img/default.jpg -------------------------------------------------------------------------------- /web/static/img/pwd-icons-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/web/static/img/pwd-icons-new.png -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/out/artifacts/_war_exploded/static/img/1.jpg -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/out/artifacts/_war_exploded/static/img/2.jpg -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/img/code.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/out/artifacts/_war_exploded/static/img/code.bmp -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/out/artifacts/_war_exploded/static/img/logo.png -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/img/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/out/artifacts/_war_exploded/static/img/default.jpg -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/img/pwd-icons-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoYu-zc/Pet_hospital/HEAD/out/artifacts/_war_exploded/static/img/pwd-icons-new.png -------------------------------------------------------------------------------- /src/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.User; 4 | 5 | public interface UserDao { 6 | public User getUserandPassword(User user); 7 | public boolean registUser(User user); 8 | } 9 | -------------------------------------------------------------------------------- /src/service/UserService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.User; 4 | 5 | public interface UserService { 6 | 7 | public User login(User user); 8 | public boolean regist(User user); 9 | } 10 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/libraries/lib.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/dir/base.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/dir/base.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /src/test/JDBCUtisTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.junit.Test; 4 | 5 | import utils.JDBCUtils; 6 | 7 | import java.sql.Connection; 8 | 9 | public class JDBCUtisTest { 10 | @Test 11 | public void rescon(){ 12 | Connection connection = JDBCUtils.getConnection(); 13 | System.out.println(connection); 14 | JDBCUtils.resconn(connection); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/dao/MrecordsDao.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.mrecords; 4 | 5 | import java.util.List; 6 | 7 | public interface MrecordsDao { 8 | /** 9 | * 通过宠物姓名获得病历 10 | * @param name 11 | * @return 12 | */ 13 | public List getrecords(String name); 14 | 15 | /** 16 | * 添加新病历 17 | * @param mrecords 18 | * @return 19 | */ 20 | public boolean AddMrecords(mrecords mrecords); 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/service/MrecordsService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.mrecords; 4 | 5 | import java.util.List; 6 | 7 | public interface MrecordsService { 8 | 9 | /** 10 | * 通过宠物姓名获得病历 11 | * @param name 12 | * @return 13 | */ 14 | public List getrecords(String name); 15 | 16 | /** 17 | * 添加新病历 18 | * @param mrecords 19 | * @return 20 | */ 21 | public boolean AddMrecords(mrecords mrecords); 22 | } 23 | -------------------------------------------------------------------------------- /src/service/UserServiceimpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.User; 4 | import dao.UserDao; 5 | import dao.UserDaoimpl; 6 | 7 | public class UserServiceimpl implements UserService { 8 | UserDao ud = new UserDaoimpl(); 9 | @Override 10 | public User login(User user) { 11 | 12 | return ud.getUserandPassword(user); 13 | } 14 | 15 | @Override 16 | public boolean regist(User user) { 17 | boolean b = ud.registUser(user); 18 | return b; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/test/MrecordsTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import bean.mrecords; 4 | import dao.MrecordsDao; 5 | import dao.MrecordsDaoimpl; 6 | import org.junit.Test; 7 | 8 | import java.util.List; 9 | 10 | public class MrecordsTest { 11 | 12 | @Test 13 | public void Test(){ 14 | MrecordsDao mrecordsDao = new MrecordsDaoimpl(); 15 | List getrecords = mrecordsDao.getrecords("1"); 16 | for (mrecords mre:getrecords 17 | ) { 18 | System.out.println(mre); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/service/MrecordsServiceimpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.mrecords; 4 | import dao.MrecordsDao; 5 | import dao.MrecordsDaoimpl; 6 | 7 | import java.util.List; 8 | 9 | public class MrecordsServiceimpl implements MrecordsService { 10 | MrecordsDao mrecordsDao = new MrecordsDaoimpl(); 11 | @Override 12 | public List getrecords(String name) { 13 | return mrecordsDao.getrecords(name); 14 | } 15 | 16 | @Override 17 | public boolean AddMrecords(mrecords mrecords) { 18 | boolean b = mrecordsDao.AddMrecords(mrecords); 19 | return b; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/test/UserDaoTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import bean.User; 4 | import dao.UserDao; 5 | import dao.UserDaoimpl; 6 | import org.junit.Test; 7 | 8 | 9 | public class UserDaoTest { 10 | @Test 11 | public void test(){ 12 | UserDao ud=new UserDaoimpl(); 13 | User user = ud.getUserandPassword(new User(null, "tomcat", "123456", null)); 14 | System.out.println(user); 15 | } 16 | @Test 17 | public void test2(){ 18 | UserDao ud=new UserDaoimpl(); 19 | boolean b = ud.registUser(new User(5, "tomcat4", "1234567", "2")); 20 | System.out.println(b); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/dao/UserDaoimpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.User; 4 | 5 | public class UserDaoimpl extends BaseDao implements UserDao{ 6 | 7 | public User getUserandPassword(User user){ 8 | String sql = "select * from user where username=? and password=?"; 9 | User bean = this.getBean(sql, user.getUsername(), user.getPassword()); 10 | return bean; 11 | } 12 | public boolean registUser(User user){ 13 | String sql="insert into user(username,password,email) value(?,?,?)"; 14 | int update = this.update(sql, user.getUsername(), user.getPassword(), user.getEmail()); 15 | return update>0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | KaptchaServlet 9 | com.google.code.kaptcha.servlet.KaptchaServlet 10 | 11 | 12 | KaptchaServlet 13 | /code.jpg 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/dao/DoctorDao.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.doctor; 4 | 5 | import java.util.List; 6 | 7 | public interface DoctorDao { 8 | /** 9 | * 获得全部的兽医信息 10 | * @return 11 | */ 12 | public List getDorList(); 13 | 14 | /** 15 | * 添加新兽医 16 | * @param doctor 17 | * @return 18 | */ 19 | public boolean addDor(doctor doctor); 20 | /** 21 | * 根据名字搜部门 22 | * @param name 23 | * @return 24 | */ 25 | public List getoneDor(String name); 26 | /** 27 | * 根据部门搜部门 28 | * @param bumen 29 | * @return 30 | */ 31 | public List getoneDor1(String bumen); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | KaptchaServlet 9 | com.google.code.kaptcha.servlet.KaptchaServlet 10 | 11 | 12 | KaptchaServlet 13 | /code.jpg 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/service/DoctorService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.doctor; 4 | 5 | import java.util.List; 6 | 7 | public interface DoctorService { 8 | /** 9 | * 获得全部的兽医信息 10 | * @return 11 | */ 12 | public List getDorList(); 13 | 14 | /** 15 | * 添加新兽医 16 | * @param doctor 17 | * @return 18 | */ 19 | public boolean addDor(doctor doctor); 20 | /** 21 | * 根据名字搜部门 22 | * @param name 23 | * @return 24 | */ 25 | public List getoneDor(String name); 26 | /** 27 | * 根据部门搜部门 28 | * @param bumen 29 | * @return 30 | */ 31 | public List getoneDor1(String bumen); 32 | } 33 | -------------------------------------------------------------------------------- /src/dao/CustomerDao.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.customer; 4 | 5 | import java.util.List; 6 | 7 | public interface CustomerDao { 8 | 9 | /** 10 | * 添加新顾客 11 | * @param customer 12 | * @return 13 | */ 14 | public boolean AddCustomer(customer customer); 15 | 16 | /** 17 | * 修改顾客信息 18 | * @param customer 19 | * @return 20 | */ 21 | public boolean updateCus(customer customer); 22 | 23 | /** 24 | * 是否有这个顾客 25 | * @param name 26 | * @return 27 | */ 28 | public List IfCus(String name); 29 | 30 | /** 31 | * 是否有这个顾客 更新用 32 | * @param name 33 | * @return 34 | */ 35 | public customer getOneCus(String name); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/service/CustomerService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.customer; 4 | 5 | import java.util.List; 6 | 7 | public interface CustomerService { 8 | 9 | 10 | /** 11 | * 添加新顾客 12 | * @param customer 13 | * @return 14 | */ 15 | public boolean AddCustomer(customer customer); 16 | 17 | /** 18 | * 修改顾客信息 19 | * @param customer 20 | * @return 21 | */ 22 | public boolean updateCus(customer customer); 23 | 24 | /** 25 | * 是否有这个顾客 26 | * @param name 27 | * @return 28 | */ 29 | public List IfCus(String name); 30 | 31 | /** 32 | * 是否有这个顾客 更新用 33 | * @param name 34 | * @return 35 | */ 36 | public customer getOneCus(String name); 37 | } 38 | -------------------------------------------------------------------------------- /src/dao/MrecordsDaoimpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.mrecords; 4 | 5 | import java.util.List; 6 | 7 | public class MrecordsDaoimpl extends BaseDao implements MrecordsDao { 8 | @Override 9 | public List getrecords(String name) { 10 | String sql="select * from mrecords where pname=?"; 11 | List mrecords = getBeanList(sql, name); 12 | return mrecords; 13 | } 14 | 15 | @Override 16 | public boolean AddMrecords(mrecords mrecords) { 17 | String sql="insert into mrecords(pname,master,type,time,note) values(?,?,?,?,?)"; 18 | int update = update(sql, mrecords.getPname(), mrecords.getMaster(), mrecords.getType(), mrecords.getTime(), mrecords.getNote()); 19 | return update>0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /web/pages/user/login_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 登录成功 6 | <%@include file="/dir/base.jsp"%> 7 | 17 | 18 | 19 | 24 | 25 |
26 |

欢迎回来 转到主页

27 |
28 | 29 |
30 | 31 | 宠物系统.zc ©2020 32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/user/login_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 登录成功 6 | <%@include file="/dir/base.jsp"%> 7 | 17 | 18 | 19 | 24 | 25 |
26 |

欢迎回来 转到主页

27 |
28 | 29 |
30 | 31 | 宠物系统.zc ©2020 32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /web/pages/user/regist_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 注册页面 6 | <%@include file="/dir/base.jsp"%> 7 | 17 | 18 | 19 | 24 |


25 |
26 |
27 |

注册成功 转到主页

28 |
29 |

30 |
31 | 32 | 宠物系统.zc ©2020 33 | 34 |
35 |
36 | 37 | -------------------------------------------------------------------------------- /src/utils/JDBCUtils.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import com.mchange.v2.c3p0.ComboPooledDataSource; 4 | 5 | import javax.sql.DataSource; 6 | import java.sql.Connection; 7 | import java.sql.SQLException; 8 | 9 | public class JDBCUtils { 10 | private static DataSource ds = new ComboPooledDataSource("cw"); 11 | public static Connection getConnection(){ 12 | Connection connection=null; 13 | try { 14 | connection = ds.getConnection(); 15 | } catch (SQLException e) { 16 | e.printStackTrace(); 17 | } 18 | return connection; 19 | } 20 | 21 | public static void resconn(Connection connection){ 22 | 23 | try { 24 | if (connection!=null) { 25 | connection.close(); 26 | } 27 | } catch (SQLException e) { 28 | e.printStackTrace(); 29 | } 30 | 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/user/regist_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 注册页面 6 | <%@include file="/dir/base.jsp"%> 7 | 17 | 18 | 19 | 24 |


25 |
26 |
27 |

注册成功 转到主页

28 |
29 |

30 |
31 | 32 | 宠物系统.zc ©2020 33 | 34 |
35 |
36 | 37 | -------------------------------------------------------------------------------- /src/c3p0-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.mysql.jdbc.Driver 5 | jdbc:mysql://localhost:3306/cw 6 | root 7 | 148729 8 | 9 | 10 10 | 11 | 5 12 | 13 | 3 14 | 15 | 3600 16 | 17 | 5 18 | 19 | 50 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/DoctorTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import bean.doctor; 4 | import dao.DoctorDao; 5 | import dao.DoctorDaoimpl; 6 | import org.junit.Test; 7 | import service.DoctorService; 8 | import service.DoctorServiceimpl; 9 | 10 | import java.util.List; 11 | 12 | public class DoctorTest { 13 | 14 | @Test 15 | public void Test(){ 16 | DoctorDao doctorDao = new DoctorDaoimpl(); 17 | List dorList = doctorDao.getDorList(); 18 | for ( doctor list: dorList) { 19 | System.out.println(list); 20 | } 21 | } 22 | 23 | @Test 24 | public void Test1(){ 25 | DoctorService doctorService = new DoctorServiceimpl(); 26 | List dorList = doctorService.getDorList(); 27 | 28 | for ( doctor list: dorList) { 29 | System.out.println(list); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/c3p0-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.mysql.jdbc.Driver 5 | jdbc:mysql://localhost:3306/cw 6 | root 7 | 148729 8 | 9 | 10 10 | 11 | 5 12 | 13 | 3 14 | 15 | 3600 16 | 17 | 5 18 | 19 | 50 20 | 21 | 22 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/WEB-INF/classes/c3p0-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.mysql.jdbc.Driver 5 | jdbc:mysql://localhost:3306/cw 6 | root 7 | 148729 8 | 9 | 10 10 | 11 | 5 12 | 13 | 3 14 | 15 | 3600 16 | 17 | 5 18 | 19 | 50 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/service/PetService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.pet; 4 | 5 | import java.util.List; 6 | 7 | public interface PetService { 8 | 9 | /** 10 | * 通过宠物姓名查询 11 | * @param name 12 | * @return 13 | */ 14 | public List getListCusByN(String name); 15 | 16 | /** 17 | * 通过宠物主人姓名查询 18 | * @param master 19 | * @return 20 | */ 21 | public List getListCusByM(String master); 22 | 23 | /** 24 | * 修改宠物信息 25 | * @param pet 26 | * @return 27 | */ 28 | public boolean updatePet(pet pet); 29 | 30 | /** 31 | * 添加新宠物 32 | * @param pet 33 | * @return 34 | */ 35 | public boolean AddPet(pet pet); 36 | /** 37 | * 通过名字和客户查宠物 38 | * @param name 39 | * @param master 40 | * @return 41 | */ 42 | public pet getonepet(String name,String master); 43 | } 44 | -------------------------------------------------------------------------------- /src/dao/PetDao.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.customer; 4 | import bean.pet; 5 | 6 | import java.util.List; 7 | 8 | public interface PetDao { 9 | /** 10 | * 通过宠物姓名查询 11 | * @param name 12 | * @return 13 | */ 14 | public List getListCusByN(String name); 15 | 16 | /** 17 | * 通过宠物主人姓名查询 18 | * @param master 19 | * @return 20 | */ 21 | public List getListCusByM(String master); 22 | 23 | /** 24 | * 修改宠物信息 25 | * @param pet 26 | * @return 27 | */ 28 | public boolean updatePet(pet pet); 29 | 30 | /** 31 | * 添加新宠物 32 | * @param pet 33 | * @return 34 | */ 35 | public boolean AddPet(pet pet); 36 | 37 | /** 38 | * 通过名字和客户查宠物 39 | * @param name 40 | * @param master 41 | * @return 42 | */ 43 | public pet getonepet(String name,String master); 44 | } 45 | -------------------------------------------------------------------------------- /src/service/DoctorServiceimpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.doctor; 4 | import dao.DoctorDao; 5 | import dao.DoctorDaoimpl; 6 | 7 | import java.util.List; 8 | 9 | public class DoctorServiceimpl implements DoctorService{ 10 | DoctorDao doctorDao= new DoctorDaoimpl(); 11 | @Override 12 | public List getDorList() { 13 | return doctorDao.getDorList(); 14 | } 15 | 16 | @Override 17 | public boolean addDor(doctor doctor) { 18 | boolean b = doctorDao.addDor(doctor); 19 | return b; 20 | } 21 | 22 | @Override 23 | public List getoneDor(String name) { 24 | List doctor = doctorDao.getoneDor(name); 25 | return doctor; 26 | } 27 | 28 | @Override 29 | public List getoneDor1(String bumen) { 30 | List doctor = doctorDao.getoneDor1(bumen); 31 | return doctor; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/service/CustomerServiceimpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.customer; 4 | import dao.CustomerDao; 5 | import dao.CustomerDaoimpl; 6 | 7 | import java.util.List; 8 | 9 | public class CustomerServiceimpl implements CustomerService { 10 | CustomerDao customerDao= new CustomerDaoimpl(); 11 | @Override 12 | public boolean AddCustomer(customer customer) { 13 | boolean b = customerDao.AddCustomer(customer); 14 | return b; 15 | } 16 | 17 | @Override 18 | public boolean updateCus(customer customer) { 19 | boolean b = customerDao.updateCus(customer); 20 | return b; 21 | } 22 | 23 | @Override 24 | public List IfCus(String name) { 25 | List customers = customerDao.IfCus(name); 26 | return customers; 27 | } 28 | 29 | @Override 30 | public customer getOneCus(String name) { 31 | customer cus = customerDao.getOneCus(name); 32 | return cus; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/service/PetServiceimpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import bean.pet; 4 | import dao.PetDao; 5 | import dao.PetDaoimpl; 6 | 7 | import java.util.List; 8 | 9 | public class PetServiceimpl implements PetService { 10 | PetDao petDao = new PetDaoimpl(); 11 | @Override 12 | public List getListCusByN(String name) { 13 | return petDao.getListCusByN(name); 14 | } 15 | 16 | @Override 17 | public List getListCusByM(String master) { 18 | return petDao.getListCusByM(master); 19 | } 20 | 21 | @Override 22 | public boolean updatePet(pet pet) { 23 | boolean b = petDao.updatePet(pet); 24 | return b; 25 | } 26 | 27 | @Override 28 | public boolean AddPet(pet pet) { 29 | boolean b = petDao.AddPet(pet); 30 | return b; 31 | } 32 | 33 | @Override 34 | public pet getonepet(String name, String master) { 35 | pet pet = petDao.getonepet(name, master); 36 | return pet; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 10:04 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 书城首页 13 | 14 | 15 | 16 | 17 | 18 | 23 |
24 |













25 |
26 | 欢迎光临宠物系统 27 |
28 |













29 |
30 |
31 | 32 | 宠物系统.zc ©2020 33 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 10:04 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 书城首页 13 | 14 | 15 | 16 | 17 | 18 | 23 |
24 |













25 |
26 | 欢迎光临宠物系统 27 |
28 |













29 |
30 |
31 | 32 | 宠物系统.zc ©2020 33 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /web/dir/a1.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 |
6 | 7 |   登录   | 8 |   注册      9 |
10 | 11 |
12 | 13 |
14 | 欢迎${user.username}光临宠物系统    15 |   兽医     16 |   客户与宠物     17 |   注销     18 |
19 | 20 |
21 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/dir/a1.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 |
6 | 7 |   登录   | 8 |   注册      9 |
10 | 11 |
12 | 13 |
14 | 欢迎${user.username}光临宠物系统    15 |   兽医     16 |   客户与宠物     17 |   注销     18 |
19 | 20 |
21 | -------------------------------------------------------------------------------- /src/dao/DoctorDaoimpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.doctor; 4 | 5 | import java.util.List; 6 | 7 | public class DoctorDaoimpl extends BaseDao implements DoctorDao { 8 | @Override 9 | public List getDorList() { 10 | String sql="select id id,name name,sex sex,bumen bumen,time time from doctor"; 11 | return getBeanList(sql); 12 | } 13 | 14 | @Override 15 | public boolean addDor(doctor doctor) { 16 | String sql="insert into doctor(id,name,sex,bumen,time) values(?,?,?,?,?)"; 17 | int update = update(sql, doctor.getId(), doctor.getName(), doctor.getSex(), doctor.getBumen(), doctor.getTime()); 18 | return update>0; 19 | } 20 | 21 | @Override 22 | public List getoneDor(String name) { 23 | String sql="select id id,name name,sex sex,bumen bumen,time time from doctor where name=?"; 24 | List doctor = getBeanList(sql,name); 25 | return doctor; 26 | } 27 | 28 | @Override 29 | public List getoneDor1(String bumen) { 30 | String sql="select id id,name name,sex sex,bumen bumen,time time from doctor where bumen=?"; 31 | List doctor = getBeanList(sql,bumen); 32 | return doctor; 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/dao/CustomerDaoimpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.customer; 4 | 5 | import java.util.List; 6 | 7 | public class CustomerDaoimpl extends BaseDao implements CustomerDao { 8 | @Override 9 | public boolean AddCustomer(customer customer) { 10 | String sql="insert into customer(id,name,adress,city,phone) values(?,?,?,?,?)"; 11 | int update = update(sql, customer.getId(), customer.getName(), customer.getAdress(), customer.getCity(), customer.getPhone()); 12 | return update>0; 13 | } 14 | 15 | @Override 16 | public boolean updateCus(customer customer) { 17 | String sql="update customer set adress=?,city=?,phone=? where name=?"; 18 | int update = update(sql, customer.getAdress(), customer.getCity(), customer.getPhone(), customer.getName()); 19 | return update>0; 20 | } 21 | 22 | @Override 23 | public List IfCus(String name) { 24 | String sql="select * from customer where name=?"; 25 | List list = getBeanList(sql, name); 26 | return list; 27 | } 28 | 29 | @Override 30 | public customer getOneCus(String name) { 31 | String sql="select * from customer where name=?"; 32 | customer customer = getBean(sql, name); 33 | return customer; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/servlet/baseServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import javax.servlet.ServletException; 4 | import javax.servlet.annotation.WebServlet; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.io.IOException; 9 | import java.io.UnsupportedEncodingException; 10 | import java.lang.reflect.Method; 11 | 12 | @WebServlet(name = "baseServlet") 13 | public abstract class baseServlet extends HttpServlet { 14 | 15 | /* 16 | * 反射 17 | * */ 18 | @Override 19 | protected void doPost( HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException { 20 | request.setCharacterEncoding("utf-8"); 21 | String method = request.getParameter("method"); 22 | try { 23 | Method method1 = this.getClass().getDeclaredMethod(method, HttpServletRequest.class, HttpServletResponse.class); 24 | method1.setAccessible(true); 25 | method1.invoke(this,request,response); 26 | } catch (Exception e) { 27 | e.printStackTrace(); 28 | } 29 | } 30 | @Override 31 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException { 32 | doPost(request,response); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/test/PetTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import bean.customer; 4 | import bean.pet; 5 | import dao.PetDao; 6 | import dao.PetDaoimpl; 7 | import org.junit.Test; 8 | import service.CustomerService; 9 | import service.CustomerServiceimpl; 10 | import service.PetService; 11 | import service.PetServiceimpl; 12 | 13 | import java.util.List; 14 | 15 | public class PetTest { 16 | PetDao petDao = new PetDaoimpl(); 17 | PetService petService = new PetServiceimpl(); 18 | CustomerService customerService = new CustomerServiceimpl(); 19 | @Test 20 | public void Test(){ 21 | List listCusByN = petDao.getListCusByM("11"); 22 | for (pet pet:listCusByN 23 | ) { 24 | System.out.println(pet); 25 | } 26 | } 27 | 28 | @Test 29 | public void Test1(){ 30 | List listCusByN = petService.getListCusByM("1"); 31 | for (pet pet:listCusByN 32 | ) { 33 | System.out.println(pet); 34 | } 35 | } 36 | @Test 37 | public void Test2(){ 38 | pet pet = petService.getonepet("2", "1"); 39 | System.out.println(pet.getId()); 40 | 41 | } 42 | 43 | @Test 44 | public void Test3(){ 45 | boolean b = petService.updatePet(new pet(1, "1", "2", "1", "1")); 46 | System.out.println(b); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /src/bean/User.java: -------------------------------------------------------------------------------- 1 | package bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class User implements Serializable { 6 | private Integer id; 7 | private String username; 8 | private String password; 9 | private String email; 10 | 11 | public Integer getId() { 12 | return id; 13 | } 14 | 15 | public void setId(Integer id) { 16 | this.id = id; 17 | } 18 | 19 | public String getUsername() { 20 | return username; 21 | } 22 | 23 | public void setUsername(String username) { 24 | this.username = username; 25 | } 26 | 27 | public String getPassword() { 28 | return password; 29 | } 30 | 31 | public void setPassword(String password) { 32 | this.password = password; 33 | } 34 | 35 | public String getEmail() { 36 | return email; 37 | } 38 | 39 | public void setEmail(String email) { 40 | this.email = email; 41 | } 42 | 43 | public User(Integer id, String username, String password, String email) { 44 | this.id = id; 45 | this.username = username; 46 | this.password = password; 47 | this.email = email; 48 | } 49 | 50 | public User() { 51 | super(); 52 | } 53 | 54 | 55 | @Override 56 | public String toString() { 57 | return "User{" + 58 | "id=" + id + 59 | ", username='" + username + '\'' + 60 | ", password='" + password + '\'' + 61 | ", email='" + email + '\'' + 62 | '}'; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/dao/PetDaoimpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import bean.pet; 4 | 5 | import java.util.List; 6 | 7 | public class PetDaoimpl extends BaseDao implements PetDao { 8 | @Override 9 | public List getListCusByN(String name) { 10 | String sql="select id id,name name,type type,bath bath,master master from pet where name=?"; 11 | List pets = getBeanList(sql, name); 12 | return pets; 13 | } 14 | 15 | @Override 16 | public List getListCusByM(String master) { 17 | String sql="select id id,name name,type type,bath bath,master master from pet where master=?"; 18 | List pets = getBeanList(sql, master); 19 | return pets; 20 | } 21 | 22 | @Override 23 | public boolean updatePet(pet pet) { 24 | String sql="update pet set id=?,type=?,bath=?,master=? where name=?"; 25 | int update = update(sql,pet.getId(), pet.getType(), pet.getBath(), pet.getMaster(), pet.getName()); 26 | return update>0; 27 | } 28 | 29 | @Override 30 | public boolean AddPet(pet pet) { 31 | String sql="insert into pet(id,name,type,bath,master) values(?,?,?,?,?)"; 32 | int update = update(sql, pet.getId(), pet.getName(), pet.getType(), pet.getBath(), pet.getMaster()); 33 | return update>0; 34 | } 35 | 36 | @Override 37 | public pet getonepet(String name, String master) { 38 | String sql="select id id,name name,type type,bath bath,master master from pet where name=? and master=?"; 39 | pet pet = getBean(sql, name, master); 40 | return pet; 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/utils/webUtils.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | 4 | import bean.User; 5 | import org.apache.commons.beanutils.BeanUtils; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpSession; 9 | import java.lang.reflect.Field; 10 | import java.lang.reflect.InvocationTargetException; 11 | import java.util.Map; 12 | 13 | public class webUtils { 14 | /* 15 | * 其中一种设置vaule 的方法 16 | * 在userServlet中进行了实验 17 | * 18 | * */ 19 | public static T param2bean(HttpServletRequest request,T t){ 20 | //获取所有声明的属性 21 | Field[] fields = t.getClass().getDeclaredFields(); 22 | for (Field field:fields) { 23 | // 获取属性名 24 | String name = field.getName(); 25 | //在request获取相应的属性名 26 | String vaule = request.getParameter(name); 27 | try { 28 | BeanUtils.setProperty(t,name,vaule); 29 | } catch (Exception e) { 30 | e.printStackTrace(); 31 | } } 32 | return t; 33 | } 34 | 35 | 36 | /* 37 | * 使用的方法 38 | * 具体应用在userServlet 39 | * */ 40 | public static T param2bean2(HttpServletRequest request,T t){ 41 | 42 | //先用map 封装上所需要的所有 43 | Map map = request.getParameterMap(); 44 | try { 45 | BeanUtils.populate(t,map); 46 | } catch (Exception e) { 47 | e.printStackTrace(); 48 | } 49 | return t; 50 | } 51 | 52 | 53 | public static User getLoginUser(HttpServletRequest request) { 54 | HttpSession session = request.getSession(); 55 | User user = (User) session.getAttribute("user"); 56 | return user; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /web/pages/user/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 登录页面 6 | <%@include file="/dir/base.jsp"%> 7 | 8 | 9 |
10 | 11 | 宠物系统 12 |
13 | 14 | 50 |
51 | 52 | 宠物系统.zc ©2020 53 | 54 |
55 | 56 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/user/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 登录页面 6 | <%@include file="/dir/base.jsp"%> 7 | 8 | 9 |
10 | 11 | 宠物系统 12 |
13 | 14 | 50 |
51 | 52 | 宠物系统.zc ©2020 53 | 54 |
55 | 56 | -------------------------------------------------------------------------------- /src/bean/doctor.java: -------------------------------------------------------------------------------- 1 | package bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class doctor implements Serializable { 6 | private Integer id; 7 | private String name; 8 | private String sex; 9 | private String bumen; 10 | private String time; 11 | 12 | public Integer getId() { 13 | return id; 14 | } 15 | 16 | public void setId(Integer id) { 17 | this.id = id; 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | 24 | public void setName(String name) { 25 | this.name = name; 26 | } 27 | 28 | public String getSex() { 29 | return sex; 30 | } 31 | 32 | public void setSex(String sex) { 33 | this.sex = sex; 34 | } 35 | 36 | public String getBumen() { 37 | return bumen; 38 | } 39 | 40 | public void setBumen(String bumen) { 41 | this.bumen = bumen; 42 | } 43 | 44 | public String getTime() { 45 | return time; 46 | } 47 | 48 | public void setTime(String time) { 49 | this.time = time; 50 | } 51 | 52 | public doctor(Integer id, String name, String sex, String bumen, String time) { 53 | this.id = id; 54 | this.name = name; 55 | this.sex = sex; 56 | this.bumen = bumen; 57 | this.time = time; 58 | } 59 | 60 | public doctor() { 61 | super(); 62 | } 63 | 64 | @Override 65 | public String toString() { 66 | return "doctor{" + 67 | "id=" + id + 68 | ", name='" + name + '\'' + 69 | ", sex='" + sex + '\'' + 70 | ", bumen='" + bumen + '\'' + 71 | ", time='" + time + '\'' + 72 | '}'; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/bean/pet.java: -------------------------------------------------------------------------------- 1 | package bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class pet implements Serializable { 6 | private Integer id; 7 | private String name; 8 | private String type; 9 | private String bath; 10 | private String master; 11 | 12 | @Override 13 | public String toString() { 14 | return "pet{" + 15 | "id=" + id + 16 | ", name='" + name + '\'' + 17 | ", type='" + type + '\'' + 18 | ", bath='" + bath + '\'' + 19 | ", master='" + master + '\'' + 20 | '}'; 21 | } 22 | 23 | public pet() { 24 | super(); 25 | } 26 | 27 | public pet(Integer id, String name, String type, String bath, String master) { 28 | this.id = id; 29 | this.name = name; 30 | this.type = type; 31 | this.bath = bath; 32 | this.master = master; 33 | } 34 | 35 | public Integer getId() { 36 | return id; 37 | } 38 | 39 | public void setId(Integer id) { 40 | this.id = id; 41 | } 42 | 43 | public String getName() { 44 | return name; 45 | } 46 | 47 | public void setName(String name) { 48 | this.name = name; 49 | } 50 | 51 | public String getType() { 52 | return type; 53 | } 54 | 55 | public void setType(String type) { 56 | this.type = type; 57 | } 58 | 59 | public String getBath() { 60 | return bath; 61 | } 62 | 63 | public void setBath(String bath) { 64 | this.bath = bath; 65 | } 66 | 67 | public String getMaster() { 68 | return master; 69 | } 70 | 71 | public void setMaster(String master) { 72 | this.master = master; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/bean/customer.java: -------------------------------------------------------------------------------- 1 | package bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class customer implements Serializable { 6 | private Integer id; 7 | private String name; 8 | private String adress; 9 | private String city; 10 | private String phone; 11 | 12 | @Override 13 | public String toString() { 14 | return "customer{" + 15 | "id=" + id + 16 | ", name='" + name + '\'' + 17 | ", adress='" + adress + '\'' + 18 | ", city='" + city + '\'' + 19 | ", phone='" + phone + '\'' + 20 | '}'; 21 | } 22 | 23 | public customer() { 24 | super(); 25 | } 26 | 27 | public customer(Integer id, String name, String adress, String city, String phone) { 28 | this.id = id; 29 | this.name = name; 30 | this.adress = adress; 31 | this.city = city; 32 | this.phone = phone; 33 | } 34 | 35 | public Integer getId() { 36 | return id; 37 | } 38 | 39 | public void setId(Integer id) { 40 | this.id = id; 41 | } 42 | 43 | public String getName() { 44 | return name; 45 | } 46 | 47 | public void setName(String name) { 48 | this.name = name; 49 | } 50 | 51 | public String getAdress() { 52 | return adress; 53 | } 54 | 55 | public void setAdress(String adress) { 56 | this.adress = adress; 57 | } 58 | 59 | public String getCity() { 60 | return city; 61 | } 62 | 63 | public void setCity(String city) { 64 | this.city = city; 65 | } 66 | 67 | public String getPhone() { 68 | return phone; 69 | } 70 | 71 | public void setPhone(String phone) { 72 | this.phone = phone; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/bean/mrecords.java: -------------------------------------------------------------------------------- 1 | package bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class mrecords implements Serializable { 6 | 7 | private String pname; 8 | private String master; 9 | private String type; 10 | private String time; 11 | private String note; 12 | 13 | @Override 14 | public String toString() { 15 | return "mrecords{" + 16 | "pname='" + pname + '\'' + 17 | ", master='" + master + '\'' + 18 | ", type='" + type + '\'' + 19 | ", time='" + time + '\'' + 20 | ", note='" + note + '\'' + 21 | '}'; 22 | } 23 | 24 | public mrecords() { 25 | super(); 26 | } 27 | 28 | public mrecords(String pname, String master, String type, String time, String note) { 29 | this.pname = pname; 30 | this.master = master; 31 | this.type = type; 32 | this.time = time; 33 | this.note = note; 34 | } 35 | 36 | public String getPname() { 37 | return pname; 38 | } 39 | 40 | public void setPname(String pname) { 41 | this.pname = pname; 42 | } 43 | 44 | public String getMaster() { 45 | return master; 46 | } 47 | 48 | public void setMaster(String master) { 49 | this.master = master; 50 | } 51 | 52 | public String getType() { 53 | return type; 54 | } 55 | 56 | public void setType(String type) { 57 | this.type = type; 58 | } 59 | 60 | public String getTime() { 61 | return time; 62 | } 63 | 64 | public void setTime(String time) { 65 | this.time = time; 66 | } 67 | 68 | public String getNote() { 69 | return note; 70 | } 71 | 72 | public void setNote(String note) { 73 | this.note = note; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /.idea/artifacts/_war_exploded.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/out/artifacts/_war_exploded 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pet_hospital 2 | 宠物医院系统 Java web 3 | 4 | # Pet_hospital 5 | 宠物医院系统 Java web 6 | 7 | ## 项目部署 8 | 9 | 该项目是`idea`版本,**Java web** 10 | 11 | > 12 | > 13 | >记得`mysql-connector-java-5.1.25-bin.jar`的导入,给你们放在项目里了。 14 | > 15 | >创建好数据库,更改项目中数据库密码,sql文件也给你了。 16 | > 17 | >记得部署`Tomcat` 18 | > 19 | > 20 | 21 | **项目功能:** 22 | 23 | - 登录、注册 24 | - 兽医部分:本系统四大部分之一,共有浏览兽医信息、添加兽医信息、查询兽医信息 25 | - 客户部分:本系统四大部分之一,共有添加宠物主人、查询客户信息、修改客户信息 26 | - 宠物部分:本系统四大部分之一,共有添加宠物信息、查询宠物信息、修改宠物信息 27 | - 病历部分:本系统四大部分之一,共有添加病历信息、查看病历信息 28 | 29 | 30 | 31 | ## 项目展示 32 | 33 | 1 34 | 35 | 2 36 | 37 | 3 38 | 39 | 4 40 | 41 | 5 42 | 43 | 6 44 | 45 | 7 46 | 47 | 8 48 | 49 | 9 50 | 51 | 10 52 | 53 | 11 54 | 55 | 12 56 | 57 | -------------------------------------------------------------------------------- /src/dao/BaseDao.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | 4 | import org.apache.commons.dbutils.QueryRunner; 5 | import org.apache.commons.dbutils.handlers.BeanHandler; 6 | import org.apache.commons.dbutils.handlers.BeanListHandler; 7 | import utils.JDBCUtils; 8 | import java.lang.reflect.ParameterizedType; 9 | import java.sql.Connection; 10 | import java.sql.SQLException; 11 | import java.util.List; 12 | 13 | public class BaseDao { 14 | 15 | private QueryRunner runner = new QueryRunner(); 16 | private Class type; 17 | 18 | public BaseDao() { 19 | ParameterizedType su = (ParameterizedType) this.getClass().getGenericSuperclass(); 20 | // System.out.println(su.getClass()); 21 | type = (Class) su.getActualTypeArguments()[0]; 22 | } 23 | 24 | public T getBean(String sql, Object... params) { 25 | Connection connection = JDBCUtils.getConnection(); 26 | T query = null; 27 | try { 28 | query = runner.query(connection, sql, new BeanHandler<>(type), params); 29 | } catch (SQLException e) { 30 | e.printStackTrace(); 31 | } finally { 32 | JDBCUtils.resconn(connection); 33 | } 34 | return query; 35 | } 36 | public List getBeanList(String sql, Object...params){ 37 | Connection connection=JDBCUtils.getConnection(); 38 | List query=null; 39 | try { 40 | query=runner.query(connection,sql, new BeanListHandler<>(type),params); 41 | } catch (SQLException e) { 42 | e.printStackTrace(); 43 | } 44 | return query; 45 | } 46 | 47 | public int update(String sql, Object... params) { 48 | int count = 0; 49 | Connection connection = JDBCUtils.getConnection(); 50 | try { 51 | count = runner.update(connection, sql, params); 52 | } catch (SQLException e) { 53 | e.printStackTrace(); 54 | } finally { 55 | JDBCUtils.resconn(connection); 56 | } 57 | return count; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/servlet/CustomerServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import bean.customer; 4 | import bean.pet; 5 | import service.CustomerService; 6 | import service.CustomerServiceimpl; 7 | import utils.webUtils; 8 | 9 | import javax.servlet.ServletException; 10 | import javax.servlet.annotation.WebServlet; 11 | import javax.servlet.http.HttpServlet; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.io.IOException; 15 | 16 | @WebServlet(name = "CustomerServlet",urlPatterns = "/CustomerServlet") 17 | public class CustomerServlet extends baseServlet { 18 | CustomerService customerService = new CustomerServiceimpl(); 19 | 20 | protected void AddCustomer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, IOException { 21 | customer customer = webUtils.param2bean2(request, new customer()); 22 | boolean b = customerService.AddCustomer(customer); 23 | if (b) { 24 | //注册成功 25 | response.sendRedirect(request.getContextPath() + "/pages/mandp/mapindex.jsp"); 26 | } else { 27 | //注册失败 28 | request.getRequestDispatcher("/pages/mandp/addmaster.jsp").forward(request, response); 29 | } 30 | } 31 | 32 | protected void getOneCus(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 33 | String name = request.getParameter("name"); 34 | customer cus = customerService.getOneCus(name); 35 | request.setAttribute("cus",cus); 36 | request.getRequestDispatcher("pages/mandp/updateCus.jsp").forward(request,response); 37 | } 38 | 39 | protected void updateCus(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 40 | customer customer = webUtils.param2bean2(request, new customer()); 41 | boolean b = customerService.updateCus(customer); 42 | if (b) { 43 | //注册成功 44 | response.sendRedirect(request.getContextPath() + "/pages/mandp/mapindex.jsp"); 45 | } else { 46 | //注册失败 47 | request.setAttribute("mgs1","错误:修改失败"); 48 | request.getRequestDispatcher("/pages/mandp/updateCus.jsp").forward(request, response); 49 | } 50 | 51 | 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/servlet/MrecordsServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import bean.mrecords; 4 | import bean.pet; 5 | import service.MrecordsService; 6 | import service.MrecordsServiceimpl; 7 | import service.PetService; 8 | import service.PetServiceimpl; 9 | import utils.webUtils; 10 | 11 | import javax.servlet.ServletException; 12 | import javax.servlet.annotation.WebServlet; 13 | import javax.servlet.http.HttpServlet; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | import java.io.IOException; 17 | import java.util.List; 18 | 19 | @WebServlet(name = "MrecordsServlet",urlPatterns = "/MrecordsServlet") 20 | public class MrecordsServlet extends baseServlet { 21 | MrecordsService mrecordsService = new MrecordsServiceimpl(); 22 | PetService petService = new PetServiceimpl(); 23 | protected void href(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 24 | String name = request.getParameter("name"); 25 | String master = request.getParameter("master"); 26 | pet pet = petService.getonepet(name, master); 27 | request.setAttribute("pet",pet); 28 | request.getRequestDispatcher("pages/mandp/addmrecords.jsp").forward(request,response); 29 | 30 | } 31 | protected void AddMrecords(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ 32 | mrecords mrecords = webUtils.param2bean2(request, new mrecords()); 33 | boolean b = mrecordsService.AddMrecords(mrecords); 34 | if (b) { 35 | //注册成功 36 | 37 | response.sendRedirect(request.getContextPath()+"/pages/mandp/inquiremap.jsp"); 38 | // request.setAttribute("mgs1","成功:已经添加"); 39 | // request.getRequestDispatcher("/pages/mandp/inquiremap.jsp").forward(request, response); 40 | } else { 41 | //注册失败 42 | request.setAttribute("mgs1","错误:修改失败"); 43 | request.getRequestDispatcher("/pages/mandp/addmrecords.jsp").forward(request, response); 44 | } } 45 | protected void getMrecords(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ 46 | String name = request.getParameter("name"); 47 | String master = request.getParameter("master"); 48 | pet pet = petService.getonepet(name, master); 49 | List mrecords = mrecordsService.getrecords(name); 50 | request.setAttribute("pet",pet); 51 | request.setAttribute("mrecords",mrecords); 52 | request.getRequestDispatcher("pages/mandp/getmrecords.jsp").forward(request,response); 53 | 54 | } 55 | 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/servlet/DoctorServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import bean.doctor; 4 | import service.DoctorService; 5 | import service.DoctorServiceimpl; 6 | import utils.webUtils; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.annotation.WebServlet; 10 | import javax.servlet.http.HttpServlet; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | import java.io.IOException; 14 | import java.util.List; 15 | 16 | @WebServlet(name = "DoctorServlet",urlPatterns = "/DoctorServlet") 17 | public class DoctorServlet extends baseServlet { 18 | DoctorService doctorService = new DoctorServiceimpl(); 19 | /** 20 | * 全部的兽医信息 21 | * */ 22 | protected void dorlist(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 23 | List list = doctorService.getDorList(); 24 | request.setAttribute("doctors",list); 25 | request.getRequestDispatcher("pages/amdoctor/aminfor.jsp").forward(request,response); 26 | } 27 | 28 | protected void add(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 29 | doctor doctor = webUtils.param2bean2(request, new doctor()); 30 | boolean b = doctorService.addDor(doctor); 31 | if (b) { 32 | //注册成功 33 | response.sendRedirect(request.getContextPath() + "/pages/amdoctor/anindex.jsp"); 34 | } else { 35 | //注册失败 36 | request.setAttribute("mgs1","错误:添加失败"); 37 | request.getRequestDispatcher("/pages/amdoctor/addamdor.jsp").forward(request, response); 38 | } 39 | 40 | } 41 | protected void inquirename(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 42 | doctor doctor = webUtils.param2bean2(request, new doctor()); 43 | List doctors = doctorService.getoneDor(doctor.getName()); 44 | if (doctors.size()==0){ 45 | request.setAttribute("mgs1","错误:没有这个医生"); 46 | request.getRequestDispatcher("/pages/amdoctor/inquireDor.jsp").forward(request, response); 47 | }else { 48 | request.setAttribute("doctors",doctors); 49 | request.getRequestDispatcher("pages/amdoctor/aminfor.jsp").forward(request,response); 50 | } 51 | 52 | } 53 | 54 | protected void inquirebumen(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 55 | doctor doctor = webUtils.param2bean2(request, new doctor()); 56 | List doctors = doctorService.getoneDor1(doctor.getBumen()); 57 | if (doctors.size()==0){ 58 | request.setAttribute("mgs1","错误:没有这个部门"); 59 | request.getRequestDispatcher("/pages/amdoctor/inquireDor.jsp").forward(request, response); 60 | }else { 61 | request.setAttribute("doctors",doctors); 62 | request.getRequestDispatcher("pages/amdoctor/aminfor.jsp").forward(request,response); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /web/pages/mandp/mapindex.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 16:39 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <%@include file="/dir/base.jsp"%> 12 | 客户初始页 13 | 47 | 60 | 61 | 62 | 67 | 68 |



69 |
70 |      71 | 72 |     73 | 74 |     75 | 76 | 77 |
78 |
79 |

80 |
81 |









82 |
83 | 宠物和主人信息页 84 |
85 |











86 |
87 |
88 | 89 | 宠物系统.zc ©2020 90 | 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /web/pages/amdoctor/anindex.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 16:39 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <%@include file="/dir/base.jsp"%> 12 | 兽医初始页 13 | 47 | 60 | 61 | 62 | 67 | 68 |



69 |
70 |      71 | 72 |     73 | 74 |     75 | 76 | 77 |
78 |
79 |

80 |
81 |









82 |
83 | 兽医信息页 84 |
85 |











86 |
87 |
88 | 89 | 宠物系统.zc ©2020 90 | 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/mandp/mapindex.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 16:39 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <%@include file="/dir/base.jsp"%> 12 | 客户初始页 13 | 47 | 60 | 61 | 62 | 67 | 68 |



69 |
70 |      71 | 72 |     73 | 74 |     75 | 76 | 77 |
78 |
79 |

80 |
81 |









82 |
83 | 宠物和主人信息页 84 |
85 |











86 |
87 |
88 | 89 | 宠物系统.zc ©2020 90 | 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/amdoctor/anindex.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 16:39 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <%@include file="/dir/base.jsp"%> 12 | 兽医初始页 13 | 47 | 60 | 61 | 62 | 67 | 68 |



69 |
70 |      71 | 72 |     73 | 74 |     75 | 76 | 77 |
78 |
79 |

80 |
81 |









82 |
83 | 兽医信息页 84 |
85 |











86 |
87 |
88 | 89 | 宠物系统.zc ©2020 90 | 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /src/servlet/userServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import bean.User; 4 | import com.google.code.kaptcha.Constants; 5 | import com.sun.corba.se.impl.orbutil.closure.Constant; 6 | import service.UserService; 7 | import service.UserServiceimpl; 8 | import utils.webUtils; 9 | 10 | import javax.servlet.ServletException; 11 | import javax.servlet.annotation.WebServlet; 12 | import javax.servlet.http.HttpServlet; 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpServletResponse; 15 | import javax.servlet.http.HttpSession; 16 | import java.io.IOException; 17 | 18 | @WebServlet(name = "userServlet" ,urlPatterns = "/userServlet") 19 | public class userServlet extends baseServlet { 20 | private UserService us=new UserServiceimpl(); 21 | protected void login(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 22 | // String username = request.getParameter("username"); 23 | // String password = request.getParameter("password"); 24 | // User user = us.login(new User(null, username, password, null)); 25 | 26 | // User user1=webUtils.param2bean(request,new User()); 27 | // User user = us.login(user1); 28 | 29 | User user1 = webUtils.param2bean2(request,new User()); 30 | User user = us.login(user1); 31 | if (user == null){ 32 | //登录失败 返回登陆页面 33 | request.setAttribute("mgs","用户名或密码错误"); 34 | request.getRequestDispatcher("/pages/user/login.jsp").forward(request,response); 35 | 36 | }else{ 37 | //登陆成功 38 | HttpSession session = request.getSession(); 39 | session.setAttribute("user",user); 40 | response.sendRedirect(request.getContextPath()+"/pages/user/login_success.jsp"); 41 | } 42 | } 43 | 44 | protected void regist(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 45 | // String username = request.getParameter("username"); 46 | // String password = request.getParameter("password"); 47 | // String email=request.getParameter("email"); 48 | // boolean b = us.regist(new User(null, username, password, email)); 49 | String token = request.getParameter("token"); 50 | HttpSession session1 = request.getSession(); 51 | String token1 = (String)session1.getAttribute("token"); 52 | session1.removeAttribute("token"); 53 | if (token.equals(token1)) { 54 | //验证码 55 | String code = request.getParameter("code"); 56 | HttpSession session = request.getSession(); 57 | Object attribute = session.getAttribute(Constants.KAPTCHA_SESSION_KEY); 58 | if (attribute.equals(code)) { 59 | response.sendRedirect(request.getContextPath() + "/pages/user/regist_success.jsp"); 60 | } else { 61 | request.setAttribute("mgs1", "验证码错误"); 62 | request.getRequestDispatcher("/pages/user/regist.jsp").forward(request, response); 63 | } 64 | 65 | User user1 = webUtils.param2bean2(request, new User()); 66 | boolean b = us.regist(user1); 67 | if (b) { 68 | //注册成功 69 | response.sendRedirect(request.getContextPath() + "/pages/user/regist_success.jsp"); 70 | } else { 71 | //注册失败 72 | request.setAttribute("mgs1", "账号重复"); 73 | request.getRequestDispatcher("/pages/user/regist.jsp").forward(request, response); 74 | } 75 | }else{ 76 | request.setAttribute("mgs1", "不可以重复注册"); 77 | request.getRequestDispatcher("/pages/user/regist.jsp").forward(request, response); 78 | } 79 | 80 | } 81 | protected void loginout(HttpServletRequest request, HttpServletResponse response) throws IOException { 82 | HttpSession session = request.getSession(); 83 | session.invalidate(); 84 | response.sendRedirect(request.getContextPath()+"/index.jsp"); 85 | 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/servlet/PetServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | 4 | import bean.customer; 5 | import bean.pet; 6 | import service.CustomerService; 7 | import service.CustomerServiceimpl; 8 | import service.PetService; 9 | import service.PetServiceimpl; 10 | import utils.webUtils; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.annotation.WebServlet; 14 | import javax.servlet.http.HttpServlet; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | import java.io.IOException; 18 | import java.util.List; 19 | 20 | @WebServlet(name = "PetServlet",urlPatterns = "/PetServlet") 21 | public class PetServlet extends baseServlet { 22 | PetService petService = new PetServiceimpl(); 23 | CustomerService customerService = new CustomerServiceimpl(); 24 | protected void AddPet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 25 | pet pet = webUtils.param2bean2(request, new pet()); 26 | List customers = customerService.IfCus(pet.getMaster()); 27 | if (customers.size()==0){ 28 | request.setAttribute("mgs1","错误:没有这个客户"); 29 | request.getRequestDispatcher("/pages/mandp/addpet.jsp").forward(request, response); 30 | }else { 31 | boolean b = petService.AddPet(pet); 32 | if (b) { 33 | //注册成功 34 | response.sendRedirect(request.getContextPath() + "/pages/mandp/mapindex.jsp"); 35 | } else { 36 | //注册失败 37 | request.getRequestDispatcher("/pages/mandp/addpet.jsp").forward(request, response); 38 | } 39 | } 40 | 41 | 42 | } 43 | 44 | protected void InquireByN(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 45 | pet pet = webUtils.param2bean2(request, new pet()); 46 | System.out.println(pet.getId()); 47 | List pets = petService.getListCusByN(pet.getName()); 48 | if (pets.size()==0){ 49 | request.setAttribute("mgs1","错误:没有这个宠物"); 50 | request.getRequestDispatcher("/pages/mandp/inquiremap.jsp").forward(request, response); 51 | }else { 52 | request.setAttribute("pets",pets); 53 | request.getRequestDispatcher("pages/mandp/inquireres.jsp").forward(request,response); 54 | } 55 | } 56 | protected void InquireByM(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 57 | pet pet = webUtils.param2bean2(request, new pet()); 58 | List pets = petService.getListCusByM(pet.getMaster()); 59 | if (pets.size()==0){ 60 | request.setAttribute("mgs1","错误:没有这个客户"); 61 | request.getRequestDispatcher("/pages/mandp/inquiremap.jsp").forward(request, response); 62 | }else { 63 | request.setAttribute("pets",pets); 64 | request.getRequestDispatcher("pages/mandp/inquireres.jsp").forward(request,response); 65 | } 66 | } 67 | protected void updatepet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 68 | pet pet = webUtils.param2bean2(request, new pet()); 69 | System.out.println(pet.getId()+"--"+pet.getName()+"---"+pet.getType()); 70 | List customers = customerService.IfCus(pet.getMaster()); 71 | if (customers.size()==0){ 72 | request.setAttribute("mgs1","错误:没有这个客户"); 73 | request.getRequestDispatcher("/pages/mandp/inquiremap.jsp").forward(request, response); 74 | }else { 75 | boolean b = petService.updatePet(pet); 76 | if (b) { 77 | //注册成功 78 | response.sendRedirect(request.getContextPath() + "/pages/mandp/mapindex.jsp"); 79 | } else { 80 | //注册失败 81 | request.setAttribute("mgs1","错误:修改失败"); 82 | request.getRequestDispatcher("/pages/mandp/updatepet.jsp").forward(request, response); 83 | } 84 | } 85 | 86 | 87 | } 88 | 89 | protected void href(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 90 | String name = request.getParameter("name"); 91 | String master = request.getParameter("master"); 92 | pet pet = petService.getonepet(name, master); 93 | request.setAttribute("pet",pet); 94 | request.getRequestDispatcher("pages/mandp/updatepet.jsp").forward(request,response); 95 | } 96 | 97 | 98 | } 99 | -------------------------------------------------------------------------------- /web/pages/user/regist.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.UUID" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | 6 | 注册页面 7 | <%@include file="/dir/base.jsp"%> 8 | 74 | 81 | 82 | 83 |
84 | 85 | 宠物系统 86 |
87 | 88 | 138 |
139 | 140 | 宠物系统.zc ©2020 141 | 142 |
143 | 144 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/user/regist.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.UUID" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | 6 | 注册页面 7 | <%@include file="/dir/base.jsp"%> 8 | 74 | 81 | 82 | 83 |
84 | 85 | 宠物系统 86 |
87 | 88 | 138 |
139 | 140 | 宠物系统.zc ©2020 141 | 142 |
143 | 144 | -------------------------------------------------------------------------------- /宠物系统.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /cw.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : localhost 5 | Source Server Type : MySQL 6 | Source Server Version : 50527 7 | Source Host : localhost:3306 8 | Source Schema : cw 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 50527 12 | File Encoding : 65001 13 | 14 | Date: 18/02/2021 18:46:32 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for customer 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `customer`; 24 | CREATE TABLE `customer` ( 25 | `id` int(10) NOT NULL AUTO_INCREMENT, 26 | `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 27 | `adress` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 28 | `city` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 29 | `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 30 | PRIMARY KEY (`id`) USING BTREE 31 | ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 32 | 33 | -- ---------------------------- 34 | -- Records of customer 35 | -- ---------------------------- 36 | INSERT INTO `customer` VALUES (1, '小张', '河南商丘', '商丘', '110'); 37 | INSERT INTO `customer` VALUES (2, '小孙', '河南郑州', '郑州', '120'); 38 | INSERT INTO `customer` VALUES (4, '1', '2', '1', '1'); 39 | 40 | -- ---------------------------- 41 | -- Table structure for doctor 42 | -- ---------------------------- 43 | DROP TABLE IF EXISTS `doctor`; 44 | CREATE TABLE `doctor` ( 45 | `id` int(10) NOT NULL AUTO_INCREMENT, 46 | `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 47 | `sex` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 48 | `bumen` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 49 | `time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 50 | PRIMARY KEY (`id`) USING BTREE 51 | ) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 52 | 53 | -- ---------------------------- 54 | -- Records of doctor 55 | -- ---------------------------- 56 | INSERT INTO `doctor` VALUES (1, '王医生', '男', '外科', '5年'); 57 | INSERT INTO `doctor` VALUES (2, '李医生', '女', '内科', '8年'); 58 | INSERT INTO `doctor` VALUES (9, '小明', '男', '外科', '5年'); 59 | INSERT INTO `doctor` VALUES (10, '1', '1', '1', '1'); 60 | 61 | -- ---------------------------- 62 | -- Table structure for mrecords 63 | -- ---------------------------- 64 | DROP TABLE IF EXISTS `mrecords`; 65 | CREATE TABLE `mrecords` ( 66 | `pname` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 67 | `master` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 68 | `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 69 | `time` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 70 | `note` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL 71 | ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 72 | 73 | -- ---------------------------- 74 | -- Records of mrecords 75 | -- ---------------------------- 76 | INSERT INTO `mrecords` VALUES ('Tom', '小张', '小老鼠', '2020-6-24', '这个小老鼠容易发烧'); 77 | INSERT INTO `mrecords` VALUES ('Jerry', '小王', '大猫', '2020-6-25', '这个大猫一直想吃小老鼠'); 78 | INSERT INTO `mrecords` VALUES ('1', '1', '12', '2020-06-25', '11111'); 79 | 80 | -- ---------------------------- 81 | -- Table structure for pet 82 | -- ---------------------------- 83 | DROP TABLE IF EXISTS `pet`; 84 | CREATE TABLE `pet` ( 85 | `id` int(10) NOT NULL AUTO_INCREMENT, 86 | `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 87 | `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 88 | `bath` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 89 | `master` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 90 | PRIMARY KEY (`id`) USING BTREE 91 | ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 92 | 93 | -- ---------------------------- 94 | -- Records of pet 95 | -- ---------------------------- 96 | INSERT INTO `pet` VALUES (1, 'Tom', '小老鼠', '2020-6-21', '小张'); 97 | INSERT INTO `pet` VALUES (2, 'Jerry', '大猫', '2020-6-22', '小王'); 98 | INSERT INTO `pet` VALUES (3, 'Rate', '未知', '2020-6-23', '小张'); 99 | INSERT INTO `pet` VALUES (4, 'Fee', '大蛇', '2020-6-25', '小王'); 100 | INSERT INTO `pet` VALUES (6, '1', '12', '1', '1'); 101 | 102 | -- ---------------------------- 103 | -- Table structure for user 104 | -- ---------------------------- 105 | DROP TABLE IF EXISTS `user`; 106 | CREATE TABLE `user` ( 107 | `id` int(10) NOT NULL AUTO_INCREMENT, 108 | `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 109 | `password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 110 | `email` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 111 | PRIMARY KEY (`id`) USING BTREE 112 | ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 113 | 114 | -- ---------------------------- 115 | -- Records of user 116 | -- ---------------------------- 117 | INSERT INTO `user` VALUES (1, 'tomcat', '123456', '1111'); 118 | INSERT INTO `user` VALUES (2, 'tomcat4', '1234567', '2'); 119 | INSERT INTO `user` VALUES (5, 'tomcat2', '123455', '11@qq.com'); 120 | 121 | SET FOREIGN_KEY_CHECKS = 1; 122 | -------------------------------------------------------------------------------- /web/static/css/style.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | body { 4 | overflow: hidden; 5 | background: #e2feff; 6 | } 7 | 8 | * { 9 | margin: 0; 10 | font-family:"Microsoft Yahei"; 11 | color: #666; 12 | } 13 | 14 | div{ 15 | margin: auto; 16 | margin-bottom: 10px; 17 | margin-top: 10px; 18 | 19 | } 20 | 21 | #header { 22 | height: 20px; 23 | width: 1200px; 24 | } 25 | 26 | #main { 27 | height: 460px; 28 | width: 1200px; 29 | border: 1px black solid; 30 | overflow: auto; 31 | } 32 | 33 | #bottom { 34 | height: 30px; 35 | width: 1200px; 36 | text-align: center; 37 | } 38 | 39 | #book{ 40 | width: 100%; 41 | height: 90%; 42 | margin: auto; 43 | 44 | } 45 | 46 | .b_list{ 47 | height:300px; 48 | width:250px; 49 | margin: 20px; 50 | float: left; 51 | margin-top:0px; 52 | margin-bottom:0px; 53 | border: 1px #e3e3e3 solid; 54 | } 55 | 56 | #page_nav{ 57 | width: 100%; 58 | height: 10px; 59 | margin: auto; 60 | 61 | text-align: center; 62 | } 63 | 64 | #pn_input { 65 | width: 30px; 66 | text-align: center; 67 | } 68 | 69 | .img_div{ 70 | height: 150px; 71 | text-align: center; 72 | } 73 | 74 | .book_img { 75 | height:150px; 76 | width:150px; 77 | } 78 | 79 | .book_info { 80 | 81 | text-align: center; 82 | } 83 | 84 | .book_info div{ 85 | height: 10px; 86 | width: 300px; 87 | text-align: left; 88 | } 89 | 90 | .wel_word{ 91 | font-size: 40px; 92 | float: left; 93 | } 94 | .welword{ 95 | font-size: 60px; 96 | } 97 | 98 | .logo_img{ 99 | float: left; 100 | } 101 | 102 | #header div a { 103 | text-decoration: none; 104 | font-size: 20px; 105 | } 106 | 107 | #header div{ 108 | float: right; 109 | margin-top: 55px; 110 | } 111 | 112 | .book_cond{ 113 | margin-left: 500px; 114 | } 115 | 116 | .book_cond input{ 117 | width: 50px; 118 | text-align: center; 119 | } 120 | 121 | 122 | /*登录页面CSS样式 */ 123 | 124 | #login_header{ 125 | height: 82px; 126 | width: 1200px; 127 | } 128 | 129 | .login_banner{ 130 | height:475px; 131 | background-color: #39987c; 132 | } 133 | 134 | .login_form{ 135 | height:310px; 136 | width:406px; 137 | float: right; 138 | margin-right:50px; 139 | margin-top: 50px; 140 | background-color: #fff; 141 | } 142 | 143 | #content { 144 | height: 475px; 145 | width: 1200px; 146 | } 147 | 148 | .login_box{ 149 | margin: 20px; 150 | height: 260px; 151 | width: 366px; 152 | } 153 | 154 | h1 { 155 | font-size: 20px; 156 | } 157 | .msg_cont{ 158 | background: none repeat scroll 0 0 #fff6d2; 159 | border: 1px solid #ffe57d; 160 | color: #666; 161 | height: 18px; 162 | line-height: 18px; 163 | padding: 3px 10px 3px 40px; 164 | position: relative; 165 | border: none; 166 | } 167 | 168 | .msg_cont b { 169 | background: url("../img/pwd-icons-new.png") no-repeat scroll -104px -22px rgba(0, 0, 0, 0); 170 | display: block; 171 | height: 17px; 172 | left: 10px; 173 | margin-top: -8px; 174 | overflow: hidden; 175 | position: absolute; 176 | top: 50%; 177 | width: 16px; 178 | } 179 | 180 | .form .itxt { 181 | border: 0 none; 182 | float: none; 183 | font-family: "宋体"; 184 | font-size: 14px; 185 | height: 36px; 186 | line-height: 18px; 187 | overflow: hidden; 188 | padding: 10px 0 10px 10px; 189 | width: 220px; 190 | border: 1px #e3e3e3 solid; 191 | } 192 | 193 | #sub_btn{ 194 | background-color: #39987c; 195 | border: none; 196 | color: #fff; 197 | width: 360px; 198 | height: 40px; 199 | } 200 | 201 | #l_content { 202 | float: left; 203 | margin-top: 150px; 204 | margin-left: 300px; 205 | } 206 | 207 | #l_content span { 208 | font-size: 60px; 209 | color: white; 210 | } 211 | 212 | .tit h1 { 213 | float: left; 214 | margin-top: 5px; 215 | } 216 | 217 | .tit a { 218 | float: right; 219 | margin-left: 10px; 220 | margin-top: 10px; 221 | color: red; 222 | text-decoration: none; 223 | } 224 | 225 | .tit .errorMsg { 226 | float: right; 227 | margin-left: 10px; 228 | margin-top: 10px; 229 | color: red; 230 | } 231 | 232 | .tit { 233 | height: 30px; 234 | } 235 | /*购物车*/ 236 | #main table{ 237 | margin: auto; 238 | margin-top: 80px; 239 | border-collapse: collapse; 240 | } 241 | 242 | #main table td{ 243 | width: 120px; 244 | text-align:center; 245 | border-bottom: 1px #e3e3e3 solid; 246 | padding: 10px; 247 | } 248 | 249 | .cart_info{ 250 | width: 700px; 251 | text-align: right; 252 | } 253 | 254 | .cart_span { 255 | margin-left: 20px; 256 | } 257 | 258 | .cart_span span{ 259 | color: red; 260 | font-size: 20px; 261 | margin: 10px; 262 | } 263 | 264 | .cart_span a , td a{ 265 | font-size: 20px; 266 | color: blue; 267 | } 268 | 269 | #header div span { 270 | margin: 10px; 271 | } 272 | 273 | #header div .um_span{ 274 | color: red; 275 | font-size: 25px; 276 | margin: 10px; 277 | } 278 | 279 | #header div a { 280 | color: blue; 281 | } 282 | 283 | .errorMsg { 284 | margin-left: 10px; 285 | margin-top: 10px; 286 | color: red; 287 | } 288 | .login_click{ margin-top:32px; height:40px;} 289 | .login_click a 290 | { 291 | 292 | 293 | text-decoration:none; 294 | background:#2f435e; 295 | color:#f2f2f2; 296 | 297 | padding: 10px 30px 10px 30px; 298 | font-size:16px; 299 | font-family: 微软雅黑,宋体,Arial,Helvetica,Verdana,sans-serif; 300 | font-weight:bold; 301 | border-radius:3px; 302 | 303 | -webkit-transition:all linear 0.30s; 304 | -moz-transition:all linear 0.30s; 305 | transition:all linear 0.30s; 306 | 307 | } 308 | .login_click a:hover { background:#385f9e; } 309 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/static/css/style.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | body { 4 | overflow: hidden; 5 | background: #e2feff; 6 | } 7 | 8 | * { 9 | margin: 0; 10 | font-family:"Microsoft Yahei"; 11 | color: #666; 12 | } 13 | 14 | div{ 15 | margin: auto; 16 | margin-bottom: 10px; 17 | margin-top: 10px; 18 | 19 | } 20 | 21 | #header { 22 | height: 20px; 23 | width: 1200px; 24 | } 25 | 26 | #main { 27 | height: 460px; 28 | width: 1200px; 29 | border: 1px black solid; 30 | overflow: auto; 31 | } 32 | 33 | #bottom { 34 | height: 30px; 35 | width: 1200px; 36 | text-align: center; 37 | } 38 | 39 | #book{ 40 | width: 100%; 41 | height: 90%; 42 | margin: auto; 43 | 44 | } 45 | 46 | .b_list{ 47 | height:300px; 48 | width:250px; 49 | margin: 20px; 50 | float: left; 51 | margin-top:0px; 52 | margin-bottom:0px; 53 | border: 1px #e3e3e3 solid; 54 | } 55 | 56 | #page_nav{ 57 | width: 100%; 58 | height: 10px; 59 | margin: auto; 60 | 61 | text-align: center; 62 | } 63 | 64 | #pn_input { 65 | width: 30px; 66 | text-align: center; 67 | } 68 | 69 | .img_div{ 70 | height: 150px; 71 | text-align: center; 72 | } 73 | 74 | .book_img { 75 | height:150px; 76 | width:150px; 77 | } 78 | 79 | .book_info { 80 | 81 | text-align: center; 82 | } 83 | 84 | .book_info div{ 85 | height: 10px; 86 | width: 300px; 87 | text-align: left; 88 | } 89 | 90 | .wel_word{ 91 | font-size: 40px; 92 | float: left; 93 | } 94 | .welword{ 95 | font-size: 60px; 96 | } 97 | 98 | .logo_img{ 99 | float: left; 100 | } 101 | 102 | #header div a { 103 | text-decoration: none; 104 | font-size: 20px; 105 | } 106 | 107 | #header div{ 108 | float: right; 109 | margin-top: 55px; 110 | } 111 | 112 | .book_cond{ 113 | margin-left: 500px; 114 | } 115 | 116 | .book_cond input{ 117 | width: 50px; 118 | text-align: center; 119 | } 120 | 121 | 122 | /*登录页面CSS样式 */ 123 | 124 | #login_header{ 125 | height: 82px; 126 | width: 1200px; 127 | } 128 | 129 | .login_banner{ 130 | height:475px; 131 | background-color: #39987c; 132 | } 133 | 134 | .login_form{ 135 | height:310px; 136 | width:406px; 137 | float: right; 138 | margin-right:50px; 139 | margin-top: 50px; 140 | background-color: #fff; 141 | } 142 | 143 | #content { 144 | height: 475px; 145 | width: 1200px; 146 | } 147 | 148 | .login_box{ 149 | margin: 20px; 150 | height: 260px; 151 | width: 366px; 152 | } 153 | 154 | h1 { 155 | font-size: 20px; 156 | } 157 | .msg_cont{ 158 | background: none repeat scroll 0 0 #fff6d2; 159 | border: 1px solid #ffe57d; 160 | color: #666; 161 | height: 18px; 162 | line-height: 18px; 163 | padding: 3px 10px 3px 40px; 164 | position: relative; 165 | border: none; 166 | } 167 | 168 | .msg_cont b { 169 | background: url("../img/pwd-icons-new.png") no-repeat scroll -104px -22px rgba(0, 0, 0, 0); 170 | display: block; 171 | height: 17px; 172 | left: 10px; 173 | margin-top: -8px; 174 | overflow: hidden; 175 | position: absolute; 176 | top: 50%; 177 | width: 16px; 178 | } 179 | 180 | .form .itxt { 181 | border: 0 none; 182 | float: none; 183 | font-family: "宋体"; 184 | font-size: 14px; 185 | height: 36px; 186 | line-height: 18px; 187 | overflow: hidden; 188 | padding: 10px 0 10px 10px; 189 | width: 220px; 190 | border: 1px #e3e3e3 solid; 191 | } 192 | 193 | #sub_btn{ 194 | background-color: #39987c; 195 | border: none; 196 | color: #fff; 197 | width: 360px; 198 | height: 40px; 199 | } 200 | 201 | #l_content { 202 | float: left; 203 | margin-top: 150px; 204 | margin-left: 300px; 205 | } 206 | 207 | #l_content span { 208 | font-size: 60px; 209 | color: white; 210 | } 211 | 212 | .tit h1 { 213 | float: left; 214 | margin-top: 5px; 215 | } 216 | 217 | .tit a { 218 | float: right; 219 | margin-left: 10px; 220 | margin-top: 10px; 221 | color: red; 222 | text-decoration: none; 223 | } 224 | 225 | .tit .errorMsg { 226 | float: right; 227 | margin-left: 10px; 228 | margin-top: 10px; 229 | color: red; 230 | } 231 | 232 | .tit { 233 | height: 30px; 234 | } 235 | /*购物车*/ 236 | #main table{ 237 | margin: auto; 238 | margin-top: 80px; 239 | border-collapse: collapse; 240 | } 241 | 242 | #main table td{ 243 | width: 120px; 244 | text-align:center; 245 | border-bottom: 1px #e3e3e3 solid; 246 | padding: 10px; 247 | } 248 | 249 | .cart_info{ 250 | width: 700px; 251 | text-align: right; 252 | } 253 | 254 | .cart_span { 255 | margin-left: 20px; 256 | } 257 | 258 | .cart_span span{ 259 | color: red; 260 | font-size: 20px; 261 | margin: 10px; 262 | } 263 | 264 | .cart_span a , td a{ 265 | font-size: 20px; 266 | color: blue; 267 | } 268 | 269 | #header div span { 270 | margin: 10px; 271 | } 272 | 273 | #header div .um_span{ 274 | color: red; 275 | font-size: 25px; 276 | margin: 10px; 277 | } 278 | 279 | #header div a { 280 | color: blue; 281 | } 282 | 283 | .errorMsg { 284 | margin-left: 10px; 285 | margin-top: 10px; 286 | color: red; 287 | } 288 | .login_click{ margin-top:32px; height:40px;} 289 | .login_click a 290 | { 291 | 292 | 293 | text-decoration:none; 294 | background:#2f435e; 295 | color:#f2f2f2; 296 | 297 | padding: 10px 30px 10px 30px; 298 | font-size:16px; 299 | font-family: 微软雅黑,宋体,Arial,Helvetica,Verdana,sans-serif; 300 | font-weight:bold; 301 | border-radius:3px; 302 | 303 | -webkit-transition:all linear 0.30s; 304 | -moz-transition:all linear 0.30s; 305 | transition:all linear 0.30s; 306 | 307 | } 308 | .login_click a:hover { background:#385f9e; } 309 | -------------------------------------------------------------------------------- /web/pages/amdoctor/inquireDor.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 16:59 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 查询兽医信息 12 | <%@include file="/dir/base.jsp"%> 13 | 61 | 92 | 93 | 94 | 99 |



100 |
101 |      102 | 103 |     104 | 105 |     106 | 107 | 108 |
109 | 110 |



111 |
112 |
113 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 114 |
115 |
116 |
117 |
118 | 119 |
120 | 121 | 122 |       123 | 125 | 126 |
127 |
128 |
129 | 130 |
131 |


132 | 133 | 134 |       135 | 137 |
138 |
139 |











140 | 141 |
142 | 143 | 宠物系统.zc ©2020 144 | 145 |
146 | 147 | 148 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/amdoctor/inquireDor.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 16:59 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 查询兽医信息 12 | <%@include file="/dir/base.jsp"%> 13 | 61 | 92 | 93 | 94 | 99 |



100 |
101 |      102 | 103 |     104 | 105 |     106 | 107 | 108 |
109 | 110 |



111 |
112 |
113 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 114 |
115 |
116 |
117 |
118 | 119 |
120 | 121 | 122 |       123 | 125 | 126 |
127 |
128 |
129 | 130 |
131 |


132 | 133 | 134 |       135 | 137 |
138 |
139 |











140 | 141 |
142 | 143 | 宠物系统.zc ©2020 144 | 145 |
146 | 147 | 148 | -------------------------------------------------------------------------------- /web/pages/mandp/addmaster.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 添加客户信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 101 | 102 | 103 | 108 |



109 |
110 |      111 | 112 |     113 | 114 |     115 | 116 | 117 |
118 |



119 |
120 | 121 |
122 | 123 |


124 | 125 |


126 | 127 |


128 | 129 |


130 |
131 | 133 |
134 |
135 |
136 |







137 |
138 | 139 | 宠物系统.zc ©2020 140 | 141 |
142 | 143 | 144 | -------------------------------------------------------------------------------- /web/pages/mandp/inquiremap.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 16:59 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 查询兽医信息 12 | <%@include file="/dir/base.jsp"%> 13 | 61 | 92 | 93 | 94 | 99 |



100 |
101 |      102 | 103 |     104 | 105 |     106 | 107 | 108 |
109 | 110 |



111 |
112 |
113 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 114 |
115 |
116 |
117 |
118 | 119 |
120 | 121 | 122 |       123 | 125 | 126 |
127 |
128 |
129 | 130 |
131 |


132 | 133 | 134 |       135 | 137 |
138 |
139 |











140 | 141 |
142 | 143 | 宠物系统.zc ©2020 144 | 145 |
146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/mandp/addmaster.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 添加客户信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 101 | 102 | 103 | 108 |



109 |
110 |      111 | 112 |     113 | 114 |     115 | 116 | 117 |
118 |



119 |
120 | 121 |
122 | 123 |


124 | 125 |


126 | 127 |


128 | 129 |


130 |
131 | 133 |
134 |
135 |
136 |







137 |
138 | 139 | 宠物系统.zc ©2020 140 | 141 |
142 | 143 | 144 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/mandp/inquiremap.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 16:59 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 查询兽医信息 12 | <%@include file="/dir/base.jsp"%> 13 | 61 | 92 | 93 | 94 | 99 |



100 |
101 |      102 | 103 |     104 | 105 |     106 | 107 | 108 |
109 | 110 |



111 |
112 |
113 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 114 |
115 |
116 |
117 |
118 | 119 |
120 | 121 | 122 |       123 | 125 | 126 |
127 |
128 |
129 | 130 |
131 |


132 | 133 | 134 |       135 | 137 |
138 |
139 |











140 | 141 |
142 | 143 | 宠物系统.zc ©2020 144 | 145 |
146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /web/pages/mandp/inquireres.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.List" %> 2 | <%@ page import="bean.pet" %><%-- 3 | Created by IntelliJ IDEA. 4 | User: 14371 5 | Date: 2020/6/8 6 | Time: 16:39 7 | To change this template use File | Settings | File Templates. 8 | --%> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | 11 | 12 | <%@include file="/dir/base.jsp"%> 13 | 查询信息 14 | 92 | 93 | 118 | 119 | 120 | 121 | 126 | 127 |



128 |
129 |      130 | 131 |     132 | 133 |     134 | 135 |
136 | 137 |
138 |

139 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
宠物名称所有人名称
${pets.name}${pets.master}
153 |


154 | 155 | 156 |
157 | 158 | 宠物系统.zc ©2020 159 | 160 |
161 | 162 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/mandp/inquireres.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.List" %> 2 | <%@ page import="bean.pet" %><%-- 3 | Created by IntelliJ IDEA. 4 | User: 14371 5 | Date: 2020/6/8 6 | Time: 16:39 7 | To change this template use File | Settings | File Templates. 8 | --%> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | 11 | 12 | <%@include file="/dir/base.jsp"%> 13 | 查询信息 14 | 92 | 93 | 118 | 119 | 120 | 121 | 126 | 127 |



128 |
129 |      130 | 131 |     132 | 133 |     134 | 135 |
136 | 137 |
138 |

139 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
宠物名称所有人名称
${pets.name}${pets.master}
153 |


154 | 155 | 156 |
157 | 158 | 宠物系统.zc ©2020 159 | 160 |
161 | 162 | -------------------------------------------------------------------------------- /web/pages/amdoctor/aminfor.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 16:39 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <%@include file="/dir/base.jsp"%> 12 | 兽医信息 13 | 86 | 87 | 112 | 113 | 114 | 115 | 120 | 121 |



122 |
123 |      124 | 125 |     126 | 127 |     128 | 129 |
130 | 131 |
132 |

133 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
编号名称性别部门从业时间
${doctor.id}${doctor.name}${doctor.sex}${doctor.bumen}${doctor.time}
153 |


154 | <%--
--%> 155 | <%--









--%> 156 | <%--
--%> 157 | <%-- 兽医信息页--%> 158 | <%--
--%> 159 | <%--









--%> 160 | <%--
--%> 161 |
162 | 163 | 宠物系统.zc ©2020 164 | 165 |
166 | 167 | 168 | -------------------------------------------------------------------------------- /web/pages/amdoctor/addamdor.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 添加兽医信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 101 | 102 | 103 | 108 |



109 |
110 |      111 | 112 |     113 | 114 |     115 | 116 | 117 |
118 |



119 |
120 |
121 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 122 |
123 |
124 |
125 |
126 | 127 |
128 | 129 |


130 | 131 |


132 | 133 |


134 | 135 |


136 |
137 | 139 |
140 |
141 |
142 |







143 |
144 | 145 | 宠物系统.zc ©2020 146 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/amdoctor/aminfor.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/8 5 | Time: 16:39 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <%@include file="/dir/base.jsp"%> 12 | 兽医信息 13 | 86 | 87 | 112 | 113 | 114 | 115 | 120 | 121 |



122 |
123 |      124 | 125 |     126 | 127 |     128 | 129 |
130 | 131 |
132 |

133 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
编号名称性别部门从业时间
${doctor.id}${doctor.name}${doctor.sex}${doctor.bumen}${doctor.time}
153 |


154 | <%--
--%> 155 | <%--









--%> 156 | <%--
--%> 157 | <%-- 兽医信息页--%> 158 | <%--
--%> 159 | <%--









--%> 160 | <%--
--%> 161 |
162 | 163 | 宠物系统.zc ©2020 164 | 165 |
166 | 167 | 168 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/amdoctor/addamdor.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 添加兽医信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 101 | 102 | 103 | 108 |



109 |
110 |      111 | 112 |     113 | 114 |     115 | 116 | 117 |
118 |



119 |
120 |
121 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 122 |
123 |
124 |
125 |
126 | 127 |
128 | 129 |


130 | 131 |


132 | 133 |


134 | 135 |


136 |
137 | 139 |
140 |
141 |
142 |







143 |
144 | 145 | 宠物系统.zc ©2020 146 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /web/pages/mandp/addpet.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 添加宠物信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 101 | 102 | 103 | 108 |



109 |
110 |      111 | 112 |     113 | 114 |     115 | 116 | 117 |
118 |



119 |
120 |
121 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 122 |
123 |
124 |
125 |
126 | 127 |
128 | 129 |


130 | 131 |


132 | 133 |


134 | 135 |


136 |
137 | 139 |
140 |
141 |
142 |







143 |
144 | 145 | 宠物系统.zc ©2020 146 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/mandp/addpet.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 添加宠物信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 101 | 102 | 103 | 108 |



109 |
110 |      111 | 112 |     113 | 114 |     115 | 116 | 117 |
118 |



119 |
120 |
121 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 122 |
123 |
124 |
125 |
126 | 127 |
128 | 129 |


130 | 131 |


132 | 133 |


134 | 135 |


136 |
137 | 139 |
140 |
141 |
142 |







143 |
144 | 145 | 宠物系统.zc ©2020 146 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /web/pages/mandp/updateCus.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 更新顾客信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 98 | 99 | 100 | 105 |



106 |
107 |      108 | 109 |     110 | 111 |     112 | 113 | 114 |
115 |



116 |
117 |
118 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 119 |
120 |
121 |
122 |
123 | 124 |
125 | 126 | 127 |


128 | 129 |


130 | 131 |


132 | 133 |


134 |
135 | 137 |      138 | 140 |
141 |
142 |
143 |







144 |
145 | 146 | 宠物系统.zc ©2020 147 | 148 |
149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /out/artifacts/_war_exploded/pages/mandp/updateCus.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: 14371 4 | Date: 2020/6/9 5 | Time: 14:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 更新顾客信息 12 | <%@include file="/dir/base.jsp"%> 13 | 63 | 64 | 98 | 99 | 100 | 105 |



106 |
107 |      108 | 109 |     110 | 111 |     112 | 113 | 114 |
115 |



116 |
117 |
118 | <%=request.getAttribute("mgs1")==null?"":request.getAttribute("mgs1")%> 119 |
120 |
121 |
122 |
123 | 124 |
125 | 126 | 127 |


128 | 129 |


130 | 131 |


132 | 133 |


134 |
135 | 137 |      138 | 140 |
141 |
142 |
143 |







144 |
145 | 146 | 宠物系统.zc ©2020 147 | 148 |
149 | 150 | 151 | 152 | --------------------------------------------------------------------------------