ssm+vue居家养老系统源码和论文

ssm+vue居家养老系统源码和论文234

 开发工具:idea 或eclipse
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

居家养老系统

摘要

随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了居家养老系统的开发全过程。通过分析高校学生综合素质评价管理方面的不足,创建了一个计算机管理居家养老系统的方案。文章介绍了居家养老系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。

本居家养老系统管理员和工作人员两个角色。管理员功能有个人中心,老人账号管理,工作人员管理,老人档案管理,订单申请管理,检查检验项目管理,维修服务管理,订单信息管理,转诊信息管理,生活服务管理,服务记录管理,生活用品信息管理,药品信息管理,食物信息管理,系统管理等。工作人员功能有个人中心,老人档案管理,订单信息管理,转诊信息管理,生活服务管理,服务记录管理等。老人功能有个人中心,老人档案管理,订单信息管理,转诊信息管理,生活服务管理,服务记录管理等。因而具有一定的实用性。

本站是一个B/S模式系统,采用SSM框架,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得居家养老系统管理工作系统化、规范化。

关键词:居家养老系统;SSM框架;MYSQL数据库

Abstract

With the deepening and extensive application of information technology in management, the implementation of management information systems has gradually matured in technology. This article introduces the whole process of the development of the home care system. By analyzing the deficiencies in the management of comprehensive quality evaluation of college students, a computer-managed home care system was created. The article introduces the system analysis part of the home care system, including feasibility analysis, etc. The system design part mainly introduces the system function design and database design.

The two roles of the home care system administrator and staff. Administrator functions include personal center, elderly account management, staff management, elderly file management, order application management, inspection project management, maintenance service management, order information management, referral information management, life service management, service record management, life Supply information management, drug information management, food information management, system management, etc. Staff functions include personal center, elderly file management, order information management, referral information management, life service management, service record management, etc. The functions of the elderly include personal center, elderly file management, order information management, referral information management, life service management, service record management, etc. So it has a certain practicability.

This site is a B/S mode system, using SSM framework, MYSQL database design and development, fully guarantee the stability of the system. The system has the characteristics of clear interface, simple operation and complete functions, which makes the management of the home care system systematized and standardized.

Keywords: Home care system; SSM framework; MYSQL database

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.LaorenzhanghaoEntity;
import com.entity.view.LaorenzhanghaoView;

import com.service.LaorenzhanghaoService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 老人账号
 * 后端接口
 * @author 
 * @email 
 * @date 2021-04-16 15:09:25
 */
