养老院管理系统基于springboot的养老院管理系统java项目

文章目录

  • 养老院管理系统
    • 一、项目演示
    • 二、项目介绍
    • 三、系统部分功能截图
    • 四、部分代码展示
    • 五、底部获取项目源码(9.9¥带走)

养老院管理系统

一、项目演示

养老院管理系统

二、项目介绍

基于springboot的养老院管理系统

角色:超级管理员、管理员和用户

超级/管理员:管理员账号,用户账号管理、健康档案,病例档案,药品管理、每月餐饮,外出报备、入住登记,寝室分配、事故记录,访客记录、入住费用,护理费用

用户:个人信息、家人情况查看、每日餐饮、外出报备、入驻费用、护理费用

语言:java
后端框架:springboot、mybatis
前端技术:layui、html、css、JavaScript、JQuery
数据库:MySQL

三、系统部分功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

四、部分代码展示

package com.sm.graduation.root.controller;import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sm.graduation.accident.pojo.AccidentRecord;
import com.sm.graduation.accident.service.AccidentRecordService;
import com.sm.graduation.admin.pojo.AdminInfo;
import com.sm.graduation.admin.service.AdminInfoService;
import com.sm.graduation.checkin.pojo.CheckIn;
import com.sm.graduation.checkin.service.CheckInService;
import com.sm.graduation.common.loginpojo.LoginPojo;
import com.sm.graduation.common.result.AjaxResult;
import com.sm.graduation.dormitory.pojo.DormitoryAllocation;
import com.sm.graduation.dormitory.service.DormitoryAllocationService;
import com.sm.graduation.food.pojo.MonthlyCatering;
import com.sm.graduation.food.service.MonthlyCateringService;
import com.sm.graduation.health.pojo.HealthRecords;
import com.sm.graduation.health.service.HealthRecordsService;
import com.sm.graduation.high.pojo.HighRisk;
import com.sm.graduation.high.service.HighRiskService;
import com.sm.graduation.medication.pojo.Medication;
import com.sm.graduation.medication.service.MedicationService;
import com.sm.graduation.nurse.pojo.Nursing;
import com.sm.graduation.nurse.service.NursingService;
import com.sm.graduation.older.pojo.OlderInfo;
import com.sm.graduation.older.service.OlderInfoService;
import com.sm.graduation.out.pojo.GoOut;
import com.sm.graduation.out.service.GoOutService;
import com.sm.graduation.usr.pojo.UsrInfo;
import com.sm.graduation.usr.service.UsrInfoService;
import com.sm.graduation.visitor.pojo.Visitor;
import com.sm.graduation.visitor.service.VisitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;import com.sm.graduation.root.pojo.RootInfo;
import com.sm.graduation.root.service.RootInfoService;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;import java.util.HashMap;
import java.util.List;
import java.util.Map;import static com.sm.graduation.common.result.AjaxResult.*;@SuppressWarnings("all")
@RestController
@RequestMapping("/root")
public class RootInfoController {@Autowiredprivate RootInfoService rootInfoService;@Autowiredprivate AdminInfoService adminInfoService;@Autowiredprivate UsrInfoService usrInfoService;@Autowiredprivate HealthRecordsService healthRecordsService;@Autowiredprivate HighRiskService highRiskService;@Autowiredprivate MedicationService medicationService;@Autowiredprivate MonthlyCateringService monthlyCateringService;@Autowiredprivate GoOutService goOutService;@Autowiredprivate OlderInfoService olderInfoService;@Autowiredprivate DormitoryAllocationService dormitoryAllocationService;@Autowiredprivate AccidentRecordService accidentRecordService;@Autowiredprivate VisitorService visitorService;@Autowiredprivate CheckInService checkInService;@Autowiredprivate NursingService nursingService;private String olderName;private boolean login;/** 登录验证 */@RequestMapping("/loginIn")public AjaxResult loginIn(HttpServletRequest request, HttpSession session, String username,LoginPojo loginPojo, RootInfo rootInfo,AdminInfo adminInfo, UsrInfo usrInfo){if (loginPojo.getCaptcha().equalsIgnoreCase(String.valueOf(request.getSession().getAttribute("captCode")))) {//超管登录if (0 == loginPojo.getPower()){rootInfo.setName(loginPojo.getUsername());rootInfo.setPwd(loginPojo.getPassword());RootInfo root = rootInfoService.sltName(rootInfo);if (root == null){return AjaxResult.error("登录名不存在");}login = rootInfoService.loginIn(rootInfo);if (login) {session.setAttribute("username",root.getNickName());session.setAttribute("power",root.getPower());session.setAttribute("root",root);return AjaxResult.success(0,"登录成功");} else return AjaxResult.error("登录名或密码错误");}//管理员登录if (1 == loginPojo.getPower()){adminInfo.setAdminLogin(loginPojo.getUsername());adminInfo.setAdminPwd(loginPojo.getPassword());AdminInfo admin = adminInfoService.sltName(adminInfo);if (admin == null){return AjaxResult.error("登录名不存在");}login = adminInfoService.loginIn(adminInfo);if (login) {session.setAttribute("username",admin.getAdminName());session.setAttribute("power",admin.getPower());session.setAttribute("admin",admin);return AjaxResult.success(1,"登录成功");} else return AjaxResult.error("登录名或密码错误");}//用户登录if (2 == loginPojo.getPower()){usrInfo.setUsrLogin(loginPojo.getUsername());usrInfo.setUsrPwd(loginPojo.getPassword());UsrInfo usr = usrInfoService.sltName(usrInfo);if (usr == null){return AjaxResult.error("登录名不存在");}login = usrInfoService.loginIn(usrInfo);if (login) {String olderName = usr.getOlderName();HealthRecords older = healthRecordsService.older_dorm(olderName);this.olderName = older.getName();session.setAttribute("username",usr.getUsrName());session.setAttribute("power",usr.getUsrPwd());session.setAttribute("usr",usr);session.setAttribute("older",older);return AjaxResult.success(2,"登录成功");} else return AjaxResult.error("登录名或密码错误");}}return AjaxResult.error("验证码错误");}/** admin  ---  List */@RequestMapping("/adminList")public AjaxResult adminList(@RequestParam(defaultValue = "1" , value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "adminName") String user){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (user == null || user.equals("")) {map.put("user","");List<AdminInfo> admins = adminInfoService.listAll(map);PageInfo<AdminInfo> page = new PageInfo<>(admins);return successData(page.getTotal(), admins);}map.put("user",user);List<AdminInfo> admins = adminInfoService.listAll(map);PageInfo<AdminInfo> page = new PageInfo<>(admins);return successData(page.getTotal(), admins);}/** usr --- List */@RequestMapping("/userList")public AjaxResult userList(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = "" , value = "usrName") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<UsrInfo> usrInfos = usrInfoService.listAll(map);PageInfo<UsrInfo> page = new PageInfo<>(usrInfos);return successData(page.getTotal(), usrInfos);}map.put("usr",usr);List<UsrInfo> usrInfos = usrInfoService.listAll(map);PageInfo<UsrInfo> page = new PageInfo<>(usrInfos);return successData(page.getTotal(), usrInfos);}/** 健康档案 */@RequestMapping("/healthRisk")public AjaxResult healthRisk(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = "" , value = "olderName") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<HealthRecords> healthRecords = healthRecordsService.listAll(map);PageInfo<HealthRecords> page = new PageInfo<>(healthRecords);return successData(page.getTotal(), healthRecords);}map.put("usr",usr);List<HealthRecords> healthRecords = healthRecordsService.listAll(map);PageInfo<HealthRecords> page = new PageInfo<>(healthRecords);return successData(page.getTotal(), healthRecords);}/** 高危存档 */@RequestMapping("/highRisk")public AjaxResult highRisk(@RequestParam(defaultValue = "1",  value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "olderName") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<HighRisk> highRisks = highRiskService.listAll(map);PageInfo<HighRisk> page = new PageInfo<>(highRisks);return successData(page.getTotal(), highRisks);}map.put("usr",usr);List<HighRisk> highRisks = highRiskService.listAll(map);PageInfo<HighRisk> page = new PageInfo<>(highRisks);return successData(page.getTotal(), highRisks);}/** 药品管理 */@RequestMapping("/medication")public AjaxResult medication(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = "" , value = "medication") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<Medication> medications = medicationService.listAll(map);PageInfo<Medication> page = new PageInfo<>(medications);return successData(page.getTotal(), medications);}map.put("usr",usr);List<Medication> medications = medicationService.listAll(map);PageInfo<Medication> page = new PageInfo<>(medications);return successData(page.getTotal(), medications);}/** 每月餐饮 */@RequestMapping("/catering")public AjaxResult catering(@RequestParam(defaultValue = "1",  value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "monTime") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<MonthlyCatering> monthlyCaterings = monthlyCateringService.listAll(map);PageInfo<MonthlyCatering> page = new PageInfo<>(monthlyCaterings);return successData(page.getTotal(), monthlyCaterings);}map.put("usr",usr);List<MonthlyCatering> monthlyCaterings = monthlyCateringService.listAll(map);PageInfo<MonthlyCatering> page = new PageInfo<>(monthlyCaterings);return successData(page.getTotal(), monthlyCaterings);}/** 外出报备 */@RequestMapping("/goOut")public AjaxResult goOut(@RequestParam(defaultValue = "1",  value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "olderName") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<GoOut> goOuts = goOutService.listAll(map);PageInfo<GoOut> page = new PageInfo<>(goOuts);return successData(page.getTotal(), goOuts);}map.put("usr",usr);List<GoOut> goOuts = goOutService.listAll(map);PageInfo<GoOut> page = new PageInfo<>(goOuts);return successData(page.getTotal(), goOuts);}@RequestMapping("/goOutUsr")public AjaxResult goOutUsr(@RequestParam(defaultValue = "1",  value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "olderName") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("olderName",olderName);List<GoOut> goOuts = goOutService.go_listAll(map);PageInfo<GoOut> page = new PageInfo<>(goOuts);return successData(page.getTotal(), goOuts);}map.put("usr",usr);List<GoOut> goOuts = goOutService.listAll(map);PageInfo<GoOut> page = new PageInfo<>(goOuts);return successData(page.getTotal(), goOuts);}/** 入住登记 */@RequestMapping("/register")public AjaxResult register(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "olderName") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<OlderInfo> olderInfos = olderInfoService.listAll(map);PageInfo<OlderInfo> page = new PageInfo<>(olderInfos);return successData(page.getTotal(), olderInfos);}map.put("usr",usr);List<OlderInfo> olderInfos = olderInfoService.listAll(map);PageInfo<OlderInfo> page = new PageInfo<>(olderInfos);return successData(page.getTotal(), olderInfos);}/** 寝室分配 */@RequestMapping("/dormitory")public AjaxResult dormitory(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "dormitory") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<DormitoryAllocation> dormitoryAllocations = dormitoryAllocationService.listAll(map);PageInfo<DormitoryAllocation> page = new PageInfo<>(dormitoryAllocations);return successData(page.getTotal(), dormitoryAllocations);}map.put("usr",usr);List<DormitoryAllocation> dormitoryAllocations = dormitoryAllocationService.listAll(map);PageInfo<DormitoryAllocation> page = new PageInfo<>(dormitoryAllocations);return successData(page.getTotal(), dormitoryAllocations);}/** 事故记录 */@RequestMapping("/accident")public AjaxResult accident(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "accTime") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<AccidentRecord> accidentRecords = accidentRecordService.listAll(map);PageInfo<AccidentRecord> page = new PageInfo<>(accidentRecords);return successData(page.getTotal(), accidentRecords);}map.put("usr",usr);List<AccidentRecord> accidentRecords = accidentRecordService.listAll(map);PageInfo<AccidentRecord> page = new PageInfo<>(accidentRecords);return successData(page.getTotal(), accidentRecords);}/** 访客记录 */@RequestMapping("/visitor")public AjaxResult visitor(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "name") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<Visitor> visitors = visitorService.listAll(map);PageInfo<Visitor> page = new PageInfo<>(visitors);return successData(page.getTotal(), visitors);}map.put("usr",usr);List<Visitor> visitors = visitorService.listAll(map);PageInfo<Visitor> page = new PageInfo<>(visitors);return successData(page.getTotal(), visitors);}/** 入住费用 */@RequestMapping("/checkIn")public AjaxResult checkIn(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "year") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<CheckIn> checkIns = checkInService.listAll(map);PageInfo<CheckIn> page = new PageInfo<>(checkIns);return successData(page.getTotal(), checkIns);}map.put("usr",usr);List<CheckIn> checkIns = checkInService.listAll(map);PageInfo<CheckIn> page = new PageInfo<>(checkIns);return successData(page.getTotal(), checkIns);}/** 护理费用 */@RequestMapping("/nursing")public AjaxResult nursing(@RequestParam(defaultValue = "1", value = "page") Integer pageNum,@RequestParam(defaultValue = "10", value = "limit") Integer pageSize,@RequestParam(defaultValue = ""  , value = "nurseRank") String usr){HashMap<String, Object> map = new HashMap<>();PageHelper.startPage(pageNum,pageSize);if (usr == null || usr.equals("")) {map.put("usr","");List<Nursing> nursings = nursingService.listAll(map);PageInfo<Nursing> page = new PageInfo<>(nursings);return successData(page.getTotal(), nursings);}map.put("usr",usr);List<Nursing> nursings = nursingService.listAll(map);PageInfo<Nursing> page = new PageInfo<>(nursings);return successData(page.getTotal(), nursings);}//==============添加功能=================/** 添加管理员 */@RequestMapping("/addAdmin")public AjaxResult addAmin(AdminInfo adminInfo){int insert = adminInfoService.insert(adminInfo);if (1 == insert){return success("添加成功");}return error("添加失败");}/** 添加用户 */@RequestMapping("/addUsr")public AjaxResult addUsr(UsrInfo usrInfo){UsrInfo results = usrInfoService.sltName(usrInfo);if (results != null){return error("添加失败,登录名已被注册");}int insert = usrInfoService.insert(usrInfo);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addHealth")public AjaxResult addHealth(HealthRecords healthRecords){System.out.println(healthRecords);int insert = healthRecordsService.insert(healthRecords);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addHigh")public AjaxResult addHigh(HighRisk highRisk){System.out.println(highRisk);int insert = highRiskService.insert(highRisk);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addMedication")public AjaxResult addMedication(Medication medication){System.out.println(medication);int insert = medicationService.insert(medication);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addMon")public AjaxResult addMon(MonthlyCatering monthlyCatering){System.out.println(monthlyCatering);int insert = monthlyCateringService.insert(monthlyCatering);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addOut")public AjaxResult addOut(GoOut goOut){System.out.println(goOut);int insert = goOutService.insert(goOut);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addOlder")public AjaxResult addOlder(OlderInfo olderInfo){System.out.println(olderInfo);int insert = olderInfoService.insert(olderInfo);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addDorm")public AjaxResult addDorm(DormitoryAllocation dormitoryAllocation){System.out.println(dormitoryAllocation);int insert = dormitoryAllocationService.insert(dormitoryAllocation);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addAcc")public AjaxResult addAcc(AccidentRecord accidentRecord){System.out.println(accidentRecord);int insert = accidentRecordService.insert(accidentRecord);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addVis")public AjaxResult addVis(Visitor visitor){System.out.println(visitor);int insert = visitorService.insert(visitor);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addCheck")public AjaxResult addCheck(CheckIn checkIn){System.out.println(checkIn);int insert = checkInService.insert(checkIn);if (1 == insert){return success("添加成功");}return error("添加失败");}@RequestMapping("/addNurs")public AjaxResult addNurs(Nursing nursing){System.out.println(nursing);int insert = nursingService.insert(nursing);if (1 == insert){return success("添加成功");}return error("添加失败");}//==============修改功能=================/** 修改管理员 */@RequestMapping("/modifyAdmin")public AjaxResult modifyAmin(AdminInfo adminInfo){int update = adminInfoService.update(adminInfo);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyUsr")public AjaxResult modifyUsr(UsrInfo usrInfo){int update = usrInfoService.update(usrInfo);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyHealth")public AjaxResult modifyHealth(HealthRecords healthRecords){System.out.println(healthRecords);int update = healthRecordsService.update(healthRecords);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyHigh")public AjaxResult modifyHigh(HighRisk highRisk){System.out.println(highRisk);int update = highRiskService.update(highRisk);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyMedication")public AjaxResult modifyMedication(Medication medication){System.out.println(medication);int update = medicationService.update(medication);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyMon")public AjaxResult modifyMon(MonthlyCatering monthlyCatering){System.out.println(monthlyCatering);int update = monthlyCateringService.update(monthlyCatering);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyOut")public AjaxResult modifyOut(GoOut goOut){System.out.println(goOut);int update = goOutService.update(goOut);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyOlder")public AjaxResult modifyOlder(OlderInfo olderInfo){int update = olderInfoService.update(olderInfo);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyDorm")public AjaxResult modifyDorm(DormitoryAllocation dormitoryAllocation){int update = dormitoryAllocationService.update(dormitoryAllocation);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyAcc")public AjaxResult modifyAcc(AccidentRecord accidentRecord){int update = accidentRecordService.update(accidentRecord);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyVis")public AjaxResult modifyVis(Visitor visitor){int update = visitorService.update(visitor);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyCheck")public AjaxResult modifyCheck(CheckIn checkIn){int update = checkInService.update(checkIn);if (1 == update){return success("修改成功");}return error("修改失败");}@RequestMapping("/modifyNurs")public AjaxResult modifyNurs(Nursing nursing){int update = nursingService.update(nursing);if (1 == update){return success("修改成功");}return error("修改失败");}//==============删除功能=================/** 删除管理员 */@RequestMapping("/delAdmin")public AjaxResult delAdmin(Integer adminId){adminInfoService.delAdmin(adminId);return success("删除成功");}/** 批量删除管理员 */@RequestMapping("/batchDelAdmin")public AjaxResult batchDel(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);adminInfoService.delAdmin(Integer.valueOf(id));}}}return success("删除成功");}/** 删除用户 */@RequestMapping("/delUsr")public AjaxResult delUsr(Integer usrId){usrInfoService.delete(usrId);return success("删除成功");}/** 批量删除用户 */@RequestMapping("/batchDelUsr")public AjaxResult batchDelUsr(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);usrInfoService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delHealth")public AjaxResult delHealth(Integer id){healthRecordsService.delete(id);return success("删除成功");}@RequestMapping("/batchDelHealth")public AjaxResult batchDelHealth(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);healthRecordsService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delHigh")public AjaxResult delHigh(Integer id){highRiskService.delete(id);return success("删除成功");}@RequestMapping("/batchDelHigh")public AjaxResult batchDelHigh(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);highRiskService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delMedication")public AjaxResult delMedication(Integer id){medicationService.delete(id);return success("删除成功");}@RequestMapping("/batchDelMedication")public AjaxResult batchDelMedication(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);medicationService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delMon")public AjaxResult delMon(Integer id){monthlyCateringService.delete(id);return success("删除成功");}@RequestMapping("/batchDelMon")public AjaxResult batchDelMon(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);monthlyCateringService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delOut")public AjaxResult delOut(Integer id){goOutService.delete(id);return success("删除成功");}@RequestMapping("/batchDelOut")public AjaxResult batchDelOut(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);goOutService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delOlder")public AjaxResult delOlder(@RequestParam(value = "olderId") Integer id){olderInfoService.delete(id);return success("删除成功");}@RequestMapping("/batchDelOlder")public AjaxResult batchDelOlder(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);olderInfoService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delDorm")public AjaxResult delDorm(@RequestParam(value = "id") Integer id){dormitoryAllocationService.delete(id);return success("删除成功");}@RequestMapping("/batchDelDorm")public AjaxResult batchDelDorm(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);dormitoryAllocationService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delAcc")public AjaxResult delAcc(@RequestParam(value = "id") Integer id){accidentRecordService.delete(id);return success("删除成功");}@RequestMapping("/batchDelAcc")public AjaxResult batchDelAcc(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);accidentRecordService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delVis")public AjaxResult delVis(@RequestParam(value = "id") Integer id){visitorService.delete(id);return success("删除成功");}@RequestMapping("/batchDelVis")public AjaxResult batchDelVis(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);visitorService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delCheck")public AjaxResult delCheck(@RequestParam(value = "id") Integer id){checkInService.delete(id);return success("删除成功");}@RequestMapping("/batchDelCheck")public AjaxResult batchDelCheck(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);checkInService.delete(Integer.valueOf(id));}}}return success("删除成功");}@RequestMapping("/delNurs")public AjaxResult delNurs(@RequestParam(value = "id") Integer id){nursingService.delete(id);return success("删除成功");}@RequestMapping("/batchDelNurs")public AjaxResult batchDelNurs(String listStr){if (null != listStr && !"".equals(listStr)){String[] ids = listStr.split(",");for (String id:ids) {if (null != id && !"".equals(id)) {System.out.println(id);nursingService.delete(Integer.valueOf(id));}}}return success("删除成功");}/** root 修改密码 */@RequestMapping("/altPwd")public AjaxResult altPwd(String pwd,String rpwd) {if(!pwd.equals(rpwd)) return error( "两次密码不一致");if (pwd != null && !pwd.equals("")) {int i = rootInfoService.altPwd(pwd);if (i != 0) {return success(0, "修改成功");}}return error("密码不允许为空");}@RequestMapping("/adminAltPwd")public AjaxResult adminAltPwd(String pwd,String rpwd,Map map,HttpServletRequest request) {if(!pwd.equals(rpwd)) return error( "两次密码不一致");if (pwd != null && !pwd.equals("")) {AdminInfo admin= (AdminInfo) request.getSession().getAttribute("admin");Long id = admin.getAdminId();map.put("pwd",pwd);map.put("id",id);int i = adminInfoService.altPwd(map);if (i != 0) {return success(0, "修改成功");}}return error("密码不允许为空");}@RequestMapping("/usrAltPwd")public AjaxResult usrAltPwd(String pwd,String rpwd,Map map,HttpServletRequest request) {if(!pwd.equals(rpwd)) return error( "两次密码不一致");if (pwd != null && !pwd.equals("")) {UsrInfo usr = (UsrInfo) request.getSession().getAttribute("usr");Long id = usr.getUsrId();map.put("pwd",pwd);map.put("id",id);int i = usrInfoService.altPwd(map);if (i != 0) {return success(0, "修改成功");}}return error("密码不允许为空");}
}

五、底部获取项目源码(9.9¥带走)

有问题,或者需要协助调试运行项目的也可以

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/334852.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Python-3.12.0文档解读-内置函数ord()详细说明+记忆策略+常用场景+巧妙用法+综合技巧

一个认为一切根源都是“自己不够强”的INTJ 个人主页&#xff1a;用哲学编程-CSDN博客专栏&#xff1a;每日一题——举一反三Python编程学习Python内置函数 Python-3.12.0文档解读 目录 详细说明 概述 语法 参数 返回值 示例 注意事项 应用场景 记忆策略 常用场景…

网易面试:手撕定时器

概述&#xff1a; 本文使用STL容器-set以及Linux提供的timerfd来实现定时器组件 所谓定时器就是管理大量定时任务&#xff0c;使其能按照超时时间有序地被执行 需求分析&#xff1a; 1.数据结构的选择&#xff1a;存储定时任务 2.驱动方式&#xff1a;如何选择一个任务并执…

微火问答:全域外卖和本地生活服务是同个项目吗?

当前&#xff0c;本地生活赛道火爆程度不断升级&#xff0c;作为其主要板块之一的团购外卖也持续迸发出新的活力。而全域运营的出现无疑是给团购外卖这把正在熊熊燃烧的烈火&#xff0c;又添了一把新柴&#xff01; 所谓全域运营&#xff0c;简单来说&#xff0c;就是指所有领…

xjar加密springboot的jar包,并编译为执行程序

场景&#xff1a;当前项目需要进行jar包部署在windows环境和linux环境&#xff0c;并要求使用xjar加密。 1. xjar加密 源码程序自行搜索&#xff0c;这里只介绍加密及运行&#xff0c;运行加密程序&#xff0c;指定jar包&#xff0c;输入密码 2. 加密后的目录 3. go程序编译 …

HCIP-Datacom-ARST自选题库__BGP/MPLS IP VPN简答【3道题】

1.在BGP/MPLSIPVPN场景中&#xff0c;如果PE设备收到到达同一目的网络的多条路由时&#xff0c;将按照定的顺序选择最优路由。请将以下内容按照比较顺序进行排序。 2.在如图所示的BGP/MPLSIP VPN网络中&#xff0c;管理员准备通过Hub-Spoke组网实现H站点对VPM流量的集中管控&am…

HNU-人工智能-作业3

人工智能-作业3 计科210X 甘晴void 202108010XXX 1.贝叶斯网络 根据图所给出的贝叶斯网络&#xff0c;其中&#xff1a;P(A)0.5&#xff0c;P(B|A)1&#xff0c; P(B|A)0.5&#xff0c; P(C|A)1&#xff0c; P(C|A)0.5&#xff0c;P(D|BC)1&#xff0c;P(D|B, C)0.5&#xff…

如何将天猫内容保存为PDF格式?详细步骤与实战解析

新书上架~&#x1f447;全国包邮奥~ python实用小工具开发教程http://pythontoolsteach.com/3 欢迎关注我&#x1f446;&#xff0c;收藏下次不迷路┗|&#xff40;O′|┛ 嗷~~ 目录 一、引言&#xff1a;保存天猫内容的重要性 二、环境准备与工具安装 1. 安装必要的Python包…

宝塔部署Java+Vue前后端分离项目

1. 服务器 服务器选择Linux的CentOS7的版本 2. 宝塔Linux面板 2.1 百度搜索宝塔 2.2 进去之后点击立即免费安装 2.3 选择Linux在线安装&#xff0c;输入服务器信息进行安装(也可以选择其他方式) 安装完成之后会弹一个宝塔的应用面板&#xff0c;并附带有登录名称和密码&…

Linux快速定位日志 排查bug技巧和常用命令

1. 快速根据关键字定位错误信息 grep 在 Linux 系统中&#xff0c;可以使用 grep 命令来查找日志文件中包含特定关键字的行。假设你的日志文件路径为 /var/log/myapp.log&#xff0c;你想要查找包含关键字 "abc" 的日志内容&#xff0c;可以按照以下步骤操作&#…

【机器学习聚类算法实战-5】机器学习聚类算法之DBSCAN聚类、K均值聚类算法、分层聚类和不同度量的聚集聚类实例分析

&#x1f3a9; 欢迎来到技术探索的奇幻世界&#x1f468;‍&#x1f4bb; &#x1f4dc; 个人主页&#xff1a;一伦明悦-CSDN博客 ✍&#x1f3fb; 作者简介&#xff1a; C软件开发、Python机器学习爱好者 &#x1f5e3;️ 互动与支持&#xff1a;&#x1f4ac;评论 &…

【微服务】安装docker以及可视化界面

1.配置yum下载源为aliyun源 yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo2.下载docker不加版本号默认为最新版本 yum install -y docker-ce3.启动以及开机自启 #启动docker命令 systemctl start docker #设置开机自启命令…

软件功能测试的类型和流程分享

在现代社会&#xff0c;软件已经成为人们生活中不可或缺的一部分&#xff0c;而在软件的开发过程中&#xff0c;功能测试是不可或缺的环节。软件功能测试指的是对软件系统的功能进行检查和验证&#xff0c;以确保软件在各种情况下能够正常运行&#xff0c;并且能够按照用户需求…

【CTF Web】CTFShow web5 Writeup(SQL注入+PHP+位运算)

web5 1 阿呆被老板狂骂一通&#xff0c;决定改掉自己大意的毛病&#xff0c;痛下杀手&#xff0c;修补漏洞。 解法 注意到&#xff1a; <!-- flag in id 1000 -->拦截很多种字符&#xff0c;连 select 也不给用了。 if(preg_match("/\|\"|or|\||\-|\\\|\/|\…

【电路笔记】-状态可变滤波器

状态可变滤波器 文章目录 状态可变滤波器1、概述2、**状态可变滤波器电路**3、状态可变滤波器示例4、陷波滤波器设计5、总结状态可变滤波器是一种多反馈滤波器电路,可以从同一单个有源滤波器设计中同时产生所有三种滤波器响应:低通、高通和带通。 1、概述 状态可变滤波器使用…

Vue中使用Vue-scroll做表格使得在x轴滑动

页面效果 首先 npm i vuescroll 在main.js中挂载到全局 页面代码 <template><div class"app-container"><Header :titletitle gobackgoBack><template v-slot:icon><van-icon clickgoHome classicon namewap-home-o /></templat…

HackTheBox-Machines--Beep

Beep测试过程 1 信息收集 nmap端口扫描 gryphonwsdl ~ % nmap -sC -sV 10.129.137.179 Starting Nmap 7.94 ( https://nmap.org ) at 2024-05-28 14:39 CST Nmap scan report for 10.129.229.183 Host is up (0.28s latency). Not shown: 988 closed tcp ports (conn-refused…

DSP6657 GPIO中断学习

1 简介 使用创龙板卡的KEY2按键通过中断的方式控制LED3的亮灭 2 中断学习 在C665x设备上&#xff0c;CPU中断是通过C66x CorePac中断控制器进行配置的。该中断控制器允许最多128个系统事件被编程到任意12个CPU可屏蔽中断输入&#xff08;CPUINT4至CPUINT15&#xff09;、CPU…

如何成为一名合格的JAVA程序员?

如何成为一名称职的Java编程人员&#xff1f;你一定不能错过的两本书。 第一本《Java核心技术速学版&#xff08;第3版&#xff09;》&#xff01; 1.经典Java作品《Java核心技术》的速学版本&#xff0c;降低学习门槛&#xff0c;帮助读者更容易学习Java&#xff0c;更快地把…

HTML+CSS TAB导航栏

效果演示 这段代码实现了一个名为"Tab导航栏"的效果,它是一个基于CSS的导航栏,包含五个选项卡,每个选项卡都有一个带有渐变背景色的滑块,当用户点击选项卡时,滑块会滑动到相应的位置。同时,选中的选项卡会变为白色,未选中的选项卡会变为灰色。 Code <!DOC…

基于FPGA实现LED的闪烁——HLS

基于FPGA实现LED的闪烁——HLS 引言&#xff1a; ​ 随着电子技术的飞速发展&#xff0c;硬件设计和开发的速度与效率成为了衡量一个项目成功与否的关键因素。在传统的硬件开发流程中&#xff0c;工程师通常需要使用VHDL或Verilog等硬件描述语言来编写底层的硬件逻辑&#xff0…