毕业设计选题参考|基于微信小程序实现养老院管理系统

作者主页:编程千纸鹤

作者简介:Java领域优质创作者、CSDN博客专家 、CSDN内容合伙人、掘金特邀作者、阿里云博客专家、51CTO特邀作者、多年架构师设计经验、多年校企合作经验,被多个学校常年聘为校外企业导师,指导学生毕业设计并参与学生毕业答辩指导,有较为丰富的相关经验。期待与各位高校教师、企业讲师以及同行交流合作

主要内容:Java项目、Python项目、前端项目、PHP、ASP.NET、人工智能与大数据、单片机开发、物联网设计与开发设计、简历模板、学习资料、面试题库、技术互助、就业指导等

业务范围:免费功能设计、开题报告、任务书、中期检查PPT、系统功能实现、代码编写、论文编写和辅导、论文降重、长期答辩答疑辅导、腾讯会议一对一专业讲解辅导答辩、模拟答辩演练、和理解代码逻辑思路等

收藏点赞不迷路  关注作者有好处

文末获取源码 

项目编号:BS-XCX-098

一,环境介绍

语言环境:微信小程序

数据库:Mysql: mysql5.7

WEB框架:SpringBoot+Vue

开发工具:IDEA和微信开发者工具

二,项目简介

伴随着互联网发展,其基础理论与技术都已完善,并积极参与到整个社会各个方面。它让信息可以通过媒体传播,相互配合信息管理专用工具能够为大家提供优质的服务。对于传统信息管理错乱、差错率高、信息安全系数差、工作强度大、耗时费力等诸多问题,选用养老院管理系统能有效管理,使信息管理更为科学化。

养老院管理系统、整体采用Java作为后台主要技术语言,利用MySQL数据库建立数据分析表来储存系统软件造成的信息。后台主要框架采用SpringBoot框架进行整体框架和布局。这个的话系统能够提供信息表明以及相应的服务项目,系统实现了包括床位管理、床位调动申请管理、出院申请管理、调动申请管理、字典管理、房间管理、公告信息管理、床位更换申请管理、家属管理、健康信息管理、老人管理、老人请假申请管理、离职申请管理、请假申请管理、床位管理、管理员管理。用户的功能等。总而言之,养老院管理系统集中化管理信息,具备安全性强、工作效率高、内存空间大、成本费用低等特点。能降低信息管理成本费,完成信息管理。

  录

摘  要

Abstract

目  录

第1章 绪论

1.1 课题背景

1.2 课题意义

1.3 研究内容

第2章 开发环境与技术

2.1 Java语言

2.2 MYSQL数据库

2.3 IDEA开发工具

2.4 Spring Boot框架

第3章 系统分析

3.1 可行性分析

3.1.1 技术可行性

3.1.2 经济可行性

3.1.3 操作可行性

3.2 系统流程

3.2.1 操作流程

3.2.2 登录流程

3.2.3 删除信息流程

3.2.4 添加信息流程

3.3 性能需求

3.4 功能需求

第4章 系统设计

4.1 系统设计思想

4.2 功能结构设计

4.3 数据库设计

4.3.1 数据库概念设计

4.3.2 数据库物理设计

第5章 系统实现

5.1 管理员功能实现

5.1.1 床位管理

5.1.2 老人管理

5.1.3 公告管理

5.1.4 公告类型管理

5.2 用户功能实现

5.2.1 床位

5.2.2 老人

5.1.3 公告

5.1.4 公告类型

第6章 系统测试

6.1 功能测试

6.1.1 登录功能测试

6.2 系统测试结果

结  论

致  谢

三,系统展示

后台管理

四,核心代码展示


package com.controller;

import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;

/**
 * 出院申请
 * 后端接口
 * @author
 * @email
*/
@RestController
@Controller
@RequestMapping("/chuyaun")
public class ChuyaunController {
    private static final Logger logger = LoggerFactory.getLogger(ChuyaunController.class);

