——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Tomcat≥8
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM+Maven车险理赔管理系统(java+ssm+jsp+echarts+jquery+mysql)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 流程: user1登录 ---添加保险 ---申请理赔 admin登录 ---[申请理赔列表]下审批 kanchayuan1登录 ---[待调查事故保单]下确认调查记录([调查-记录]按钮) ---[现场勘察]下确认勘察记录([勘察-记录]按钮),注意:情况属实栏填数字1或0 admin登录 ---[赔偿金发放列表]下[通过]审批 user1登录 ---[我的理赔]下查看到赔偿已发放
项目介绍
车险理赔管理系统源码,分为三个用户,一个管理员,一个工作人员,一个普通人员 管理员功能:登录、发放赔偿金、赔偿金发放列表、申请理赔列表、申请理赔通过、我的资料、用户列表 工作人员功能:勘察员-待调查事故保单、勘察员-调查事故提交结果、勘察员-现场勘查记录、勘察员-现场勘查记录列表、勘察员-已调查记录 普通人员功能:用户-申请理赔、用户-添加保险、用户-我的保险、用户-我的理赔、用户-我的账户
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后端:Spring springmvc mybatis 2. 前端:JSP+css+javascript+jQuery+echarts;
使用说明
使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat, 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置,然后运行; 4. 运行成功后,在浏览器中输入:http://localhost:8081/ 账号 管理员 admin/admin 勘探员 kanchayuan2/123455 普通用户 1/1
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 return "/admin/responsibility-view" ; } return "/admin/responsibility-add" ; } @RequestMapping("save") @ResponseBody public Result save (HttpServletRequest request,Responsibility model) { User user = (User) request.getSession().getAttribute("user" ); int i = 0 ; if (StringUtils.isBlank(model.getId())) { model.preInsert(); model.setCreateDate(new Date()); i = responsibilityService.insertModel(model); Orders orders = ordersService.getModel(model.getOrdersId()); orders.setState(3 ); ordersService.updateModel(orders); } else { i = responsibilityService.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++) { responsibilityService.deleteModel(split[i]); } return ResultUtil.success(); }else { return ResultUtil.error("未选中删除项!" ); } }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 @RequestMapping(value = "image/{id}") public void imageView (@PathVariable String id, HttpServletRequest request, HttpServletResponse response) throws Exception { if (StringUtils.isBlank(id)){ return ; } Attachment attachment = attachmentService.getModel(id); String path = attachment.getPath(); String suffix = attachment.getSuffix(); String realPath = rootpath + path; try { long downloadedLength = 0L ; InputStream inputStream; if (StringUtils.isNotBlank(suffix) && "pdf" .equals(suffix.toLowerCase())){ ClassPathResource classPathResource = new ClassPathResource("static/img/pdf.png" ); inputStream = classPathResource.getInputStream(); } else { inputStream = new FileInputStream(realPath); } OutputStream os = response.getOutputStream(); byte [] b = new byte [2048 ]; int length; while ((length = inputStream.read(b)) > 0 ) { os.write(b, 0 , length); downloadedLength += b.length; } os.close(); inputStream.close(); } catch (Exception e) { throw e; } }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 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 ); } }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 } package com.filter;public class LoginFilter implements Filter { public void init (FilterConfig filterConfig) throws ServletException { } public void doFilter (ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest)servletRequest; HttpServletResponse resp =(HttpServletResponse) servletResponse; HttpSession session = req.getSession(); String attachmentId = req.getRequestURI(); User user = (User) session.getAttribute("user" ); String[] urls = {"/login" ,"/json" ,".js" ,".css" ,".ico" ,".jpg" ,".png" ,"toreg" ,"reg" ,"/admin/login" ,"/admin/attachment" ,"/files/upload" }; boolean flag = true ; for (String str : urls) { if (attachmentId.indexOf(str) != -1 ) { flag =false ; break ; } } if (flag){ if (attachmentId.indexOf("login" ) > -1 || attachmentId.indexOf("app" ) > -1 ) { filterChain.doFilter(req, resp); return ; } else { if (user == null ) { resp.sendRedirect("/admin/login" ); } else { filterChain.doFilter(req, resp); } } }else { filterChain.doFilter(req, resp);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 } @RequestMapping("logout") public String loout (HttpServletRequest request) { request.getSession().invalidate(); return "/admin/login" ; } @RequestMapping("register") public String regUser () { return "/admin/register" ; } @RequestMapping("reg") @ResponseBody public Result reguser (HttpServletRequest request, User user, Integer type) { String username = user.getUsername(); User oneModel = userService.selectOneModel(MapUtil.buildMap("username" , username)); if (oneModel != null ){ return ResultUtil.error("用户已被占用!" ); } user.preInsert(); int i = userService.insertModel(user); if (i == 0 ) { return ResultUtil.error("失败" ); } else { return ResultUtil.success(null ); } } public static void main (String[] args) { } } package com.controller;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 @RequestMapping(value = "file/{id}") public void download (@PathVariable String id, HttpServletRequest request, HttpServletResponse response) throws Exception { Attachment attachment = attachmentService.getModel(id); String path = attachment.getPath(); String suffixName = path.substring(path.lastIndexOf("." )); response.setContentType("application/force-download;charset=utf-8" ); response.setHeader("Content-Disposition" , "attachment;filename=" + URLEncoder.encode(attachment.getName(), "UTF-8" )); String realPath = rootpath + path; try { long downloadedLength = 0L ; InputStream inputStream = new FileInputStream(realPath); OutputStream os = response.getOutputStream(); byte [] b = new byte [2048 ]; int length; while ((length = inputStream.read(b)) > 0 ) { os.write(b, 0 , length); downloadedLength += b.length; } os.close(); inputStream.close(); } catch (Exception e) { throw e; } } @RequestMapping(value = "pdf/{id}") public void pdfView (@PathVariable String id, HttpServletRequest request, HttpServletResponse response) throws Exception { if (StringUtils.isBlank(id)){ return ; } Attachment attachment = attachmentService.getModel(id);
——————————PayStart——————————
项目链接: https://javayms.github.io?id=121122542008200sb https://javayms.pages.dev?id=121122542008200sb