@RestController
@RequestMapping("/laorenzhanghao")
public class LaorenzhanghaoController {
    @Autowired
    private LaorenzhanghaoService laorenzhanghaoService;
    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		LaorenzhanghaoEntity user = laorenzhanghaoService.selectOne(new EntityWrapper<LaorenzhanghaoEntity>().eq("laorenzhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(), username,"laorenzhanghao",  "老人账号" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody LaorenzhanghaoEntity laorenzhanghao){
    	//ValidatorUtils.validateEntity(laorenzhanghao);
    	LaorenzhanghaoEntity user = laorenzhanghaoService.selectOne(new EntityWrapper<LaorenzhanghaoEntity>().eq("laorenzhanghao", laorenzhanghao.getLaorenzhanghao()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		laorenzhanghao.setId(uId);
		laorenzhanghao.setUserid(uId);
        laorenzhanghaoService.insert(laorenzhanghao);
        return R.ok();
    }
	
	/**
	 * 退出
	 */
	@RequestMapping("/logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        LaorenzhanghaoEntity user = laorenzhanghaoService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	LaorenzhanghaoEntity user = laorenzhanghaoService.selectOne(new EntityWrapper<LaorenzhanghaoEntity>().eq("laorenzhanghao", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setMima("123456");
        laorenzhanghaoService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,LaorenzhanghaoEntity laorenzhanghao, 
		HttpServletRequest request){

        EntityWrapper<LaorenzhanghaoEntity> ew = new EntityWrapper<LaorenzhanghaoEntity>();
		PageUtils page = laorenzhanghaoService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, laorenzhanghao), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,LaorenzhanghaoEntity laorenzhanghao, HttpServletRequest request){

        EntityWrapper<LaorenzhanghaoEntity> ew = new EntityWrapper<LaorenzhanghaoEntity>();
		PageUtils page = laorenzhanghaoService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, laorenzhanghao), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( LaorenzhanghaoEntity laorenzhanghao){
       	EntityWrapper<LaorenzhanghaoEntity> ew = new EntityWrapper<LaorenzhanghaoEntity>();
      	ew.allEq(MPUtil.allEQMapPre( laorenzhanghao, "laorenzhanghao")); 
        return R.ok().put("data", laorenzhanghaoService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(LaorenzhanghaoEntity laorenzhanghao){
        EntityWrapper< LaorenzhanghaoEntity> ew = new EntityWrapper< LaorenzhanghaoEntity>();
 		ew.allEq(MPUtil.allEQMapPre( laorenzhanghao, "laorenzhanghao")); 
		LaorenzhanghaoView laorenzhanghaoView =  laorenzhanghaoService.selectView(ew);
		return R.ok("查询老人账号成功").put("data", laorenzhanghaoView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        LaorenzhanghaoEntity laorenzhanghao = laorenzhanghaoService.selectById(id);
        return R.ok().put("data", laorenzhanghao);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        LaorenzhanghaoEntity laorenzhanghao = laorenzhanghaoService.selectById(id);
        return R.ok().put("data", laorenzhanghao);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody LaorenzhanghaoEntity laorenzhanghao, HttpServletRequest request){
    	laorenzhanghao.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(laorenzhanghao);
    	LaorenzhanghaoEntity user = laorenzhanghaoService.selectOne(new EntityWrapper<LaorenzhanghaoEntity>().eq("laorenzhanghao", laorenzhanghao.getLaorenzhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		laorenzhanghao.setId(new Date().getTime());
        laorenzhanghaoService.insert(laorenzhanghao);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody LaorenzhanghaoEntity laorenzhanghao, HttpServletRequest request){
    	laorenzhanghao.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(laorenzhanghao);
    	LaorenzhanghaoEntity user = laorenzhanghaoService.selectOne(new EntityWrapper<LaorenzhanghaoEntity>().eq("laorenzhanghao", laorenzhanghao.getLaorenzhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}
    	laorenzhanghao.setUserid((Long)request.getSession().getAttribute("userId"));

		laorenzhanghao.setId(new Date().getTime());
        laorenzhanghaoService.insert(laorenzhanghao);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody LaorenzhanghaoEntity laorenzhanghao, HttpServletRequest request){
        //ValidatorUtils.validateEntity(laorenzhanghao);
        laorenzhanghaoService.updateById(laorenzhanghao);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        laorenzhanghaoService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<LaorenzhanghaoEntity> wrapper = new EntityWrapper<LaorenzhanghaoEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = laorenzhanghaoService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

 

这份资源是一个基于SpringBoot+Vue的智慧养老平台的完整开发源码,包括前端、后端、数据库等部分。该平台是面向老年人的智慧健康养老平台,通过信息化手段帮助老年人提高生活质量,同时也为其家人提供更多的关爱和照顾。该平台提供了老人健康监测、亲情关怀、社交交流、精神文化、便民服务等多项功能,使老年人能够更加便捷地生活和社交。 为了更好地使用本资源,我们提供了详细的部署说明和系统介绍。在部署说明中,我们详细介绍了如何将本资源部署到本地或远程服务器上,并配置相关环境参数。在系统介绍中,我们对智慧养老平台的各项功能、前后端框架和技术栈进行了详细介绍和解释,以帮助开发者更好地理解系统的设计思路和功能实现。 对于想要深入学习和了解源码开发者,我们还提供了源码解释。通过逐行分析源码,我们对系统的技术实现、API设计、业务逻辑等进行深入解读和分析,帮助开发者更好地理解源码和在其基础上进行二次开发,并提供更多开发思路和技巧。 总之,本资源适合对SpringBoot、Vue、智慧养老平台开发有一定基础的开发者学习和参考。智慧养老平台的设计思路、技术实现和业务逻辑等方面都具有高参考价值,为开发者提供了实践和实现智慧健康养老平台的宝贵经验和思路,同时也为老年人和家庭提供了更好的服务。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值