基于javaweb+jsp的宠物医院管理系统(java+Springboot+ssm+mysql+jsp+maven)

基于javaweb+jsp的宠物医院管理系统(java+Springboot+ssm+mysql+jsp+maven)
一、项目简述
功能描叙: 医生信息,客户信息,宠物管理,浏览管理,诊断管理, 医生管理,用户管理等等模块。

二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)

项目技术: JSP +Springboot+ SpringMVC + MyBatis + ThymeLeaf + HTML+ JavaScript + JQuery + Ajax + maven等等

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

	 * Method name: addUserPage <BR>
	 * Description: 增加用户界面 <BR>
	 * 
	 * @return String<BR>
	 */
	@RequestMapping(value = "/addUserPage")
	public String addUserPage(Long userId, Model model) {
		model.addAttribute("manageUser", userId);
		if (null != userId) {
			User user = userService.selectByPrimaryKey(userId);
			model.addAttribute("manageUser", user);
		}
		return "sa/userAdd";
	}
	/**
	 * Method name: checkUserId <BR>
		return "tu2";
	}
	@RequestMapping(value = "/demo/tu3", method = RequestMethod.GET)
	public String tu3() {
		return "tu3";
	}
/**演示页面**/
	/**
	 * Method name: logout <BR>
	 * Description: 退出登录 <BR>
	 * @return String<BR>
	 */
	@RequestMapping(value = "/logout", method = RequestMethod.GET)
	public Object getPageByRole(Integer roleId) {
		return pageService.getAllPageByRoleId(roleId);
	}
	/**
	 * Method name: updatePageById <BR>
	 * Description: 根据页面id更新页面 <BR>
	 * 
	 * @param page
	 * @return ResultMap<BR>
	 */
	@RequestMapping("/updatePageById")
	@ResponseBody
	public ResultMap updatePageById(Page page) {
		return pageService.updatePageById(page);
	}
	public Object getAllUserByRoleId(Integer roleId, String roleNot, Integer page, Integer limit) {
		if (null == roleNot) {
			return userService.getAllUserByRoleId(roleId, page, limit);
		}
		return userService.getAllUserByNotRoleId(roleId, page, limit);
	}
	/**
	 * Method name: delUserRoleByUserIdAndRoleId <BR>
	 * Description: 根据用户id权限id删除用户权限表 <BR>
	 * 
	 * @param userId
	 * @param roleId
	 * @return ResultMap<BR>
	 */
	@RequestMapping("/delUserRoleByUserIdAndRoleId")
	@ResponseBody
	public ResultMap delUserRoleByUserIdAndRoleId(String userId, Integer roleId) {
		return userRoleService.delUserRoleByUserIdAndRoleId(userId, roleId);
	}
	/**
	 * Method name: selectUserRole <BR>
	 * Description: 跳转到选择用户角色页面 <BR>
	 * 
	 * @return List<Page><BR>
	 */
	@RequestMapping("/getAllPage")
	@ResponseBody
	public List<Page> getAllPage() {
		return pageService.getAllPage();
	}
	/**
	 * Method name: getPageByRole <BR>
	 * Description: 获取某个角色的权限页面 <BR>
	 */
	@RequestMapping("/getPageByRole")
		if (flag1 && flag2 && flag3) {
			return "SUCCESS";
		}
		return "ERROR";
	}
	/**
	 * Method name: updateRole <BR>
	 * Description: 根据权限id修改权限信息 <BR>
	 * 
	 * @param id
	 * @param name
	 * @return String<BR>
	 */
	@RequestMapping("/updateRole")
	@ResponseBody
			User u = userService.getUserByPhoneAndName(user.getPhone(), user.getName());
			String[] ids = new String[1];
			ids[0] = u.getId()+"";
			// 医生角色
			userRoleService.addUserRole(3, ids);
			return "SUCCESS";
		} catch (Exception e) {
			return "ERR";
		}
	}
	/**
	 * Method name: updateUser <BR>
	 * Description: 更新用户 <BR>
	 * 
	 * @param user
	 * @return String<BR>
	 */
	@RequestMapping(value = "/login")
	@ResponseBody
	public ResultMap login(String username, String password) {
		return userService.login(username, password);
	}
	/**
	 * Method name: login <BR>
	 * Description: 登录页面 <BR>
	 * 
	 * @return String login.html<BR>
	 */
	@RequestMapping(value = "/index")
	public String login() {
		return "login";
	 * Method name: addRole <BR>
	 * Description: 增加角色 <BR>
	 * 
	 * @param name
	 * @return String<BR>
	 */
	@RequestMapping("/addRole")
	@ResponseBody
	public String addRole(String name) {
		return roleService.addRole(name);
	}
	/**
	 * Method name: delManageRole <BR>
	 * Description: 根据角色id删除角色 <BR>
	 * 
	 * @param id
	@ResponseBody
	public List<Page> getAllPage() {
		return pageService.getAllPage();
	}
	/**
	 * Method name: getPageByRole <BR>
	 * Description: 获取某个角色的权限页面 <BR>
	 */
	@RequestMapping("/getPageByRole")
	@ResponseBody
	public Object getPageByRole(Integer roleId) {
		return pageService.getAllPageByRoleId(roleId);
	}
		Subject subject = SecurityUtils.getSubject();
		User user = (User) subject.getPrincipal();
		if (null != user) {
			logger.info("{}---退出登录!", user.getName());
		}
		subject.logout();
		return "login";
	}
	/**
	 * Method name: login <BR>
	 * Description: 获取所有页面 <BR>
	 * 
	 * @return List<Page><BR>
	 */
	@RequestMapping("/getAllPage")
	@ResponseBody
	public List<Page> getAllPage() {
		return pageService.getAllPage();
	}
	/**
	 * Description: 检测用户账号是否存在 <BR>
	 * 
	 * @param userId
	 * @return User<BR>
	 */
	@ResponseBody
	@RequestMapping("/checkUserId")
	public User checkUserId(Long userId) {
		return userService.selectByPrimaryKey(userId);
	}
	/**
	 * Method name: addUser <BR>
	 * Description: 用户添加 <BR>
	 * 
	 * @param user
	 * @return String<BR>
	 */
	@ResponseBody
	@RequestMapping("/addUser")
	public String addUser(User user) {
	 */
	@RequestMapping(value = "/main")
	public String main(Model model) {
		Subject subject = SecurityUtils.getSubject();
		User user = (User) subject.getPrincipal();
		if (null != user) {
			model.addAttribute("user", user);
		} else {
			return "login";
		}
		List<Page> pageList = pageService.getAllRolePageByUserId(user.getId()+"");
		model.addAttribute("pageList", pageList);
		return "index";
	/**
	 * Method name: getAllDelUserByLimit <BR>
	 * Description: 获取所有删除用户 <BR>
	 * 
	 * @param userParameter
	 * @return Object<BR>
	 */
	@RequestMapping("/getAllDelUserByLimit")
	@ResponseBody
	public Object getAllDelUserByLimit(UserParameter userParameter) {
		return userService.getAllDelUserByLimit(userParameter);
	}
	/**
	 * Method name: delUser <BR>
	 * Description: 批量删除用户 <BR>
	 * 
	 * @param ids
	 * @return String<BR>
	 */
	@RequestMapping(value = "delUser")
	@ResponseBody
	@Transactional
		}
		List<Page> pageList = pageService.getAllRolePageByUserId(user.getId()+"");
		model.addAttribute("pageList", pageList);
		return "index";
	}
	/**
	 * Method name: checkUserPassword <BR>
	 * Description: 检测旧密码是否正确 <BR>
	 * 
	 * @param password 旧密码
	 * @return boolean 是否正确<BR>
	 */
	@RequestMapping(value = "/user/checkUserPassword")
	@ResponseBody
	public boolean checkUserPassword(String password) {
}
登录控制类:
/**
 * 登录控制类
 */
