项目介绍
采用java技术构建的一个管理系统。整个开发过程首先对系统进行需求分析,得出系统的主要功能。接着对系统进行总体设计和详细设计。总体设计主要包括系统功能设计、系统总体结构设计、系统数据结构设计和系统安全设计等;详细设计主要包括系统数据库访问的实现,主要功能模块的具体实现,模块实现关键代码等。最后对系统进行功能测试,并对测试结果进行分析总结。 包括程序毕设程序源代码一份,数据库一份,完美运行。
开发环境
编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序/vue/爬虫/c#/asp.net
系统实现
核心代码
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.BaoxiaoshenqingEntity;
import com.entity.view.BaoxiaoshenqingView;
import com.service.BaoxiaoshenqingService;
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
*/
@RestController
@RequestMapping("/baoxiaoshenqing")
public class BaoxiaoshenqingController {
@Autowired
private BaoxiaoshenqingService baoxiaoshenqingService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BaoxiaoshenqingEntity baoxiaoshenqing,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yuangong")) {
baoxiaoshenqing.setYuangonggonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<BaoxiaoshenqingEntity> ew = new EntityWrapper<BaoxiaoshenqingEntity>();
PageUtils page = baoxiaoshenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baoxiaoshenqing), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("st")
public R list(@RequestParam Map<String, Object> params,BaoxiaoshenqingEntity baoxiaoshenqing,
HttpServletRequest request){
EntityWrapper<BaoxiaoshenqingEntity> ew = new EntityWrapper<BaoxiaoshenqingEntity>();
PageUtils page = baoxiaoshenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baoxiaoshenqing), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("sts")
public R list( BaoxiaoshenqingEntity baoxiaoshenqing){
EntityWrapper<BaoxiaoshenqingEntity> ew = new EntityWrapper<BaoxiaoshenqingEntity>();
ew.allEq(MPUtil.allEQMapPre( baoxiaoshenqing, "baoxiaoshenqing"));
return R.ok().put("data", baoxiaoshenqingService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(BaoxiaoshenqingEntity baoxiaoshenqing){
EntityWrapper< BaoxiaoshenqingEntity> ew = new EntityWrapper< BaoxiaoshenqingEntity>();
ew.allEq(MPUtil.allEQMapPre( baoxiaoshenqing, "baoxiaoshenqing"));
BaoxiaoshenqingView baoxiaoshenqingView = baoxiaoshenqingService.selectView(ew);
return R.ok("查询报销申请成功").put("data", baoxiaoshenqingView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
BaoxiaoshenqingEntity baoxiaoshenqing = baoxiaoshenqingService.selectById(id);
return R.ok().put("data", baoxiaoshenqing);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
BaoxiaoshenqingEntity baoxiaoshenqing = baoxiaoshenqingService.selectById(id);
return R.ok().put("data", baoxiaoshenqing);
}
/**
* 后端保存
*/
@RequestMapping("ve")
public R save(@RequestBody BaoxiaoshenqingEntity baoxiaoshenqing, HttpServletRequest request){
baoxiaoshenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(baoxiaoshenqing);
baoxiaoshenqingService.insert(baoxiaoshenqing);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody BaoxiaoshenqingEntity baoxiaoshenqing, HttpServletRequest request){
baoxiaoshenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(baoxiaoshenqing);
baoxiaoshenqingService.insert(baoxiaoshenqing);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BaoxiaoshenqingEntity baoxiaoshenqing, HttpServletRequest request){
//ValidatorUtils.validateEntity(baoxiaoshenqing);
baoxiaoshenqingService.updateById(baoxiaoshenqing);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
baoxiaoshenqingService.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<BaoxiaoshenqingEntity> wrapper = new EntityWrapper<BaoxiaoshenqingEntity>();
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("yuangong")) {
wrapper.eq("yuangonggonghao", (String)request.getSession().getAttribute("username"));
}
int count = baoxiaoshenqingService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
论文参考
目录
第一章 绪论 5
1.1 研究背景 5
1.2 系统研究现状 5
1.3 系统实现的功能 6
1.4 系统实现的特点 6
1.5 本文的组织结构 6
第二章开发技术与环境配置 7
2.1 Java语言简介 7
2.2 Vue技术 8
2.3 MySQL环境配置 8
2.4 IDEA环境配置 9
2.5 Mysql数据库介绍 9
2.6 B/S架构 9
第三章系统分析与设计 11
3.1 可行性分析 11
3.1.1 技术可行性 11
3.1.2 操作可行性 11
3.1.3经济可行性 11
3.2 需求分析 12
3.3 总体设计 12
3.4 数据库设计与实现 13
3.4.1 数据库概念结构设计 13
3.4.2 数据库具体设计 14
第四章 系统功能的具体实现 22
4.1 系统功能模块 22
4.2 管理员功能模块 25
第五章 系统测试 29
总结 30
参考文献 31
致谢 32