    private static final String TABLE_NAME = "chuyaun";

    @Autowired
    private ChuyaunService chuyaunService;


    @Autowired
    private TokenService tokenService;

    @Autowired
    private ChuangweiService chuangweiService;//床位
    @Autowired
    private ChuangweiYuyueService chuangweiYuyueService;//床位调动申请
    @Autowired
    private DiaodongService diaodongService;//调动申请
    @Autowired
    private DictionaryService dictionaryService;//字典
    @Autowired
    private FangjianService fangjianService;//房间
    @Autowired
    private GonggaoService gonggaoService;//公告信息
    @Autowired
    private HugongService hugongService;//护工更换申请
    @Autowired
    private JiashuService jiashuService;//家属
    @Autowired
    private JiluService jiluService;//健康信息
    @Autowired
    private LaorenService laorenService;//老人
    @Autowired
    private LaorenqingjiaService laorenqingjiaService;//老人请假申请
    @Autowired
    private LizhiService lizhiService;//离职申请
    @Autowired
    private QingjiaService qingjiaService;//请假申请
    @Autowired
    private YonghuService yonghuService;//护工
    @Autowired
    private UsersService usersService;//管理员


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永不会进入");
        else if("护工".equals(role))
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        else if("家属".equals(role))
            params.put("jiashuId",request.getSession().getAttribute("userId"));
        CommonUtil.checkMap(params);
        PageUtils page = chuyaunService.queryPage(params);

