Java项目:03 基于Springboot的销售培训考评管理系统

这篇具有很好参考价值的文章主要介绍了Java项目:03 基于Springboot的销售培训考评管理系统。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

项目介绍

  • 企业的销售要进行培训,由技术人员进行辅导并考评检测培训效果,所以有了这个小系统。
  • 实现了系统的登录验证、请求拦截验证、基础模块(用户管理、角色管理、销售管理)、业务模块(评分管理、评分结果)。
  • 除了基本的CRUD之外,其中评分结果模块实现了数据可视化及图表的联动。

主要角色有管理员、销售、评委

环境要求

1.运行环境:最好是java jdk1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;

3.tomcat环境:Tomcat7.x,8.X,9.x版本均可

4.硬件环境:windows7/8/10 4G内存以上;或者Mac OS;

5.是否Maven项目:是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven.项目

6.数据库:MySql5.7/8.0等版本均可;

技术栈

  • 技术框架:jQuery + MySQL5.7 + mybatis + shiro + Layui + HTML + CSS + JS + jpa
  • 运行环境:jdk8 + IntelliJ IDEA + maven3 + mariaDB

使用说明

1.使用Navicati或者其它工具,在mysql中创建对应sq文件名称的数据库,并导入项目的sql文件;

2.使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;

3.将项目中config-propertiesi配置文件中的数据库配置改为自己的配置,然后运行;

运行指导

idea导入源码空间站顶目教程说明(Vindows版)-ssm篇:

http://mtw.so/5MHvZq

源码地址:http://codegym.top。

运行截图

界面

Java项目:03 基于Springboot的销售培训考评管理系统,java,java,spring boot,开发语言

Java项目:03 基于Springboot的销售培训考评管理系统,java,java,spring boot,开发语言

Java项目:03 基于Springboot的销售培训考评管理系统,java,java,spring boot,开发语言

Java项目:03 基于Springboot的销售培训考评管理系统,java,java,spring boot,开发语言

Java项目:03 基于Springboot的销售培训考评管理系统,java,java,spring boot,开发语言

代码

UserController

package cn.temptation.web;

import cn.temptation.dao.RoleDao;
import cn.temptation.dao.UserDao;
import cn.temptation.domain.Role;
import cn.temptation.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.persistence.criteria.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class UserController {
    @Autowired
    private UserDao userDao;
    @Autowired
    private RoleDao roleDao;

    @RequestMapping("/user")
    public String index() {
        return "user";
    }

    @RequestMapping("/user_list")
    @ResponseBody
    public Map<String, Object> userList(@RequestParam Map<String, Object> queryParams) {
        Map<String, Object> result = new HashMap<>();

        try {
            Integer page = Integer.parseInt(queryParams.get("page").toString());
            Integer limit = Integer.parseInt(queryParams.get("limit").toString());
            String condition = (String) queryParams.get("condition");
            String keyword = (String) queryParams.get("keyword");

            // 创建查询规格对象
            Specification<User> specification = (Root<User> root, CriteriaQuery<?> query, CriteriaBuilder cb) -> {
                Predicate predicate = null;
                Path path = null;

                if (condition != null && !"".equals(condition) && keyword != null && !"".equals(keyword)) {
                    switch (condition) {
                        case "username":    // 用户名称
                            path = root.get("username");
                            predicate = cb.like(path, "%" + keyword + "%");
                            break;
                        case "rolename":    // 角色名称
                            path = root.join("role", JoinType.INNER);
                            predicate = cb.like(path.get("rolename"), "%" + keyword + "%");
                            break;
                    }
                }

                return predicate;
            };

            Pageable pageable = PageRequest.of(page - 1, limit, Sort.Direction.ASC, "userid");

            Page<User> users = userDao.findAll(specification, pageable);

            result.put("code", 0);
            result.put("msg", "查询OK");
            result.put("count", users.getTotalElements());
            result.put("data", users.getContent());
        } catch (Exception e) {
            e.printStackTrace();
            result.put("code", 500);
            result.put("msg", "服务器内部错误");
            result.put("count", 0);
            result.put("data", new ArrayList());
        }

        return result;
    }

    @RequestMapping("/user_delete")
    @ResponseBody
    public Integer userDelete(@RequestParam String userid) {
        try {
            userDao.deleteById(Integer.parseInt(userid));
            return 0;
        } catch (Exception e) {
            e.printStackTrace();
        }

        return -1;
    }

    @RequestMapping("/user_view")
    public String view(Integer userid, Model model) {
        User user = new User();
        if (userid != null) {
            user = userDao.getOne(userid);
        }
        model.addAttribute("user", user);
        return "user_view";
    }

    @RequestMapping("/role_load")
    @ResponseBody
    public List<Role> roleList() {
        return roleDao.findAll();
    }

    @RequestMapping("/user_update")
    @ResponseBody
    public Integer userUpdate(User user) {
        try {
            userDao.save(user);
            return 0;
        } catch (Exception e) {
            e.printStackTrace();
        }

        return -1;
    }
}

