摘 要
随着中国经济的迅速发展,我国的各方面都取得了值得骄傲的进步,随着互联网的飞速发展,当前网络信息也越来越普及,无论是乡下还是城市,都有许多的人了解或是正在使用互联网。计算机成为了辅助类工具中的最佳。它方便,快捷,操作简单且价格合适。致使越来越多的人能够有资金购买计算机。让计算机越来越普及。疫情的结束使人们的生活逐渐开始有活力,人们之前都因为疫情在家隔离而无法出去,早就已经对运动迫不及待。学生也是,好不容易考了个大学而因为疫情一直都不能外出活动,而现在是人们最好的休闲的时间,锻炼已经成为人们日常进行休闲的一个不可或缺的方式。人们可以在挑选喜欢的器材进行锻炼,学生在学校进行锻炼。有的时候这些健身器材会坏,这就需要员工对坏器材进行报废记录。本项目主要是针对目前校园体育器材预约管理系统的实际需求,从实际工作出发,对过去的校园体育器材预约管理存在的问题进行分析,结合计算机系统的结构、概念、模型、原理、方法,在计算机各种优势的情况下,采用目前最流行的ssm框架和idea编辑器、mysql数据库设计并实现的。本校园体育器材预约管理系统主要包括体育器材管理、器材借还管理、管理员个人信息、器材报废登记、信息录入等多个模块。它帮助校园体育器材预约管理实现了信息化、网络化,通过测试,实现了系统设计目标,相比传统的管理模式,本系统合理的利用了网络数据资源,有效的减少了校园体育器材预约管理系统的经济投入,大大提高了校园体育器材预约管理系统的效率。
经过本人的综合考虑和研究校园体育器材预约管理系统的设计是基于java+mysql数据库+tomcat服务器+基于Java SSM架构的校园体育器材预约管理系统方式设计,以ieda为开发工具。该校园体育器材预约管理系统是基于面向对象编程(Java面向对象)的web应用程序。本系统是根据校园体育器材预约管理系统相关的业务流程等需求设计并实现业务。在过去校园体育器材预约管理使用传统的各种功能,使用人工的方式进行注册、查看、保存,这种方式存在着许多的缺点例如:首先就是它操作流程麻烦,使得有心的人也不想这么麻烦,另外时间一长将产生大量的冗余问题例如:大量的信息不知道从何处查询,这对于查找业务、更新和维护用户等信息都带来了不少的困难。如今采用计算机的方式进行信息化数据的管理,大大提高了管理的方便性、数据的安全性等,而且也适应了当今社会信息化高速发展的特征。
【关键词】校园体育器材预约管理系统,SSM, spring booot,jsp编程技术, mysql数据库
With the rapid development of China's economy, China has made proud progress in all aspects. With the rapid development of the Internet, currently, network information is becoming increasingly popular. Whether in rural areas or cities, many people understand or are using the Internet. Computers have become the best of auxiliary tools. It is convenient, fast, easy to operate, and affordable. As a result, more and more people can afford to buy computers. Let computers become more and more popular. The end of the epidemic has gradually brought vitality to people's lives. Previously, people were isolated at home due to the epidemic and were unable to go out. They have long been impatient for sports. Students, too, have not been able to go out for activities due to the epidemic, and now is the best time for people to relax. Exercise has become an indispensable way for people to engage in daily leisure. People can choose their favorite equipment for exercise, and students can exercise at school. Sometimes these fitness equipment can break down, which requires employees to keep a scrap record of the broken equipment. This project is mainly aimed at the actual needs of the current campus sports equipment reservation management system, starting from actual work, and analyzing the problems existing in the past campus sports equipment reservation management. Combining the structure, concepts, models, principles, and methods of computer systems, and with various advantages of computers, it is designed and implemented using the most popular SSM framework, idea editor, and MySQL database. The campus sports equipment reservation management system mainly includes sports equipment management, equipment borrowing and returning management, administrator personal information, equipment scrap registration, information entry and other modules. It helps campus sports equipment reservation management achieve informatization and networking. Through testing, the system design goals have been achieved. Compared to traditional management models, this system makes reasonable use of network data resources, effectively reducing the economic investment in the campus sports equipment reservation management system, and greatly improving the efficiency of the campus sports equipment reservation management system.
After my comprehensive consideration and research, the design of the campus sports equipment reservation management system is based on java+mysql database+tomcat server+a campus sports equipment reservation management system based on Java SSM architecture, with IEDA as the development tool. The campus sports equipment reservation management system is a web application based on object-oriented programming (Java object-oriented). This system is designed and implemented based on the business processes related to the campus sports equipment reservation management system. In the past, campus sports equipment reservation management used various traditional functions, using manual methods to register, view, and save. This method has many shortcomings, such as: first, it is cumbersome in the operation process, making intentional people do not want to be so troublesome. In addition, over time, there will be a large number of redundant issues, such as: a large amount of information does not know where to query, which is important for finding business Updating and maintaining user information has brought many difficulties. Nowadays, the use of computers for information data management has greatly improved the convenience of management and data security, and has also adapted to the characteristics of the rapid development of information technology in today's society.
【Key words】Campus sports equipment reservation management system, spring booot, jsp programming technology, mysql database
目 录
需要源码的私信或留言
以下是部分运行截图
以下是部分代码块
@RestController
@RequestMapping("scrap")
public class ScrapController extends BaseController {
@Autowired
EquMapper equMapper;
@Autowired
ManagerMapper managerMapper;
@Autowired
EquServiceImpl service;
@RequestMapping("addScrap") // 器材名 器材数 器材品牌(单价根据品牌和器材名从eprice表i中查出)session查管理员
public JsonResult<Scrap> addScrap(String ename, Integer enumber, String sup, HttpSession session){
Integer price=equMapper.selectPriceByEnameSup(ename,sup);
if (null==price){
return new JsonResult<>("您填写的信息有误,请重新核对");
}
System.err.println(ename+"损坏"+enumber+"个,品牌为:"+sup+"单价为:"+price);
String manager=managerMapper.findByNum(getNumFromSession(session)).getUsername();
//调用service方法向scrap表和scrapnote表中插入信息
service.addScrap(ename,enumber,price,sup,manager);
return new JsonResult<>(OK);
}
@RequestMapping("outputScrapExcel")
public JsonResult<String> outputScrapExcel(){
service.outputScrapExcel();
return new JsonResult<>(OK,"导出完毕,请返回桌面查看");
}
@RequestMapping("scraphistory")
public JsonResult<List<Scrap>> ShowScrapHistory(Integer page){
System.err.println(page);
return new JsonResult<>(OK,equMapper.showScrap(page));
}
@RequestMapping("updatescrap")
public JsonResult<Void> updateScrap(Integer id,String sup,Integer enumber,String ename,HttpSession session){
System.err.println("updatescrapcontroller");
System.err.println("id: "+id+" sup: "+sup+" name: "+ename+" number: "+enumber);
String manager=managerMapper.findByNum(getNumFromSession(session)).getUsername();
System.out.println(manager);
System.err.println(service.scrapupdate(id,ename,enumber,sup,"zm"));
return new JsonResult<>(OK);
}
@RequestMapping("addpurchase")
public JsonResult<Void> addPurchase(Purchase purchase,HttpSession session){
String manager=managerMapper.findByNum(getNumFromSession(session)).getUsername();
System.out.println(purchase.getEname());
System.out.println(purchase.getEnumber());
System.out.println(purchase.getUnit());
if (service.addPurchase(purchase,manager)==0){
throw new UpdateException("插入失败,采购表中有这条数据,您可以直接修改");
}
return new JsonResult<>(OK);
}
@RequestMapping("getscrapnotes")
public JsonResult<Scrap> change(Integer id){
System.err.println(id);
Scrap scrap=equMapper.findScrapById(id);
System.err.println(scrap);
return new JsonResult<>(OK,scrap);
}
//
@RequestMapping("createpurchase")
public JsonResult<Void> createPurchase(){
return new JsonResult<>(OK);
}
@RequestMapping("purchase")
public JsonResult<List<Purchase>> ShowPurchase(Integer page){
System.err.println(page);
return new JsonResult<>(OK,equMapper.showPurchase(page));
}
@RequestMapping("updatepurchase")
public JsonResult<Void> updatePurchase(Integer id,String unit,Integer enumber,String ename,HttpSession session){
System.err.println("updatePurchasecontroller");
String manager=managerMapper.findByNum(getNumFromSession(session)).getUsername();
System.err.println("id: "+id+" unit: "+unit+" name: "+ename+" number: "+enumber+"manager:"+manager);
System.err.println(service.purchasepdate(id,ename,enumber,unit,manager));
return new JsonResult<>(OK);
}
@RequestMapping("getpurchasenotes")
public JsonResult<Purchase> changePurchase(Integer id){
System.err.println(id);
Purchase purchase=equMapper.findPurchaseById(id);
System.err.println(purchase);
return new JsonResult<>(OK,purchase);
}
}
@RestController
@RequestMapping("/users")
public class ManagerController extends BaseController{
@Resource
IManagerService managerService;
@Autowired
ManagerMapper manager;
//登录
@RequestMapping("/logininfo")
public JsonResult<Void> logininfo(HttpSession session){
session.removeAttribute("num");
return new JsonResult<>(OK);
}
@Autowired
EmailSend emailSend;
@Autowired
ManagerMapper managerMapper;
private String realKey="";
//获取验证码
@RequestMapping("/sendRegKey")
public JsonResult<String> sendVerificationCode(String num){
System.out.println(num);
realKey= emailSend.KeyCreated();
if (emailSend.RegisterManager(realKey,managerService.findRegPwd(num))==1){
return new JsonResult<>(OK);
}
return new JsonResult<>(1000,"发送失败,请重试");
}
//注册
//http//localhost:8080/users/register?username=zm&password=1234
@RequestMapping("/register")
public JsonResult<String> register(Manager manager,String key){
System.out.println("key"+key);
System.out.println("realkey"+realKey);
if (key.equals(realKey)){
System.out.println("==");
managerService.reg(manager);
System.out.println("success");
return new JsonResult<>(OK);
}else {
System.out.println("false");
return new JsonResult<>(1111);
}
}
@RequestMapping("/loginnum")
public JsonResult<String> loginnum( HttpSession session){
String managernum=getNumFromSession(session);
System.err.println(managernum);
return new JsonResult<>(OK,managernum);
}
private String VerificationCode="";
@RequestMapping("/sendFindPwd")
public JsonResult<String> sendFindPwd(String num){
System.out.println(num);
VerificationCode=emailSend.KeyCreated();
System.out.println(VerificationCode);
if (emailSend.RegisterManager(VerificationCode,managerService.findPwd(num))==1){
return new JsonResult<>(OK);
}
return new JsonResult<>(1000,"发送失败,请重试");
}
@RequestMapping("/backPwd")
public JsonResult<String> findPwd(String num,String key){
System.out.println("key:"+key);
System.out.println("VerificationCode:"+VerificationCode);
if (!VerificationCode.equals(key)){
return new JsonResult<>(1111,"验证码错误");
}
return new JsonResult<>(OK);
}
@RequestMapping("/resetPwd")
public JsonResult<String> resetPwd(String num,String password){
if (managerService.resetPwd(num,password)!=1){
return new JsonResult<>(11111,"重置失败,请重试");
}
return new JsonResult<>(OK);
}