        //字典表数据转换
        List<ChuyaunView> list =(List<ChuyaunView>)page.getList();
        for(ChuyaunView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        ChuyaunEntity chuyaun = chuyaunService.selectById(id);
        if(chuyaun !=null){
            //entity转view
            ChuyaunView view = new ChuyaunView();
            BeanUtils.copyProperties( chuyaun , view );//把实体数据重构到view中
            //级联表 家属
            //级联表
            JiashuEntity jiashu = jiashuService.selectById(chuyaun.getJiashuId());
            if(jiashu != null){
            BeanUtils.copyProperties( jiashu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "jiashuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
            view.setJiashuId(jiashu.getId());
            }
            //级联表 老人
            //级联表
            LaorenEntity laoren = laorenService.selectById(chuyaun.getLaorenId());
            if(laoren != null){
            BeanUtils.copyProperties( laoren , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "jiashuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
            view.setLaorenId(laoren.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody ChuyaunEntity chuyaun, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,chuyaun:{}",this.getClass().getName(),chuyaun.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");
        else if("家属".equals(role))
            chuyaun.setJiashuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

        Wrapper<ChuyaunEntity> queryWrapper = new EntityWrapper<ChuyaunEntity>()
            .eq("jiashu_id", chuyaun.getJiashuId())
            .eq("laoren_id", chuyaun.getLaorenId())
            .in("chuyaun_yesno_types", new Integer[]{1,2})
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ChuyaunEntity chuyaunEntity = chuyaunService.selectOne(queryWrapper);
//        if(chuyaunEntity==null){
            chuyaun.setInsertTime(new Date());
            chuyaun.setChuyaunYesnoTypes(1);
            chuyaun.setCreateTime(new Date());
            chuyaunService.insert(chuyaun);
            return R.ok();
//        }else {
//            if(chuyaunEntity.getChuyaunYesnoTypes()==1)
//                return R.error(511,"有相同的待审核的数据");
//            else if(chuyaunEntity.getChuyaunYesnoTypes()==2)
//                return R.error(511,"有相同的审核通过的数据");
//            else
//                return R.error(511,"表中有相同数据");
//        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody ChuyaunEntity chuyaun, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
        logger.debug("update方法:,,Controller:{},,chuyaun:{}",this.getClass().getName(),chuyaun.toString());
        ChuyaunEntity oldChuyaunEntity = chuyaunService.selectById(chuyaun.getId());//查询原先数据

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("家属".equals(role))
//            chuyaun.setJiashuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
        if("".equals(chuyaun.getChuyaunText()) || "null".equals(chuyaun.getChuyaunText())){
                chuyaun.setChuyaunText(null);
        }
        if("".equals(chuyaun.getChuyaunYesnoText()) || "null".equals(chuyaun.getChuyaunYesnoText())){
                chuyaun.setChuyaunYesnoText(null);
        }

            chuyaunService.updateById(chuyaun);//根据id更新
            return R.ok();
    }


    /**
    * 审核
    */
    @RequestMapping("/shenhe")
    public R shenhe(@RequestBody ChuyaunEntity chuyaunEntity, HttpServletRequest request){
        logger.debug("shenhe方法:,,Controller:{},,chuyaunEntity:{}",this.getClass().getName(),chuyaunEntity.toString());

        ChuyaunEntity oldChuyaun = chuyaunService.selectById(chuyaunEntity.getId());//查询原先数据

//        if(chuyaunEntity.getChuyaunYesnoTypes() == 2){//通过
//            chuyaunEntity.setChuyaunTypes();
//        }else if(chuyaunEntity.getChuyaunYesnoTypes() == 3){//拒绝
//            chuyaunEntity.setChuyaunTypes();
//        }
        chuyaunEntity.setChuyaunShenheTime(new Date());//审核时间
        chuyaunService.updateById(chuyaunEntity);//审核

        return R.ok();
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        List<ChuyaunEntity> oldChuyaunList =chuyaunService.selectBatchIds(Arrays.asList(ids));//要删除的数据
        chuyaunService.deleteBatchIds(Arrays.asList(ids));

        return R.ok();
    }


    /**
     * 批量上传
     */
    @RequestMapping("/batchInsert")
    public R save( String fileName, HttpServletRequest request){
        logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
        Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
        try {
            List<ChuyaunEntity> chuyaunList = new ArrayList<>();//上传的东西
            Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
            Date date = new Date();
            int lastIndexOf = fileName.lastIndexOf(".");
            if(lastIndexOf == -1){
                return R.error(511,"该文件没有后缀");
            }else{
                String suffix = fileName.substring(lastIndexOf);
                if(!".xls".equals(suffix)){
                    return R.error(511,"只支持后缀为xls的excel文件");
                }else{
                    URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
                    File file = new File(resource.getFile());
                    if(!file.exists()){
                        return R.error(511,"找不到上传文件,请联系管理员");
                    }else{
                        List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            ChuyaunEntity chuyaunEntity = new ChuyaunEntity();
//                            chuyaunEntity.setChuyaunUuidNumber(data.get(0));                    //报名编号 要改的
//                            chuyaunEntity.setJiashuId(Integer.valueOf(data.get(0)));   //家属 要改的
//                            chuyaunEntity.setLaorenId(Integer.valueOf(data.get(0)));   //老人 要改的
//                            chuyaunEntity.setChuyaunText(data.get(0));                    //报名理由 要改的
//                            chuyaunEntity.setInsertTime(date);//时间
//                            chuyaunEntity.setChuyaunYesnoTypes(Integer.valueOf(data.get(0)));   //报名状态 要改的
//                            chuyaunEntity.setChuyaunYesnoText(data.get(0));                    //审核回复 要改的
//                            chuyaunEntity.setChuyaunShenheTime(sdf.parse(data.get(0)));          //审核时间 要改的
//                            chuyaunEntity.setCreateTime(date);//时间
                            chuyaunList.add(chuyaunEntity);


                            //把要查询是否重复的字段放入map中
                                //报名编号
                                if(seachFields.containsKey("chuyaunUuidNumber")){
                                    List<String> chuyaunUuidNumber = seachFields.get("chuyaunUuidNumber");
                                    chuyaunUuidNumber.add(data.get(0));//要改的
                                }else{
                                    List<String> chuyaunUuidNumber = new ArrayList<>();
                                    chuyaunUuidNumber.add(data.get(0));//要改的
                                    seachFields.put("chuyaunUuidNumber",chuyaunUuidNumber);
                                }
                        }

                        //查询是否重复
                         //报名编号
                        List<ChuyaunEntity> chuyaunEntities_chuyaunUuidNumber = chuyaunService.selectList(new EntityWrapper<ChuyaunEntity>().in("chuyaun_uuid_number", seachFields.get("chuyaunUuidNumber")));
                        if(chuyaunEntities_chuyaunUuidNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(ChuyaunEntity s:chuyaunEntities_chuyaunUuidNumber){
                                repeatFields.add(s.getChuyaunUuidNumber());
                            }
                            return R.error(511,"数据库的该表中的 [报名编号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                        chuyaunService.insertBatch(chuyaunList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }




    /**
    * 前端列表
    */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));

        CommonUtil.checkMap(params);
        PageUtils page = chuyaunService.queryPage(params);

        //字典表数据转换
        List<ChuyaunView> list =(List<ChuyaunView>)page.getList();
        for(ChuyaunView c:list)
            dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段

        return R.ok().put("data", page);
    }

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        ChuyaunEntity chuyaun = chuyaunService.selectById(id);
            if(chuyaun !=null){


                //entity转view
                ChuyaunView view = new ChuyaunView();
                BeanUtils.copyProperties( chuyaun , view );//把实体数据重构到view中

                //级联表
                    JiashuEntity jiashu = jiashuService.selectById(chuyaun.getJiashuId());
                if(jiashu != null){
                    BeanUtils.copyProperties( jiashu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "jiashuId"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setJiashuId(jiashu.getId());
                }
                //级联表
                    LaorenEntity laoren = laorenService.selectById(chuyaun.getLaorenId());
                if(laoren != null){
                    BeanUtils.copyProperties( laoren , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "jiashuId"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setLaorenId(laoren.getId());
                }
                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view, request);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody ChuyaunEntity chuyaun, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,chuyaun:{}",this.getClass().getName(),chuyaun.toString());
        Wrapper<ChuyaunEntity> queryWrapper = new EntityWrapper<ChuyaunEntity>()
            .eq("chuyaun_uuid_number", chuyaun.getChuyaunUuidNumber())
            .eq("jiashu_id", chuyaun.getJiashuId())
            .eq("laoren_id", chuyaun.getLaorenId())
            .eq("chuyaun_text", chuyaun.getChuyaunText())
            .in("chuyaun_yesno_types", new Integer[]{1,2})
            .eq("chuyaun_yesno_text", chuyaun.getChuyaunYesnoText())
//            .notIn("chuyaun_types", new Integer[]{102})
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ChuyaunEntity chuyaunEntity = chuyaunService.selectOne(queryWrapper);
        if(chuyaunEntity==null){
            chuyaun.setInsertTime(new Date());
            chuyaun.setChuyaunYesnoTypes(1);
            chuyaun.setCreateTime(new Date());
        chuyaunService.insert(chuyaun);

            return R.ok();
        }else {
            if(chuyaunEntity.getChuyaunYesnoTypes()==1)
                return R.error(511,"有相同的待审核的数据");
            else if(chuyaunEntity.getChuyaunYesnoTypes()==2)
                return R.error(511,"有相同的审核通过的数据");
            else
                return R.error(511,"表中有相同数据");
        }
    }

}

五,相关作品展示

基于Java开发、Python开发、PHP开发、C#开发等相关语言开发的实战项目

基于Nodejs、Vue等前端技术开发的前端实战项目

基于微信小程序和安卓APP应用开发的相关作品

基于51单片机等嵌入式物联网开发应用

基于各类算法实现的AI智能应用

基于大数据实现的各类数据管理和推荐系统

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

编程千纸鹤

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

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

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

打赏作者

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

抵扣说明:

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

余额充值