ScoreController文章来源地址https://www.toymoban.com/news/detail-794290.html

package cn.temptation.web;

import cn.temptation.dao.SalesDao;
import cn.temptation.dao.ScoreDao;
import cn.temptation.domain.Sales;
import cn.temptation.domain.Score;
import cn.temptation.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.persistence.criteria.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class ScoreController {
    @Autowired
    private ScoreDao scoreDao;
    @Autowired
    private SalesDao salesDao;

    @RequestMapping("/score")
    public String index() {
        return "score";
    }

    @RequestMapping("/score_list")
    @ResponseBody
    public Map<String, Object> scoreList(@RequestParam Map<String, Object> queryParams, HttpServletRequest request) {
        Map<String, Object> result = new HashMap<>();

        try {
            HttpSession session = request.getSession();
            User user = (User) session.getAttribute("user");

            Integer page = Integer.parseInt(queryParams.get("page").toString());
            Integer limit = Integer.parseInt(queryParams.get("limit").toString());
            String condition = (String) queryParams.get("condition");
            String keyword = (String) queryParams.get("keyword");

            // 创建查询规格对象
            Specification<Score> specification = (Root<Score> root, CriteriaQuery<?> query, CriteriaBuilder cb) -> {
                Predicate predicate = null;
                Path path = null;

                // 从session中取出当前用户信息,获取该用户创建的数据
                if (null != user) {
                    path = root.join("user", JoinType.INNER);
                    predicate = cb.equal(path.get("userid"), user.getUserid());
                }

                if (condition != null && !"".equals(condition) && keyword != null && !"".equals(keyword)) {
                    switch (condition) {
                        case "salesname":    // 销售名称
                            path = root.join("sales", JoinType.INNER);
                            predicate = cb.like(path.get("salesname"), "%" + keyword + "%");
                            break;
                    }
                }

                return predicate;
            };

            Pageable pageable = PageRequest.of(page - 1, limit, Sort.Direction.ASC, "scoreid");

            Page<Score> scores = scoreDao.findAll(specification, pageable);

            result.put("code", 0);
            result.put("msg", "查询OK");
            result.put("count", scores.getTotalElements());
            result.put("data", scores.getContent());
        } catch (Exception e) {
            e.printStackTrace();
            result.put("code", 500);
            result.put("msg", "服务器内部错误");
            result.put("count", 0);
            result.put("data", new ArrayList());
        }

        return result;
    }

    @RequestMapping("/score_delete")
    @ResponseBody
    public Integer scoreDelete(@RequestParam String scoreid) {
        try {
            scoreDao.deleteById(Integer.parseInt(scoreid));
            return 0;
        } catch (Exception e) {
            e.printStackTrace();
        }

        return -1;
    }

    @RequestMapping("/score_view")
    public String view(Integer scoreid, Model model) {
        Score score = new Score();
        if (scoreid != null) {
            score = scoreDao.findByScoreid(scoreid);
        }
        model.addAttribute("score", score);
        return "score_view";
    }

    @RequestMapping("/sales_load")
    @ResponseBody
    public List<Sales> salesList() {
        return salesDao.findAll();
    }

    @RequestMapping("/score_update")
    @ResponseBody
    public Integer scoreUpdate(Score score, HttpServletRequest request) {
        try {
            HttpSession session = request.getSession();
            User user = (User) session.getAttribute("user");

            if (null != user) {
                score.setUser(user);
            }

            scoreDao.save(score);
            return 0;
        } catch (Exception e) {
            e.printStackTrace();
        }

        return -1;
    }
}

