idea 数据库mysql5.7+ 数据库链接工具:navcat,小海豚等
环境: jdk8 tomcat8.5
摘 要
随着科学实验规模的不断扩大,实验室课程数量的急剧增加,有关实验室课程的各种信息量也在不断成倍增长。面对庞大的信息量,就需要有实验室课程管理系统来提高实验室课程管理工作的效率。通过这样的系统,我们可以做到信息的规范管理和快速查询,从而减少了管理方面的工作量。
建立实验室课程管理系统,进一步提高用户对实验室课程信息的查询。帮助学生、教师和管理者提高工作效率,实现信息查询的自动化。 使用本系统可以轻松快捷的为用户提供他们想要得到的实验室课程信息。
根据本系统的基本设计思路,本系统在设计方面系统界面采用了java语言,在Eclipse平台开发软件,使用ssm框架等进行基本的页面设计,后台数据库采用的是MySQL。本系统的设计实施为实验室课程管理系统的运行打下了基础,为实验室课程管理系统提供良好的教学条件。
最后我们通过分析功、测试调整实验室课程管理系统实现的实际需求相结合,讨论了技术开发实验室课程管理系统。
关键词:实验室课程管理;ssm框架;Java语言;
基于ssm实验室课程管理系统源码和论文745
演示视频:
基于ssm实验室课程管理系统源码和论文
Abstract
With the continuous expansion of the scale of scientific experiments, the number of laboratory courses has increased sharply, and the amount of information about laboratory courses has also increased exponentially. Facing the huge amount of information, it is necessary to have a laboratory course management system to improve the efficiency of laboratory course management. Through such a system, we can achieve the standard management of information and fast query, thus reducing the workload of management.
The establishment of laboratory course management system, further improve the users of laboratory course information query. Help students, teachers and administrators to improve work efficiency and realize the automation of information query. Using this system can easily and quickly provide users with the laboratory course information they want to get.
According to the basic design ideas of the system, the system in the design of the system interface using Java language, software development in Eclipse platform, the use of SSM framework for basic page design, background database using MySQL. The design and implementation of this system has laid a foundation for the operation of the laboratory curriculum management system, and provides good teaching conditions for the laboratory curriculum management system.
Finally, we discuss the technology development laboratory curriculum management system through the analysis of work, test adjustment laboratory curriculum management system to achieve the actual needs of the combination.
Key words: Laboratory curriculum management; SSM framework; The Java language.
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.WanzhengkechengEntity;
import com.entity.view.WanzhengkechengView;
import com.service.WanzhengkechengService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 完整课程
* 后端接口
* @author
* @email
* @date 2022-04-10 10:44:48
*/
@RestController
@RequestMapping("/wanzhengkecheng")
public class WanzhengkechengController {
@Autowired
private WanzhengkechengService wanzhengkechengService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,WanzhengkechengEntity wanzhengkecheng,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("jiazhang")) {
wanzhengkecheng.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WanzhengkechengEntity> ew = new EntityWrapper<WanzhengkechengEntity>();
PageUtils page = wanzhengkechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wanzhengkecheng), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,WanzhengkechengEntity wanzhengkecheng,
HttpServletRequest request){
EntityWrapper<WanzhengkechengEntity> ew = new EntityWrapper<WanzhengkechengEntity>();
PageUtils page = wanzhengkechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wanzhengkecheng), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( WanzhengkechengEntity wanzhengkecheng){
EntityWrapper<WanzhengkechengEntity> ew = new EntityWrapper<WanzhengkechengEntity>();
ew.allEq(MPUtil.allEQMapPre( wanzhengkecheng, "wanzhengkecheng"));
return R.ok().put("data", wanzhengkechengService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(WanzhengkechengEntity wanzhengkecheng){
EntityWrapper< WanzhengkechengEntity> ew = new EntityWrapper< WanzhengkechengEntity>();
ew.allEq(MPUtil.allEQMapPre( wanzhengkecheng, "wanzhengkecheng"));
WanzhengkechengView wanzhengkechengView = wanzhengkechengService.selectView(ew);
return R.ok("查询完整课程成功").put("data", wanzhengkechengView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WanzhengkechengEntity wanzhengkecheng = wanzhengkechengService.selectById(id);
return R.ok().put("data", wanzhengkecheng);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
WanzhengkechengEntity wanzhengkecheng = wanzhengkechengService.selectById(id);
return R.ok().put("data", wanzhengkecheng);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody WanzhengkechengEntity wanzhengkecheng, HttpServletRequest request){
wanzhengkecheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wanzhengkecheng);
wanzhengkechengService.insert(wanzhengkecheng);
return R.ok();
}
/**
* 前端保存
*/
@IgnoreAuth
@RequestMapping("/add")
public R add(@RequestBody WanzhengkechengEntity wanzhengkecheng, HttpServletRequest request){
wanzhengkecheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wanzhengkecheng);
wanzhengkechengService.insert(wanzhengkecheng);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody WanzhengkechengEntity wanzhengkecheng, HttpServletRequest request){
//ValidatorUtils.validateEntity(wanzhengkecheng);
wanzhengkechengService.updateById(wanzhengkecheng);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
wanzhengkechengService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<WanzhengkechengEntity> wrapper = new EntityWrapper<WanzhengkechengEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("jiazhang")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
int count = wanzhengkechengService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.ShebeixinxiEntity;
import com.entity.view.ShebeixinxiView;
import com.service.ShebeixinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 设备信息
* 后端接口
* @author
* @email
* @date 2022-04-26 17:52:15
*/
@RestController
@RequestMapping("/shebeixinxi")
public class ShebeixinxiController {
@Autowired
private ShebeixinxiService shebeixinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ShebeixinxiEntity shebeixinxi,
HttpServletRequest request){
EntityWrapper<ShebeixinxiEntity> ew = new EntityWrapper<ShebeixinxiEntity>();
PageUtils page = shebeixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shebeixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ShebeixinxiEntity shebeixinxi,
HttpServletRequest request){
EntityWrapper<ShebeixinxiEntity> ew = new EntityWrapper<ShebeixinxiEntity>();
PageUtils page = shebeixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shebeixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ShebeixinxiEntity shebeixinxi){
EntityWrapper<ShebeixinxiEntity> ew = new EntityWrapper<ShebeixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( shebeixinxi, "shebeixinxi"));
return R.ok().put("data", shebeixinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ShebeixinxiEntity shebeixinxi){
EntityWrapper< ShebeixinxiEntity> ew = new EntityWrapper< ShebeixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( shebeixinxi, "shebeixinxi"));
ShebeixinxiView shebeixinxiView = shebeixinxiService.selectView(ew);
return R.ok("查询设备信息成功").put("data", shebeixinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ShebeixinxiEntity shebeixinxi = shebeixinxiService.selectById(id);
return R.ok().put("data", shebeixinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ShebeixinxiEntity shebeixinxi = shebeixinxiService.selectById(id);
return R.ok().put("data", shebeixinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShebeixinxiEntity shebeixinxi, HttpServletRequest request){
shebeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shebeixinxi);
shebeixinxiService.insert(shebeixinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ShebeixinxiEntity shebeixinxi, HttpServletRequest request){
shebeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shebeixinxi);
shebeixinxiService.insert(shebeixinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ShebeixinxiEntity shebeixinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(shebeixinxi);
shebeixinxiService.updateById(shebeixinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shebeixinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ShebeixinxiEntity> wrapper = new EntityWrapper<ShebeixinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = shebeixinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}