基于springboot实现车险理赔信息管理系统

简介: 本系统基于Springboot开发实现了一个为用户车险进行理赔信息管理的一个信息化管理系统,核心的业务主要是用户申请保险理赔,管理员审核进入理赔程序,事故调查员对事故进行调查和现场勘察,这其中共涉及到三类用户,购买保险的客户,事故调查员和系统管理员。客户的主要功能:个人资料管理,购买的保险信息管理,理赔的申请事故调查员功能:个人资料管理,事故调查管理,现场勘察管理管理员功能:个人资料管理,用户管理,理赔审请审核,赔偿金发放管理二,环境介绍语言环境:Java:  jdk1.8数据库:Mysql: mysql5.7应用服务器:Tomcat:  tomcat8.5.31

作者主页:编程指南针

作者简介:Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师

主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助

文末获取源码

一,项目简介

     本系统基于Springboot开发实现了一个为用户车险进行理赔信息管理的一个信息化管理系统,核心的业务主要是用户申请保险理赔,管理员审核进入理赔程序,事故调查员对事故进行调查和现场勘察,这其中共涉及到三类用户,购买保险的客户,事故调查员和系统管理员。

客户的主要功能:个人资料管理,购买的保险信息管理,理赔的申请

事故调查员功能:个人资料管理,事故调查管理,现场勘察管理

管理员功能:个人资料管理,用户管理,理赔审请审核,赔偿金发放管理

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

开发技术:后台springboot+springmvvc+mybatis

         前台:layui+jquery+jsp

三,系统展示

用户登陆:

image.gif编辑

用户注册

image.gif编辑

个人资料管理

image.gif编辑

车险管理

image.gif编辑

理赔记录管理

image.gif编辑

管理员管理功能:

 用户管理

image.gif编辑

理赔审核

image.gif编辑

赔偿金发放

image.gif编辑

事故调查员功能

  事故调查

image.gif编辑

image.gif编辑

现场勘察管理

image.gif编辑

image.gif编辑

四,核心代码展示

package com.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.InitializingBean;
import com.entity.Insurance;
import com.service.InsuranceService;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import com.entity.Result;
import com.utils.ResultUtil;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import com.entity.User;
import java.util.Date;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.RequestParam;
import com.github.pagehelper.PageInfo;
/**
 * ZNZ
 */
@Controller
@RequestMapping(value = "/admin/insurance")
public class AdminInsuranceController extends BaseController {
    @Autowired
    private InsuranceService insuranceService;
    @RequestMapping("add")
    public String add(HttpServletRequest request, Insurance model) {
        request.setAttribute("model", model);
        return "/admin/insurance-add";
    }
    @RequestMapping("edit")
    public String edit(HttpServletRequest request, String id) {
        Insurance model = insuranceService.getModel(id);
        request.setAttribute("model", model);
        return "/admin/insurance-add";
    }
    @RequestMapping("save")
    @ResponseBody
    public Result save(HttpServletRequest request, Insurance model) {
        User user = (User) request.getSession().getAttribute("user");
        int i = 0;
        if (StringUtils.isBlank(model.getId())) {
            model.preInsert();
            model.setCreateDate(new Date());
            model.setUserId(user.getId());
            i = insuranceService.insertModel(model);
        } else {
            i = insuranceService.updateModel(model);
        }
        if (i == 0) {
            return ResultUtil.error("失败");
        } else {
            return ResultUtil.success(null);
        }
    }
    //删除批量删除
    @RequestMapping("delete")
    @ResponseBody
    public Result delete(HttpServletRequest request, String id) {
        if (StringUtils.isNotBlank(id)) {
            String[] split = id.split(",");
            for (int i = 0; i < split.length; i++) {
                insuranceService.deleteModel(split[i]);
            }
            return ResultUtil.success();
        } else {
            return ResultUtil.error("未选中删除项!");
        }
    }
    @RequestMapping("list")
    public String list(HttpServletRequest request, Insurance model) {
        request.setAttribute("model", model);
        return "/admin/insurance-list";
    }
    //获取列表数据
    @RequestMapping("list/data")
    @ResponseBody
    public Result list(HttpServletRequest request, Insurance model, @RequestParam(defaultValue = "1") Integer page, Integer limit) {
        User user = (User) request.getSession().getAttribute("user");
        if (user.getType() == 0){
            model.setUserId(user.getId());
        }
        PageHelper.startPage(page, limit);
        List<Insurance> list = insuranceService.getModelList(putEntityInMap(model));
        PageInfo<Insurance> pageInfo = new PageInfo<>(list);
        return ResultUtil.success(list, pageInfo.getTotal());
    }
}

image.gif