@Controller("OpenLogin")
@RequestMapping()
public class LoginController {
	@Autowired
	private ResultMap resultMap;
	@Autowired
	@ResponseBody
	@RequestMapping("/checkUserId")
	public User checkUserId(Long userId) {
		return userService.selectByPrimaryKey(userId);
	}
	/**
	 * Method name: addUser <BR>
	 * Description: 用户添加 <BR>
	 * 
	 * @param user
	 * @return String<BR>
	 */
	@ResponseBody
	@RequestMapping("/addUser")
	public String addUser(User user) {
		try {
			user.setPassword(MD5.md5(user.getPassword()));
			user.setCreateTime(new Date());
			userService.addUser(user);
        }
        return "user/userEdit";
    }
    /**
     * 更新数据库
     */
    @ResponseBody
    @RequestMapping("/updateUser")
    public String updateUser(User user) {
        return userService.updateUser(user);
    }
}
管理员权限控制类:
/**
 * 管理员权限控制类
 */
		}
		return "sa/userAdd";
	}
	/**
	 * Method name: checkUserId <BR>
	 * Description: 检测用户账号是否存在 <BR>
	 * 
	 * @param userId
	 * @return User<BR>
	 */
	@ResponseBody
	@RequestMapping("/checkUserId")
	public User checkUserId(Long userId) {
		return userService.selectByPrimaryKey(userId);
	}
	/**
	 * Method name: addUser <BR>
	 * Description: 用户添加 <BR>
	 * 
	 * @param user
    private final ResultMap resultMap;
    @Autowired
    private UserService userService;
    @Autowired
    private UserRoleService userRoleService;
    @Autowired
    public UserController(ResultMap resultMap) {
        this.resultMap = resultMap;
    }
    /**
     * 返回有权限信息
     */
    @RequestMapping(value = "/getMessage", method = RequestMethod.GET)
    public ResultMap getMessage() {
        return resultMap.success().message("您拥有用户权限,可以获得该接口的信息!");
    }
    /**
     * 修改用户信息页面user/userEdit.html
     */
    @RequestMapping(value = "/editUserPage")
	 * @param password 密码
	 * @return ResultMap<BR>
	 */
	@RequestMapping(value = "/login")
	@ResponseBody
	public ResultMap login(String username, String password) {
		return userService.login(username, password);
	}
	/**
	 * Method name: login <BR>
	 * Description: 登录页面 <BR>
	 * 
	 * @return String login.html<BR>
	 */
	@RequestMapping(value = "/index")
		// 删除某个角色的所有用户
		boolean flag3 = userRoleService.delUserRoleByRoleId(id);
		if (flag1 && flag2 && flag3) {
			return "SUCCESS";
		}
		return "ERROR";
	}
	/**
	 * Method name: updateRole <BR>
	 * Description: 根据权限id修改权限信息 <BR>
		if (n != 0) {
			return "SUCCESS";
		}
		return "ERROR";
	}
	/**
	 * Method name: addPageRoleByRoleId <BR>
	 * Description: 增加某个角色的权限页面 <BR>
	 * 
	 * @param roleId
	 * Description: 退出登录 <BR>
	 * @return String<BR>
	 */
	@RequestMapping(value = "/logout", method = RequestMethod.GET)
	public String logout() {
		Subject subject = SecurityUtils.getSubject();
		User user = (User) subject.getPrincipal();
		if (null != user) {
			logger.info("{}---退出登录!", user.getName());
		}
		subject.logout();
		return "login";
	}
	/**
 * 管理员权限控制类
 */
