养老院管理系统基于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.mzph.cn/news/843406.shtml

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

相关文章

再创佳绩丨达梦数据库一体机荣获2024数字中国创新大赛·信创赛道总决赛一等奖

5月24日&#xff0c;第七届数字中国建设峰会在福州盛大开幕&#xff0c;峰会内容安排包含开幕式、主论坛、分论坛、数字中国创新大赛、现场体验区及成果发布和专业工作会议等。武汉达梦数据库股份有限公司(以下简称达梦数据)受邀参加并在展、会、赛等多个环节深度参与。达梦全栈…

dolphinscheduler standalone安装

官方文档&#xff1a;https://dolphinscheduler.apache.org/en-us/docs/3.1.3/guide/installation/standalone 1.安装&#xff08;以放在/home为例&#xff09; 下载见&#xff1a;https://download.csdn.net/download/taotao_guiwang/89311365 tar -xvzf apache-dolphinsche…

pytorch比较操作

文章目录 常用的比较操作1.torch.allclose()2.torch.argsort()3.torch.eq()4.torch.equal()5.torch.greater_equal()6.torch.gt()7.torch.isclose()8.torch.isfinite()9.torch.isif()10.torch.isposinf()11.torch.isneginf()12.torch.isnan()13.torch.kthvalue()14.torch.less_…

NLP技术发展和相关书籍分享

自然语言处理&#xff08;Natural Language Processing&#xff0c;NLP&#xff09;是计算机科学领域和人工智能领域的重要研究方向之一&#xff0c;旨在探索实现人与计算机之间用自然语言进行有效交流的理论与方法。它融合了语言学、计算机科学、机器学习、数学、认知心理学等…

外卖系统源码解读:校园外卖APP开发全攻略

外卖系统源码解读&#xff1a;校园外卖APP开发全攻略 今天&#xff0c;小编将深入解读外卖系统的源码&#xff0c;详细介绍如何开发一款功能齐全的校园外卖APP&#xff0c;帮助开发者快速上手&#xff0c;打造出高质量的外卖应用。 一、需求分析 应具备以下基本功能&#xff…

idea的project structure下project [lauguage ]()level 没有java的sdk17选项如何导入

idea的project structure下project lauguage level 没有java的sdk17选项如何导入 别导入了&#xff0c;需要升级idea版本。idea中没有project language level没有17如何添加 - CSDN文库 别听这文章瞎扯淡 2021版本就是没有&#xff0c;直接卸载升级到最新版本就可以了。没办法…

AcWing 2568:树链剖分 ← 线段树+DFS

【题目来源】https://www.acwing.com/problem/content/2570/【题目描述】 给定一棵树&#xff0c;树中包含 n 个节点&#xff08;编号 1∼n&#xff09;&#xff0c;其中第 i 个节点的权值为 ai。 初始时&#xff0c;1 号节点为树的根节点。 现在要对该树进行 m 次操作&#xf…

央视网视频下载和花屏问题处理

央视网(www.cctv.com)视频下载往往是花屏的&#xff0c;如何处理呢&#xff1f; 如果您是IT技术开发者&#xff0c;那么您可以通过下面步骤自己实现。 用chrome浏览器&#xff0c;F2打开开发者工具&#xff0c;找到当前页面的network 然后找一个接口&#xff1a;https://vdn.a…

文生图模型演进:AE、VAE、VQ-VAE、VQ-GAN、DALL-E 等 8 模型

节前&#xff0c;我们星球组织了一场算法岗技术&面试讨论会&#xff0c;邀请了一些互联网大厂朋友、参加社招和校招面试的同学。 针对算法岗技术趋势、大模型落地项目经验分享、新手如何入门算法岗、该如何准备、面试常考点分享等热门话题进行了深入的讨论。 合集&#x…

OC IOS 文件解压缩预览

热很。。热很。。。。夏天的城市只有热浪没有情怀。。。 来吧&#xff0c;come on。。。 引用第三方库&#xff1a; pod SSZipArchive 开发实现&#xff1a; 一、控制器实现 头文件控制器定义&#xff1a; // // ZipRarViewController.h // // Created by carbonzhao on 2…