package com.controller;
import com.entity.*;
import com.service.InsuranceService;
import com.service.OrdersService;
import com.utils.MapUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.InitializingBean;
import com.service.InvestigationService;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import com.utils.ResultUtil;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Date;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.RequestParam;
import com.github.pagehelper.PageInfo;
@Controller
@RequestMapping(value="/admin/investigation")
public class AdminInvestigationController extends BaseController {
    @Autowired
    private InvestigationService investigationService;
    @Autowired
    private OrdersService ordersService;
    @Autowired
    private InsuranceService insuranceService;
     @RequestMapping("add")
    public String add(HttpServletRequest request,Investigation model){
        request.setAttribute("model",model);
        return "/admin/investigation-add";
    }
    @RequestMapping("diaocha")
    public String diaocha(HttpServletRequest request,String id){
        Orders model = ordersService.getModel(id);
        Insurance insurance = insuranceService.getModel(model.getInsuranceId());
        request.setAttribute("model",model);
        request.setAttribute("insurance",insurance);
        Investigation investigation = investigationService.selectOneModel(MapUtil.buildMap("orderId", model.getId()));
        if (investigation != null){
            request.setAttribute("investigation",investigation);
            return "/admin/investigation-view";
        }
        return "/admin/investigation-add";
    }
     @RequestMapping("edit")
    public String edit(HttpServletRequest request,String id){
       Investigation model = investigationService.getModel(id);
       request.setAttribute("model",model);
        return "/admin/investigation-add";
    }
    @RequestMapping("save")
    @ResponseBody
    public Result save(HttpServletRequest request,Investigation model){
         User user = (User) request.getSession().getAttribute("user");
        int i = 0;
        if (StringUtils.isBlank(model.getId())) {
            model.preInsert();
            model.setCreateDate(new Date());
            i = investigationService.insertModel(model);
            //更新保单状态
            Orders orders = ordersService.getModel(model.getOrderId());
            orders.setState(2);
            ordersService.updateModel(orders);
        } else {
            i = investigationService.updateModel(model);
        }
        if (i == 0) {
            return ResultUtil.error("失败");
        } else {
            return ResultUtil.success(null);
        }
    }
  //删除批量删除
    @RequestMapping("delete")
    @ResponseBody
    public Result delete(HttpServletRequest request,String id){
         if (StringUtils.isNotBlank(id)){
            String[] split = id.split(",");
            for (int i = 0; i < split.length; i++) {
                investigationService.deleteModel(split[i]);
            }
            return ResultUtil.success();
        }else {
            return ResultUtil.error("未选中删除项!");
        }
    }
   @RequestMapping("list")
    public String list(HttpServletRequest request,Investigation model){
        request.setAttribute("model",model);
        return "/admin/investigation-list";
    }
    //获取列表数据
    @RequestMapping("list/data")
    @ResponseBody
    public Result list(HttpServletRequest request,User model, @RequestParam(defaultValue = "1")Integer page,Integer limit){
        PageHelper.startPage(page,limit);
        List<Investigation> list = investigationService.getModelList(putEntityInMap(model));
        PageInfo<Investigation> pageInfo = new PageInfo<>(list);
        return  ResultUtil.success(list,pageInfo.getTotal());
    }
}

image.gif

