当前位置:   article > 正文

基于ssm后台的宿舍管理系统小程序源码和论文

基于ssm后台的宿舍管理系统小程序源码和论文

基于SSM框架的系统开发的意义如下:

1、管理人员查询学生信息、住宿信息、设施损耗信息、宿舍人员离校信息等变得快捷化,提高了查询的效率,通过输入关键字就可以快速精准的锁定查询,管理员也不需要用手工来记录统计学生出入的信息、宿舍设施损耗的信息,只需要在系统上搜索查询就能了如指掌。

2、因为这套管理系统是在线上操作,全部的信息查询以及输入都是通过电子系统来完成,所以它的管理没有时间上的限制,管理员可以在任何时间进行操作,只需要在自己的电脑安装本系统,通过浏览器进行相应的操作就可以,具有较强的管理实实时性和高效率

3、管理员拥有这套宿舍管理系统,就可以在系统内输入关键信息就可以搜寻到自己想要查询的内容,以前借助于手工记录查询和统计学生信息、宿舍报损信息,不仅效率低下,而且也容易出错。有了这款软件,所有的数据信息都是在管理人员的电脑上显示,信息的录入是借助网络和计算机的无纸媒体,是电脑配套的鼠标以及文字键入的键盘等工具。

4、这套系统既然是线上网络运行,它的安全性就有很强的保证。以前的人工记录宿舍的相关信息,只能记录在笔记本或者表格等纸质的媒介,这样容易丢失也容易出现统计的不便。而采用网络系统办公处理各项学生住宿信息、宿舍人员出入信息以及宿舍设施报损信息等,操作员需要输入用户名密码访问网站,添加处理这些信息就会变得异常便利化,而且数据信息保存时间很长,网站使用稳定性能高,网站能够长期使用,数据信息管理上升到了通过计算机管理的层面,实现系统管理从传统手段的升级。

基于ssm后台的宿舍管理系统小程序源码和论文weixin119

演示视频:

