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.ZonghecepingEntity;
import com.entity.view.ZonghecepingView;
import com.service.ZonghecepingService;
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-03-21 12:11:49
*/
@RestController
@RequestMapping("/zongheceping")
public class ZonghecepingController {
@Autowired
private ZonghecepingService zonghecepingService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ZonghecepingEntity zongheceping,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
zongheceping.setXuehao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("banzhuren")) {
zongheceping.setBanzhurengonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<ZonghecepingEntity> ew = new EntityWrapper<ZonghecepingEntity>();
PageUtils page = zonghecepingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zongheceping), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ZonghecepingEntity zongheceping,
HttpServletRequest request){
EntityWrapper<ZonghecepingEntity> ew = new EntityWrapper<ZonghecepingEntity>();
PageUtils page = zonghecepingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zongheceping), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ZonghecepingEntity zongheceping){
EntityWrapper<ZonghecepingEntity> ew = new EntityWrapper<ZonghecepingEntity>();
ew.allEq(MPUtil.allEQMapPre( zongheceping, "zongheceping"));
return R.ok().put("data", zonghecepingService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ZonghecepingEntity zongheceping){
EntityWrapper< ZonghecepingEntity> ew = new EntityWrapper< ZonghecepingEntity>();
ew.allEq(MPUtil.allEQMapPre( zongheceping, "zongheceping"));
ZonghecepingView zonghecepingView = zonghecepingService.selectView(ew);
return R.ok("查询综合测评成功").put("data", zonghecepingView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ZonghecepingEntity zongheceping = zonghecepingService.selectById(id);
return R.ok().put("data", zongheceping);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ZonghecepingEntity zongheceping = zonghecepingService.selectById(id);
return R.ok().put("data", zongheceping);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ZonghecepingEntity zongheceping, HttpServletRequest request){
zongheceping.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(zongheceping);
zonghecepingService.insert(zongheceping);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ZonghecepingEntity zongheceping, HttpServletRequest request){
zongheceping.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(zongheceping);
zonghecepingService.insert(zongheceping);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ZonghecepingEntity zongheceping, HttpServletRequest request){
//ValidatorUtils.validateEntity(zongheceping);
zonghecepingService.updateById(zongheceping);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
zonghecepingService.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<ZonghecepingEntity> wrapper = new EntityWrapper<ZonghecepingEntity>();
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("xuesheng")) {
wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("banzhuren")) {
wrapper.eq("banzhurengonghao", (String)request.getSession().getAttribute("username"));
}
int count = zonghecepingService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* (按值统计)
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<ZonghecepingEntity> ew = new EntityWrapper<ZonghecepingEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(ta
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
随着互联网技术的高速发展,人们生活的各方面都受到互联网技术的影响。现在人们可以通过互联网技术就能实现不出家门就可以通过网络进行系统管理,交易等,而且过程简单、快捷。同样的,在人们的工作生活中,也就需要互联网技术来方便人们的日常工作生活,实现工作办公的自动化处理,实现信息化,无纸化办公。 本课题在充分研究了在Springboot框架基础上,采用B/S模式,以Java为开发语言,MyEclipse为开发工具,MySQL为数据管理平台,实现的内容主要包括首页,个人中心,学生管理,教师管理,班级管理,综合测评管理等功能。 管理员登录系统后,能对首页、个人中心、学生管理、教师管理、班级管理、综合测评管理进行操作。教师登录到班级综合测评管理系统后,可以对首页、个人中心、学生管理、综合测评管理等进行操作。学生登录到班级综合测评管理系统后,可以对首页、个人中心、综合测评管理等进行操作。 关键词班级综合测评管理;Java;Springboot
资源推荐
资源详情
资源评论
收起资源包目录
175springboot + vue 班级综合测评管理系统.zip(可运行源码+数据库文件+文档) (414个子文件)
update-password.vue.bak 3KB
IndexMain.vue.bak 2KB
IndexAsideStatic.vue.bak 2KB
BreadCrumbs.vue.bak 2KB
IndexHeader.vue.bak 2KB
3-build.bat 15B
2-run.bat 14B
1-install.bat 12B
.classpath 2KB
mvnw.cmd 7KB
app.eb27530b.css 265KB
chunk-vendors.a72b0961.css 37KB
canvas-bg-1.css 391B
canvas-bg-2.css 83B
canvas-bg-3.css 61B
.factorypath 15KB
.gitignore 364B
index.html 924B
index.html 552B
favicon.ico 4KB
favicon.ico 4KB
maven-wrapper.jar 50KB
ZonghecepingController.java 11KB
CommonController.java 9KB
XueshengController.java 9KB
BanzhurenController.java 9KB
ZhiyuchengjiEntity.java 9KB
ZhiyuchengjiModel.java 8KB
ZhiyuchengjiVO.java 7KB
ZhiyuchengjiController.java 7KB
DeyuchengjiController.java 7KB
TiyuchengjiController.java 7KB
BanjiController.java 6KB
MenuController.java 6KB
MPUtil.java 5KB
UserController.java 5KB
DeyuchengjiEntity.java 5KB
ZonghecepingEntity.java 5KB
MavenWrapperDownloader.java 5KB
TiyuchengjiEntity.java 4KB
FileController.java 4KB
DeyuchengjiModel.java 4KB
XueshengEntity.java 4KB
ZonghecepingModel.java 4KB
DeyuchengjiVO.java 4KB
ZonghecepingVO.java 4KB
BaiduUtil.java 4KB
BanzhurenEntity.java 3KB
AuthorizationInterceptor.java 3KB
ConfigController.java 3KB
TiyuchengjiModel.java 3KB
TiyuchengjiVO.java 3KB
XueshengModel.java 3KB
XueshengVO.java 3KB
Query.java 3KB
ZonghecepingServiceImpl.java 3KB
TokenServiceImpl.java 2KB
BanjiEntity.java 2KB
BanzhurenModel.java 2KB
TokenEntity.java 2KB
CommonUtil.java 2KB
BanzhurenVO.java 2KB
ZhiyuchengjiServiceImpl.java 2KB
MenuEntity.java 2KB
PageUtils.java 2KB
TiyuchengjiServiceImpl.java 2KB
DeyuchengjiServiceImpl.java 2KB
BanzhurenServiceImpl.java 2KB
XueshengServiceImpl.java 2KB
BanjiServiceImpl.java 2KB
MenuServiceImpl.java 2KB
InterceptorConfig.java 1KB
ZonghecepingDao.java 1KB
CommonServiceImpl.java 1KB
ZonghecepingService.java 1KB
UserServiceImpl.java 1KB
UserEntity.java 1KB
SpringContextUtils.java 1KB
ValidatorUtils.java 1KB
SQLFilter.java 1KB
ZhiyuchengjiService.java 1KB
BanjiModel.java 1KB
ZhiyuchengjiDao.java 1KB
DeyuchengjiService.java 1KB
TiyuchengjiService.java 1KB
TiyuchengjiDao.java 1014B
DeyuchengjiDao.java 1014B
HttpClientUtils.java 1013B
BanzhurenService.java 997B
BanzhurenDao.java 981B
XueshengService.java 980B
XueshengDao.java 963B
ZhiyuchengjiView.java 946B
ZonghecepingView.java 946B
BanjiService.java 938B
TiyuchengjiView.java 937B
DeyuchengjiView.java 937B
BanjiVO.java 933B
MenuService.java 924B
BanjiDao.java 918B
共 414 条
- 1
- 2
- 3
- 4
- 5
资源评论
卖仔爪蛙爱编程
- 粉丝: 3170
- 资源: 530
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功