package com.controller;
import com.entity.Insurance;
import com.service.InsuranceService;
import com.service.UserService;
import com.utils.MapUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.InitializingBean;
import com.entity.Orders;
import com.service.OrdersService;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;
import com.entity.Result;
import com.utils.ResultUtil;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import com.entity.User;
import java.util.Date;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.RequestParam;
import com.github.pagehelper.PageInfo;
@Controller
@RequestMapping(value = "/admin/orders")
public class AdminOrdersController extends BaseController {
    @Autowired
    private OrdersService ordersService;
    @Autowired
    private InsuranceService insuranceService;
    @Autowired
    private UserService userService;
    @RequestMapping("add")
    public String add(HttpServletRequest request, Orders model) {
        User user = (User) request.getSession().getAttribute("user");
        List<Insurance> insuranceList = insuranceService.getModelList(MapUtil.buildMap("userId", user.getId()));
        request.setAttribute("model", model);
        request.setAttribute("insuranceList", insuranceList);
        return "/admin/orders-add";
    }
    @RequestMapping("edit")
    public String edit(HttpServletRequest request, String id) {
        Orders model = ordersService.getModel(id);
        request.setAttribute("model", model);
        return "/admin/orders-add";
    }
    @RequestMapping("save")
    @ResponseBody
    public Result save(HttpServletRequest request, Orders model) {
        User user = (User) request.getSession().getAttribute("user");
        int i = 0;
        if (StringUtils.isBlank(model.getId())) {
            model.preInsert();
            model.setCreateDate(new Date());
            i = ordersService.insertModel(model);
        } else {
            i = ordersService.updateModel(model);
        }
        if (i == 0) {
            return ResultUtil.error("失败");
        } else {
            return ResultUtil.success(null);
        }
    }
    @RequestMapping("approved")
    @ResponseBody
    public Result approved(String id,Integer state){
        Orders model = ordersService.getModel(id);
        model.setState(state);
        if (state == 5){
            getMoney(id);
        }
        int i = ordersService.updateModel(model);
        if (i == 0) {
            return ResultUtil.error("失败");
        } else {
            return ResultUtil.success(null);
        }
    }
    /**
     * 发放赔偿金
     */
    public void getMoney(String orderId){
        Orders orders = ordersService.getModel(orderId);//获取保单
        User user = userService.getModel(orders.getUserId());//获取用户
        BigDecimal price = orders.getPrice();//保单申请金额
        user.setMoney(user.getMoney().add(price));//用户账户余额增加保费
        userService.updateModel(user);
    }
    //删除批量删除
    @RequestMapping("delete")
    @ResponseBody
    public Result delete(HttpServletRequest request, String id) {
        if (StringUtils.isNotBlank(id)) {
            String[] split = id.split(",");
            for (int i = 0; i < split.length; i++) {
                ordersService.deleteModel(split[i]);
            }
            return ResultUtil.success();
        } else {
            return ResultUtil.error("未选中删除项!");
        }
    }
    @RequestMapping("list")
    public String list(HttpServletRequest request, Orders model) {
        request.setAttribute("model", model);
        return "/admin/orders-list";
    }
    /**
     * 用户提交的申请理赔
     * @param request
     * @param model
     * @return
     */
    @RequestMapping("approve")
    public String approve(HttpServletRequest request, Orders model) {
        request.setAttribute("model", model);
        return "/admin/orders-approve";
    }
    /**
     * 已经有调查勘察记录的申请单,确认是否发放赔偿金
     * @param request
     * @param model
     * @return
     */
    @RequestMapping("money/give")
    public String moneyGive(HttpServletRequest request, Orders model) {
        request.setAttribute("model", model);
        return "/admin/orders-money";
    }
    /**
     * 用户提交的需要调查的
     * @param request
     * @param model
     * @return
     */
    @RequestMapping("investigation")
    public String investigation(HttpServletRequest request, Orders model) {
        request.setAttribute("model", model);
        return "/admin/orders-investigation";
    }
    /**
     * 用户提交的需要调查的
     * @param request
     * @param model
     * @return
     */
    @RequestMapping("responsibility")
    public String responsibility(HttpServletRequest request, Orders model) {
        request.setAttribute("model", model);
        return "/admin/orders-responsibility";
    }
    //获取列表数据
    @RequestMapping("list/data")
    @ResponseBody
    public Result list(HttpServletRequest request, Orders model, @RequestParam(defaultValue = "1") Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        List<Orders> list = ordersService.getModelList(putEntityInMap(model));
        PageInfo<Orders> pageInfo = new PageInfo<>(list);
        return ResultUtil.success(list, pageInfo.getTotal());
    }
}

image.gif

五,项目总结

   本项目基本上实现了车险理陪的主要核心业务,角色功能相对完整,适合做毕业设计或课程设计使用。

相关文章
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的莲花村农业信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的莲花村农业信息管理系统附带文章源码部署视频讲解等
27 0
|
5月前
|
JavaScript Java 测试技术
基于SpringBoot+Vue+uniapp的医院门诊信息管理系统的详细设计和实现(源码+lw+部署文档+讲解等)
基于SpringBoot+Vue+uniapp的医院门诊信息管理系统的详细设计和实现(源码+lw+部署文档+讲解等)
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的党建信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的党建信息管理系统附带文章源码部署视频讲解等
43 1
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的高校毕业设计信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的高校毕业设计信息管理系统附带文章源码部署视频讲解等
52 1
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的高校宿舍信息管理系统小程序附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的高校宿舍信息管理系统小程序附带文章源码部署视频讲解等
37 1
|
5月前
|
JavaScript Java 测试技术
基于SpringBoot+Vue+uniapp的党建信息管理系统的详细设计和实现(源码+lw+部署文档+讲解等)
基于SpringBoot+Vue+uniapp的党建信息管理系统的详细设计和实现(源码+lw+部署文档+讲解等)
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的旅游民宿信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的旅游民宿信息管理系统附带文章源码部署视频讲解等
46 0
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的旅游信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的旅游信息管理系统附带文章源码部署视频讲解等
55 0
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的高校科研信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的高校科研信息管理系统附带文章源码部署视频讲解等
33 0
|
5月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的医院门诊信息管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的医院门诊信息管理系统附带文章源码部署视频讲解等
36 0

热门文章

最新文章