基于ssm后台的宿舍管理系统小程序源码和论文_哔哩哔哩_bilibili

  1. package com.controller;
  2. import java.text.SimpleDateFormat;
  3. import java.util.ArrayList;
  4. import java.util.Arrays;
  5. import java.util.Calendar;
  6. import java.util.Map;
  7. import java.util.HashMap;
  8. import java.util.Iterator;
  9. import java.util.Date;
  10. import java.util.List;
  11. import javax.servlet.http.HttpServletRequest;
  12. import com.utils.ValidatorUtils;
  13. import org.apache.commons.lang3.StringUtils;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.format.annotation.DateTimeFormat;
  16. import org.springframework.web.bind.annotation.PathVariable;
  17. import org.springframework.web.bind.annotation.RequestBody;
  18. import org.springframework.web.bind.annotation.RequestMapping;
  19. import org.springframework.web.bind.annotation.RequestParam;
  20. import org.springframework.web.bind.annotation.RestController;
  21. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  22. import com.baomidou.mybatisplus.mapper.Wrapper;
  23. import com.annotation.IgnoreAuth;
  24. import com.entity.LisushenqingEntity;
  25. import com.entity.view.LisushenqingView;
  26. import com.service.LisushenqingService;
  27. import com.service.TokenService;
  28. import com.utils.PageUtils;
  29. import com.utils.R;
  30. import com.utils.MD5Util;
  31. import com.utils.MPUtil;
  32. import com.utils.CommonUtil;
  33. /**
  34. * 离宿申请
  35. * 后端接口
  36. * @author
  37. * @email
  38. * @date 2021-04-20 15:40:28
  39. */
  40. @RestController
  41. @RequestMapping("/lisushenqing")
  42. public class LisushenqingController {
  43. @Autowired
  44. private LisushenqingService lisushenqingService;
  45. /**
  46. * 后端列表
  47. */
  48. @RequestMapping("/page")
  49. public R page(@RequestParam Map<String, Object> params,LisushenqingEntity lisushenqing,
  50. HttpServletRequest request){
  51. String tableName = request.getSession().getAttribute("tableName").toString();
  52. if(tableName.equals("xuesheng")) {
  53. lisushenqing.setXuehao((String)request.getSession().getAttribute("username"));
  54. }
  55. EntityWrapper<LisushenqingEntity> ew = new EntityWrapper<LisushenqingEntity>();
  56. PageUtils page = lisushenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lisushenqing), params), params));
  57. return R.ok().put("data", page);
  58. }
  59. /**
  60. * 前端列表
  61. */
  62. @RequestMapping("/list")
  63. public R list(@RequestParam Map<String, Object> params,LisushenqingEntity lisushenqing, HttpServletRequest request){
  64. String tableName = request.getSession().getAttribute("tableName").toString();
  65. if(tableName.equals("xuesheng")) {
  66. lisushenqing.setXuehao((String)request.getSession().getAttribute("username"));
  67. }
  68. EntityWrapper<LisushenqingEntity> ew = new EntityWrapper<LisushenqingEntity>();
  69. PageUtils page = lisushenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lisushenqing), params), params));
  70. return R.ok().put("data", page);
  71. }
  72. /**
  73. * 列表
  74. */
  75. @RequestMapping("/lists")
  76. public R list( LisushenqingEntity lisushenqing){
  77. EntityWrapper<LisushenqingEntity> ew = new EntityWrapper<LisushenqingEntity>();
  78. ew.allEq(MPUtil.allEQMapPre( lisushenqing, "lisushenqing"));
  79. return R.ok().put("data", lisushenqingService.selectListView(ew));
  80. }
  81. /**
  82. * 查询
  83. */
  84. @RequestMapping("/query")
  85. public R query(LisushenqingEntity lisushenqing){
  86. EntityWrapper< LisushenqingEntity> ew = new EntityWrapper< LisushenqingEntity>();
  87. ew.allEq(MPUtil.allEQMapPre( lisushenqing, "lisushenqing"));
  88. LisushenqingView lisushenqingView = lisushenqingService.selectView(ew);
  89. return R.ok("查询离宿申请成功").put("data", lisushenqingView);
  90. }
  91. /**
  92. * 后端详情
  93. */
  94. @RequestMapping("/info/{id}")
  95. public R info(@PathVariable("id") Long id){
  96. LisushenqingEntity lisushenqing = lisushenqingService.selectById(id);
  97. return R.ok().put("data", lisushenqing);
  98. }
  99. /**
  100. * 前端详情
  101. */
  102. @RequestMapping("/detail/{id}")
  103. public R detail(@PathVariable("id") Long id){
  104. LisushenqingEntity lisushenqing = lisushenqingService.selectById(id);
  105. return R.ok().put("data", lisushenqing);
  106. }
  107. /**
  108. * 后端保存
  109. */
  110. @RequestMapping("/save")
  111. public R save(@RequestBody LisushenqingEntity lisushenqing, HttpServletRequest request){
  112. lisushenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  113. //ValidatorUtils.validateEntity(lisushenqing);
  114. lisushenqingService.insert(lisushenqing);
  115. return R.ok();
  116. }
  117. /**
  118. * 前端保存
  119. */
  120. @RequestMapping("/add")
  121. public R add(@RequestBody LisushenqingEntity lisushenqing, HttpServletRequest request){
  122. lisushenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  123. //ValidatorUtils.validateEntity(lisushenqing);
  124. lisushenqing.setUserid((Long)request.getSession().getAttribute("userId"));
  125. lisushenqingService.insert(lisushenqing);
  126. return R.ok();
  127. }
  128. /**
  129. * 修改
  130. */
  131. @RequestMapping("/update")
  132. public R update(@RequestBody LisushenqingEntity lisushenqing, HttpServletRequest request){
  133. //ValidatorUtils.validateEntity(lisushenqing);
  134. lisushenqingService.updateById(lisushenqing);//全部更新
  135. return R.ok();
  136. }
  137. /**
  138. * 删除
  139. */
  140. @RequestMapping("/delete")
  141. public R delete(@RequestBody Long[] ids){
  142. lisushenqingService.deleteBatchIds(Arrays.asList(ids));
  143. return R.ok();
  144. }
  145. /**
  146. * 提醒接口
  147. */
  148. @RequestMapping("/remind/{columnName}/{type}")
  149. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
  150. @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
  151. map.put("column", columnName);
  152. map.put("type", type);
  153. if(type.equals("2")) {
  154. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  155. Calendar c = Calendar.getInstance();
  156. Date remindStartDate = null;
  157. Date remindEndDate = null;
  158. if(map.get("remindstart")!=null) {
  159. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
  160. c.setTime(new Date());
  161. c.add(Calendar.DAY_OF_MONTH,remindStart);
  162. remindStartDate = c.getTime();
  163. map.put("remindstart", sdf.format(remindStartDate));
  164. }
  165. if(map.get("remindend")!=null) {
  166. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
  167. c.setTime(new Date());
  168. c.add(Calendar.DAY_OF_MONTH,remindEnd);
  169. remindEndDate = c.getTime();
  170. map.put("remindend", sdf.format(remindEndDate));
  171. }
  172. }
  173. Wrapper<LisushenqingEntity> wrapper = new EntityWrapper<LisushenqingEntity>();
  174. if(map.get("remindstart")!=null) {
  175. wrapper.ge(columnName, map.get("remindstart"));
  176. }
  177. if(map.get("remindend")!=null) {
  178. wrapper.le(columnName, map.get("remindend"));
  179. }
  180. String tableName = request.getSession().getAttribute("tableName").toString();
  181. if(tableName.equals("xuesheng")) {
  182. wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
  183. }
  184. int count = lisushenqingService.selectCount(wrapper);
  185. return R.ok().put("count", count);
  186. }
  187. }

 

  1. package com.controller;
  2. import java.text.SimpleDateFormat;
  3. import java.util.ArrayList;
  4. import java.util.Arrays;
  5. import java.util.Calendar;
  6. import java.util.Map;
  7. import java.util.HashMap;
  8. import java.util.Iterator;
  9. import java.util.Date;
  10. import java.util.List;
  11. import javax.servlet.http.HttpServletRequest;
  12. import com.utils.ValidatorUtils;
  13. import org.apache.commons.lang3.StringUtils;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.format.annotation.DateTimeFormat;
  16. import org.springframework.web.bind.annotation.PathVariable;
  17. import org.springframework.web.bind.annotation.RequestBody;
  18. import org.springframework.web.bind.annotation.RequestMapping;
  19. import org.springframework.web.bind.annotation.RequestParam;
  20. import org.springframework.web.bind.annotation.RestController;
  21. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  22. import com.baomidou.mybatisplus.mapper.Wrapper;
  23. import com.annotation.IgnoreAuth;
  24. import com.entity.BaoxiuchuliEntity;
  25. import com.entity.view.BaoxiuchuliView;
  26. import com.service.BaoxiuchuliService;
  27. import com.service.TokenService;
  28. import com.utils.PageUtils;
  29. import com.utils.R;
  30. import com.utils.MD5Util;
  31. import com.utils.MPUtil;
  32. import com.utils.CommonUtil;
  33. /**
  34. * 报修处理
  35. * 后端接口
  36. * @author
  37. * @email
  38. * @date 2021-04-20 15:40:28
  39. */
  40. @RestController
  41. @RequestMapping("/baoxiuchuli")
  42. public class BaoxiuchuliController {
  43. @Autowired
  44. private BaoxiuchuliService baoxiuchuliService;
  45. /**
  46. * 后端列表
  47. */
  48. @RequestMapping("/page")
  49. public R page(@RequestParam Map<String, Object> params,BaoxiuchuliEntity baoxiuchuli,
  50. HttpServletRequest request){
  51. String tableName = request.getSession().getAttribute("tableName").toString();
  52. if(tableName.equals("xuesheng")) {
  53. baoxiuchuli.setXuehao((String)request.getSession().getAttribute("username"));
  54. }
  55. EntityWrapper<BaoxiuchuliEntity> ew = new EntityWrapper<BaoxiuchuliEntity>();
  56. PageUtils page = baoxiuchuliService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baoxiuchuli), params), params));
  57. return R.ok().put("data", page);
  58. }
  59. /**
  60. * 前端列表
  61. */
  62. @RequestMapping("/list")
  63. public R list(@RequestParam Map<String, Object> params,BaoxiuchuliEntity baoxiuchuli, HttpServletRequest request){
  64. String tableName = request.getSession().getAttribute("tableName").toString();
  65. if(tableName.equals("xuesheng")) {
  66. baoxiuchuli.setXuehao((String)request.getSession().getAttribute("username"));
  67. }
  68. EntityWrapper<BaoxiuchuliEntity> ew = new EntityWrapper<BaoxiuchuliEntity>();
  69. PageUtils page = baoxiuchuliService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baoxiuchuli), params), params));
  70. return R.ok().put("data", page);
  71. }
  72. /**
  73. * 列表
  74. */
  75. @RequestMapping("/lists")
  76. public R list( BaoxiuchuliEntity baoxiuchuli){
  77. EntityWrapper<BaoxiuchuliEntity> ew = new EntityWrapper<BaoxiuchuliEntity>();
  78. ew.allEq(MPUtil.allEQMapPre( baoxiuchuli, "baoxiuchuli"));
  79. return R.ok().put("data", baoxiuchuliService.selectListView(ew));
  80. }
  81. /**
  82. * 查询
  83. */
  84. @RequestMapping("/query")
  85. public R query(BaoxiuchuliEntity baoxiuchuli){
  86. EntityWrapper< BaoxiuchuliEntity> ew = new EntityWrapper< BaoxiuchuliEntity>();
  87. ew.allEq(MPUtil.allEQMapPre( baoxiuchuli, "baoxiuchuli"));
  88. BaoxiuchuliView baoxiuchuliView = baoxiuchuliService.selectView(ew);
  89. return R.ok("查询报修处理成功").put("data", baoxiuchuliView);
  90. }
  91. /**
  92. * 后端详情
  93. */
  94. @RequestMapping("/info/{id}")
  95. public R info(@PathVariable("id") Long id){
  96. BaoxiuchuliEntity baoxiuchuli = baoxiuchuliService.selectById(id);
  97. return R.ok().put("data", baoxiuchuli);
  98. }
  99. /**
  100. * 前端详情
  101. */
  102. @RequestMapping("/detail/{id}")
  103. public R detail(@PathVariable("id") Long id){
  104. BaoxiuchuliEntity baoxiuchuli = baoxiuchuliService.selectById(id);
  105. return R.ok().put("data", baoxiuchuli);
  106. }
  107. /**
  108. * 后端保存
  109. */
  110. @RequestMapping("/save")
  111. public R save(@RequestBody BaoxiuchuliEntity baoxiuchuli, HttpServletRequest request){
  112. baoxiuchuli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  113. //ValidatorUtils.validateEntity(baoxiuchuli);
  114. baoxiuchuliService.insert(baoxiuchuli);
  115. return R.ok();
  116. }
  117. /**
  118. * 前端保存
  119. */
  120. @RequestMapping("/add")
  121. public R add(@RequestBody BaoxiuchuliEntity baoxiuchuli, HttpServletRequest request){
  122. baoxiuchuli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  123. //ValidatorUtils.validateEntity(baoxiuchuli);
  124. baoxiuchuli.setUserid((Long)request.getSession().getAttribute("userId"));
  125. baoxiuchuliService.insert(baoxiuchuli);
  126. return R.ok();
  127. }
  128. /**
  129. * 修改
  130. */
  131. @RequestMapping("/update")
  132. public R update(@RequestBody BaoxiuchuliEntity baoxiuchuli, HttpServletRequest request){
  133. //ValidatorUtils.validateEntity(baoxiuchuli);
  134. baoxiuchuliService.updateById(baoxiuchuli);//全部更新
  135. return R.ok();
  136. }
  137. /**
  138. * 删除
  139. */
  140. @RequestMapping("/delete")
  141. public R delete(@RequestBody Long[] ids){
  142. baoxiuchuliService.deleteBatchIds(Arrays.asList(ids));
  143. return R.ok();
  144. }
  145. /**
  146. * 提醒接口
  147. */
  148. @RequestMapping("/remind/{columnName}/{type}")
  149. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
  150. @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
  151. map.put("column", columnName);
  152. map.put("type", type);
  153. if(type.equals("2")) {
  154. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  155. Calendar c = Calendar.getInstance();
  156. Date remindStartDate = null;
  157. Date remindEndDate = null;
  158. if(map.get("remindstart")!=null) {
  159. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
  160. c.setTime(new Date());
  161. c.add(Calendar.DAY_OF_MONTH,remindStart);
  162. remindStartDate = c.getTime();
  163. map.put("remindstart", sdf.format(remindStartDate));
  164. }
  165. if(map.get("remindend")!=null) {
  166. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
  167. c.setTime(new Date());
  168. c.add(Calendar.DAY_OF_MONTH,remindEnd);
  169. remindEndDate = c.getTime();
  170. map.put("remindend", sdf.format(remindEndDate));
  171. }
  172. }
  173. Wrapper<BaoxiuchuliEntity> wrapper = new EntityWrapper<BaoxiuchuliEntity>();
  174. if(map.get("remindstart")!=null) {
  175. wrapper.ge(columnName, map.get("remindstart"));
  176. }
  177. if(map.get("remindend")!=null) {
  178. wrapper.le(columnName, map.get("remindend"));
  179. }
  180. String tableName = request.getSession().getAttribute("tableName").toString();
  181. if(tableName.equals("xuesheng")) {
  182. wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
  183. }
  184. int count = baoxiuchuliService.selectCount(wrapper);
  185. return R.ok().put("count", count);
  186. }
  187. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/616404
推荐阅读
相关标签
  

闽ICP备14008679号