OTFS系统建模、通信性能分析、信道估计、模糊函数【附MATLAB代码】

文献来源&#xff1a;​微信公众号&#xff1a;EW Frontier OTFS简介 OTFS信道估计 % Clear command window, workspace variables, and close all figures clc; clear all; close all; ​ % Define Eb values in dB EbdB -10:2:10; ​ % Convert Eb values from dB to lin…

【测评】香橙派 AIpro上手初体验

AI毋庸置疑是近年来&#xff0c;热度最高的技术之一&#xff0c;作为一名工程师拥抱新技术的同时不可或缺的需要一块强悍的开发板&#xff0c;香橙派 AIpro除了拥有好看的皮囊之外&#xff0c;还拥有一个有趣且充满魅力的灵魂。作为一位长期活跃在嵌入式开发领域的工程师&#…

OrangePi AIpro (8T)使用体验,性能测试报告

前言 这段时间收到了CSDN和香橙派的邀请&#xff0c;对OrangePi AIpro进行体验测评&#xff0c;在此感谢CSDN对我的信任&#xff0c;也感谢香橙派能做出如此优秀的开发板。 可喜可贺&#xff0c;周三晚上我收到了官方寄出的OrangePi AIpro。出于对国产芯片的好奇&#xff0c…

二分答案思想下的二进制问题

序列合并 题目描述 给定一个长度为 n n n 的非负整数序列 { a n } \{a_n\} {an​}&#xff0c;你可以进行 k k k 次操作&#xff0c;每次操作你选择两个相邻的数&#xff0c;把它们合并成它们的按位或。 形式化地&#xff0c;一次操作中&#xff0c;你选择一个下标 i i …

李廉洋:5.29黄金原油持续震荡,今日美盘行情走势分析及策略。

黄金消息面分析&#xff1a;美联储理事鲍曼周二表示&#xff0c;她支持要么先等等再开始放缓缩减资产负债表&#xff0c;要么采取比本月早些时候宣布的更温和的放慢缩表进程。鲍曼认为商业银行准备金水平仍然充足&#xff0c;这让官员们有更多时间来推进缩表进程。“在准备金接…

你的手机是如何控制你的手表之广播篇

前言 要让手机能够控制手表&#xff0c;第一步当然要让手机能够“看见”手表&#xff0c;人类作为上帝视角&#xff0c;我们是能够通过眼睛直接看见手机和手表的&#xff0c;但要让手机“看见”手表&#xff0c;就需要一端把自己的信息通过电磁波的形式发往空中&#xff0c;另…

Excel中怎样将第一行建立好的规则套用到每一行?

考虑使用条件格式来完成&#xff0c;有两种方式可以尝试&#xff1a; 一、一次性创建条件格式 1.选中需要设置条件格式的区域&#xff0c;如果是不连续的区域&#xff0c;可以按住Ctrl键&#xff0c;然后用鼠标依次选中需要的数据区域 2.点击 开始选项卡&#xff0c;条件格式…

解决Plugin ‘maven-clean-plugin:3.1.0‘ not found的问题

1. 问题描述 当导入别人的Maven项目时&#xff0c;可能会出现Plugin maven-clean-plugin:3.1.0 not found的错误信息。 2. 解决方案 2.1 方案一 检查自己的Maven仓库地址是否正确&#xff0c;一般引入其他人的项目时&#xff0c;Maven仓库的目录以及配置都会是别人的&#xff…

Broker的主从架构

为了保证MQ的数据不丢失而且具备一定的高可用性&#xff0c;所以一般都是得将Broker部署成Master-Slave模式的&#xff0c;也就是—个Master Broker对应一个Slave Broker Master需要在接收到消息之后&#xff0c;将数据同步给Slave&#xff0c;这样一旦Master Broker挂了&#…

新能源汽车为乙炔炭黑行业带来了发展机遇

新能源汽车为乙炔炭黑行业带来了发展机遇 乙炔炭黑&#xff08;Acetylene carbon black&#xff09;又称乙炔黑&#xff0c;外观为黑色极细粉末&#xff0c;相对密度1.95&#xff08;氮置换法&#xff09;&#xff0c;纯度很高&#xff0c;含碳量大于99.5%&#xff0c;氢含量小…