到了这里,关于Java项目:03 基于Springboot的销售培训考评管理系统的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 基于JAVA+Springboot+Thymeleaf前后端分离项目:助农农产品销售商城系统设计与实现

     博主介绍 :黄菊华老师《Vue.js入门与商城开发实战》《微信小程序商城开发》图书作者,CSDN博客专家,在线教育专家,CSDN钻石讲师;专注大学生毕业设计教育和辅导。 所有项目都配有从入门到精通的基础知识视频课程,学习后应对毕业设计答辩。 项目配有对应开发文档、

    2024年02月20日
    浏览(48)
  • 基于springboot+html的汽车销售管理系统设计与实现

    🍅 作者主页 央顺技术团队 🍅 欢迎点赞 👍 收藏 ⭐留言 📝 🍅 文末获取源码联系方式 📝 前言 随着汽车市场的快速发展,汽车销售企业面临着越来越大的管理压力。为了提高销售效率和客户满意度,开发一个基于Java的汽车销售管理系统变得尤为重要。本系统旨在提供一

    2024年01月21日
    浏览(42)
  • 基于SpringBoot的苏果超市商品销售管理系统+93704(免费领源码)可做计算机毕业设计JAVA、PHP、爬虫、APP、小程序、C#、C++、python、数据可视化、大数据、全套文案

    在网络信息的时代,众多的软件被开发出来,给用户带来了很大的选择余地,而且人们越来越追求更个性的需求。在这种时代背景下,超市只能以用户为导向,按品种小批量组织生产,以产品的持续创新作为超市最重要的竞争手段。 系统采用了B/S结构,将所有业务模块采用以

    2024年02月19日
    浏览(39)
  • Java项目:18 基于SpringBoot的学生成绩管理系统

    作者主页:舒克日记 简介:Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 基于springboot的学生成绩管理系统主要功能 分为两个端,教师和学生 教师的主要功能:学生信息、成绩信息的增删改查 学生的主要功能:我的成绩、我的总成绩的查看 1.运行环境:

    2024年02月21日
    浏览(36)
  • vue-springboot-java电力员工安全施工培训课程考试管理系统

    本电力员工安全施工培训管理系统是为了提高员工查阅信息的效率和管理人员管理信息的工作效率,可以快速存储大量数据,还有信息检索功能,这大大的满足了员工和管理员这二者的需求。操作简单易懂,合理分析各个模块的功能,尽可能优化界面,让员工和管理员能使用

    2024年02月04日
    浏览(47)
  • 基于SpringBoot+Vue海产品加工销售一体化管理系统小程序的设计与实现

    博主主页: 一季春秋 博主简介: 专注Java技术领域和毕业设计项目实战、Java、微信小程序、安卓等技术开发,远程调试部署、代码讲解、文档指导、ppt制作等技术指导。 主要内容: SpringBoot、Vue、SSM、HLMT、Jsp、PHP、Nodejs、Python、小程序、安卓app、大数据等设计与开发。 感兴

    2024年02月21日
    浏览(38)
  • 基于Java的公务员培训机构管理系统论文

    现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本公务员培训机构管理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助

    2024年02月05日
    浏览(38)
  • springboot+java汽车配件销售业绩管理系统 J2EE平台技术

    汽车配件销售类企业近年来得到长足发展,在市场份额不断扩大同时,如何更好地管理企业现有销售项目资源成为摆在该类企业面前的重要课题之一。本次打算开发的springboot汽车配件销售业绩管理系统的开发过程引用 J2EE平台技术,该平台中所包含的JDBC、JNDI等组件,规定访问数据

    2024年02月06日
    浏览(35)
  • 44基于java的汽车销售管理系统设计与实现

    本章节给大家带来一个基于java的汽车销售管理系统设计与实现,车辆4S店管理系统,基于java汽车销售交易网站,针对汽车销售提供客户信息、车辆信息、订单信息、销售人员管理、财务报表等功能,提供经理和销售两种角色进行管理。 实现一个汽车销售管理系统,汽车销售

    2024年02月08日
    浏览(89)
  • 基于java的农产品销售管理系统设计与实现

    基于java的农产品销售管理系统设计与实现 研究背景: 随着信息技术的迅速发展和应用,传统的农产品销售方式已经无法满足市场需求。在这样一个信息化和网络化的大背景下,设计和实现一个基于Java的农产品销售管理系统具有重要的研究背景和实际应用价值。 传统的农产

    2024年02月03日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包