@Controller("Admin")
@RequestMapping("/admin")
public class Adminontroller {
	@Autowired
	private PageService pageService;
	@Autowired
	private RoleService roleService;
	@Autowired
	private PageRoleService pageRoleService;
	@Autowired
	private UserRoleService userRoleService;
	@Autowired
	 * @return String<BR>
	 */
	@RequestMapping(value = "delUser")
	@ResponseBody
	@Transactional
	public String delUser(Long[] ids) {
		Subject subject = SecurityUtils.getSubject();
		User user = (User) subject.getPrincipal();
		try {
			for (Long id : ids) {
				if (id.equals(user.getId())) {
					return "DontOP";
				}
				userService.delUserById(id);
			}
			return "SUCCESS";
		} catch (Exception e) {
			logger.error("根据用户id更新用户异常", e);
			TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
			return "ERROR";
		}
	}
	/**
	@RequestMapping(value = "/demo/tu2", method = RequestMethod.GET)
	public String tu2() {
		return "tu2";
	}
	@RequestMapping(value = "/demo/tu3", method = RequestMethod.GET)
	public String tu3() {
		return "tu3";
	}
/**演示页面**/
	/**
	 * Method name: logout <BR>
	 * Description: 退出登录 <BR>
	 * @return String<BR>
	 */
		}
		List<Page> pageList = pageService.getAllRolePageByUserId(user.getId()+"");
		model.addAttribute("pageList", pageList);
		return "index";
	}
	/**
	 * Method name: checkUserPassword <BR>
	 * Description: 检测旧密码是否正确 <BR>
	 * 
	 * @param password 旧密码
	 * @return boolean 是否正确<BR>
	 */
	@RequestMapping(value = "/user/checkUserPassword")
	@ResponseBody
	public boolean checkUserPassword(String password) {
		return userService.checkUserPassword(password);
	}
	/**
	 * Method name: updatePassword <BR>
	 * Description: 更新密码 <BR>
	 * 
	 * @param password 旧密码

这是基于JAVAweb宠物管理系统。 资源包里包含了所有完整源码、包含环境安装包、环境搭建运行测试视频。 一、设计需求 本系统主要是由RFID自动识别技术,通过无线射频方式对宠物的电子标签进行读取,获取宠物的基本信息和在店内的所有消费,然后将数据通过网络传输至服务器。在应用层开发一个管理系统,对宠物信息、店内消费等各种行为进行管理。同时系统需有登录注册功能,宠物信息管理,店内消费管理等功能。 宠物管理系统主要分为以下模块: 1.RFID模块:由天线和射频电路组成,通过自动识别电子标签,采集数据,采用RFID封装技术将其封装,并传输给服务器。 2.电子标签模块:接收外部信号和发送信号 3.店铺管理模块:管理员可以对店铺商品进行增删改操作,修改、删除顾客宠物信息以及店内消费行为。 4.登录注册模块:新用户可以进行注册和登录5.用户管理模块:对注册用户进行管理 二、设计需求总结 整个系统的设计: (1). 宠物店每来一个新的宠物,就在软件端进行注册、注册时填入宠物的名称,宠物的类型,主人的电话号码、选择一张宠物的图片方便后面展示(图片可以预存几张猫、狗即可)、如果宠物后面在店里有消费也会记录包含时间,这些数据都保存在软件端的数据库里。 (2). 开卡: 新宠物注册之后,需要为这个宠物办理一张电子标签卡,这个卡里存放着这个宠物主人的电话号码,后面要查询这个宠物的信息,就读取整个电子标签里的电话号码,到数据库里查询。 (3). 开卡和查询的数据传输: 设备端与软件端采用 TCP网络方式进行通信;设备端当做TCP客户端,软件端当做TCP服务器;当设备端查询宠物的电子标签时,设备端读取电话号码之后,会通过约定的数据格式通过网络传递给软件端。 当软件端开卡注册时,也会用约定好的数据格式传递给设备端,如果设备端收到数据,开发板上的LED会点亮;这时把IC拿到RC522射频模块上刷一下即可;如果成功写入LED灯就会关闭。 (4). 软件端的设计(这个软件是给店家用的,功能都是针对店家这边方向开发): 有注册界面、登录界面; 主界面上显示店内有所有注册过的宠物信息,每个宠物有图片进行显示、宠物图片下面就显示宠物的名称; 商品界面: 展示一些狗粮、猫粮、药剂、一些宠物周边物品。 用于演示消费功能。 可以预定几个商品即可。 用户可以自己动态添加修改。 管理员界面: 可以对店内的商品进行添加、设计价格、修改宠物的信息等。 查询页面: 输入宠物信息可以查询这个宠物在店里的所有详细信息。
这是基于JAVAweb宠物管理系统完整源码。 一、任务书设计需求 本系统主要是由RFID自动识别技术,通过无线射频方式对宠物的电子标签进行读取,获取宠物的基本信息和在店内的所有消费,然后将数据通过网络传输至服务器。在应用层开发一个管理系统,对宠物信息、店内消费等各种行为进行管理。同时系统需有登录注册功能,宠物信息管理,店内消费管理等功能。 宠物管理系统主要分为以下模块: 1.RFID模块:由天线和射频电路组成,通过自动识别电子标签,采集数据,采用RFID封装技术将其封装,并传输给服务器。 2.电子标签模块:接收外部信号和发送信号 3.店铺管理模块:管理员可以对店铺商品进行增删改操作,修改、删除顾客宠物信息以及店内消费行为。 4.登录注册模块:新用户可以进行注册和登录5.用户管理模块:对注册用户进行管理 二、设计需求总结 整个系统的设计: (1). 宠物店每来一个新的宠物,就在软件端进行注册、注册时填入宠物的名称,宠物的类型,主人的电话号码、选择一张宠物的图片方便后面展示(图片可以预存几张猫、狗即可)、如果宠物后面在店里有消费也会记录包含时间,这些数据都保存在软件端的数据库里。 (2). 开卡: 新宠物注册之后,需要为这个宠物办理一张电子标签卡,这个卡里存放着这个宠物主人的电话号码,后面要查询这个宠物的信息,就读取整个电子标签里的电话号码,到数据库里查询。 (3). 开卡和查询的数据传输: 设备端与软件端采用 TCP网络方式进行通信;设备端当做TCP客户端,软件端当做TCP服务器;当设备端查询宠物的电子标签时,设备端读取电话号码之后,会通过约定的数据格式通过网络传递给软件端。 当软件端开卡注册时,也会用约定好的数据格式传递给设备端,如果设备端收到数据,开发板上的LED会点亮;这时把IC拿到RC522射频模块上刷一下即可;如果成功写入LED灯就会关闭。 (4). 软件端的设计(这个软件是给店家用的,功能都是针对店家这边方向开发): 有注册界面、登录界面; 主界面上显示店内有所有注册过的宠物信息,每个宠物有图片进行显示、宠物图片下面就显示宠物的名称; 商品界面: 展示一些狗粮、猫粮、药剂、一些宠物周边物品。 用于演示消费功能。 可以预定几个商品即可。 用户可以自己动态添加修改。 管理员界面: 可以对店内的商品进行添加、设计价格、修改宠物的信息等。 查询页面: 输入宠物信息可以查询这个宠物在店里的所有详细信息。 ---根据实际情况动态修改、设计---- 软件端与硬件端的数据格式: (1). 开卡注册数据格式-字符串(软件--->设备): register:13800138000 (2). 设备查询上传的数据格式-字符串(设备--->软件): query:13800138000 如果在设计过程中有问题会进行适当调整。 设备硬件部分: 1. RC522刷卡模块负责对卡进行读写。 2. ESP8266WIFI初始化工作在STA模式,连接到指定WIFI,与软件所在的电脑处于同一个局域网,方便连接软件端的服务器进行数据通信,每次设备开机将会自动连接到程序里设置好WIFI热点和服务器。 3. 设备端上有一个LED灯,用来显示刷卡的状态—成功与否。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值