作者:计算机学长阿伟
开发技术:SpringBoot、SSM、Vue、MySQL、ElementUI等,“文末源码”。
开发运行环境
- 开发语言:Java
- 数据库:MySQL
- 技术:SpringBoot、Vue、Mybaits Plus、ELementUI
- 工具:IDEA/Ecilpse、Navicat、Maven
源码下载地址:
Java项目-基于springboot框架的校园医疗保险管理系统项目实战(附源码+文档)资源-CSDN文库
一、项目简介
校园医疗保险管理系统是一个集多种功能于一体的在线服务平台,旨在方便校园内的师生管理和使用医疗保险。该系统采用简洁明了的页面布局,以橙色和蓝色为主色调,提供了一站式的服务体验。用户可以通过首页快速访问保险信息、公告信息、留言反馈和个人中心等核心功能。其中,保险信息模块提供了详细的保险政策、理赔流程等实用信息;公告信息模块则用于发布最新的医疗保险政策和通知;留言反馈模块允许用户提出疑问或建议,增强系统的互动性和用户参与感;个人中心模块则提供了个性化的账户管理和信息查询功能。此外,后台管理模块为系统管理员提供了全面的管理和维护功能,确保系统的稳定运行和持续优化。
二、系统项目部分截图
2.1后台系统部分页面效果
2.2前台系统部分页面效果
三、部分核心代码
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.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.ChongzhijiluEntity;
import com.entity.view.ChongzhijiluView;
import com.service.ChongzhijiluService;
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;
/**
* 充值记录
* 后端接口
*/
@RestController
@RequestMapping("/chongzhijilu")
public class ChongzhijiluController {
@Autowired
private ChongzhijiluService chongzhijiluService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ChongzhijiluEntity chongzhijilu,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date riqistart,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date riqiend,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
chongzhijilu.setXuehao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<ChongzhijiluEntity> ew = new EntityWrapper<ChongzhijiluEntity>();
if(riqistart!=null) ew.ge("riqi", riqistart);
if(riqiend!=null) ew.le("riqi", riqiend);
PageUtils page = chongzhijiluService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongzhijilu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ChongzhijiluEntity chongzhijilu,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date riqistart,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date riqiend,
HttpServletRequest request){
EntityWrapper<ChongzhijiluEntity> ew = new EntityWrapper<ChongzhijiluEntity>();
if(riqistart!=null) ew.ge("riqi", riqistart);
if(riqiend!=null) ew.le("riqi", riqiend);
PageUtils page = chongzhijiluService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongzhijilu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ChongzhijiluEntity chongzhijilu){
EntityWrapper<ChongzhijiluEntity> ew = new EntityWrapper<ChongzhijiluEntity>();
ew.allEq(MPUtil.allEQMapPre( chongzhijilu, "chongzhijilu"));
return R.ok().put("data", chongzhijiluService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ChongzhijiluEntity chongzhijilu){
EntityWrapper< ChongzhijiluEntity> ew = new EntityWrapper< ChongzhijiluEntity>();
ew.allEq(MPUtil.allEQMapPre( chongzhijilu, "chongzhijilu"));
ChongzhijiluView chongzhijiluView = chongzhijiluService.selectView(ew);
return R.ok("查询充值记录成功").put("data", chongzhijiluView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChongzhijiluEntity chongzhijilu = chongzhijiluService.selectById(id);
return R.ok().put("data", chongzhijilu);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChongzhijiluEntity chongzhijilu = chongzhijiluService.selectById(id);
return R.ok().put("data", chongzhijilu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChongzhijiluEntity chongzhijilu, HttpServletRequest request){
chongzhijilu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongzhijilu);
chongzhijiluService.insert(chongzhijilu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChongzhijiluEntity chongzhijilu, HttpServletRequest request){
chongzhijilu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongzhijilu);
chongzhijiluService.insert(chongzhijilu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ChongzhijiluEntity chongzhijilu, HttpServletRequest request){
//ValidatorUtils.validateEntity(chongzhijilu);
chongzhijiluService.updateById(chongzhijilu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chongzhijiluService.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<ChongzhijiluEntity> wrapper = new EntityWrapper<ChongzhijiluEntity>();
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"));
}
int count = chongzhijiluService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或文档
如需对应的论文或文档,以及其他定制需求,也可以下方添加联系我。