Java项目:CRM人事管理系统(java+SSM+JSP+Layui+jQuery+mysql)

news/2024/7/11 0:00:32 标签: java, jquery, layui, mysql, ssm

源码获取:博客首页 "资源" 里下载!

项目介绍

CRM人事管理系统,主要功能有:
用户管理:用户查询、添加用户、编辑、删除;
职位管理:职位查询、添加职位、删除;
部门管理:部门查询、添加部门、删除;
员工管理:员工查询、添加员工、编辑、删除;
公告管理:公告查询、添加公告、删除;
下载中心:文档查询、上传文档;
系统设置:退出系统;


环境需要

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版本;


技术栈

1. 后端:Spring SpringMVC MyBatis
2. 前端:JSP+Layui+jQuery


使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 将项目中db.properties配置文件中的数据库配置改为自己的配置
3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
4. 运行项目,输入localhost:8080/xxx 登录

 

 

 

 

 

客户管理控制层:

@Controller
@RequestMapping("/customer")
public class CustomerController extends AuthorizedController {

    @Autowired
    private CustomerService customerService;

    @RequestMapping(value = "", method = RequestMethod.GET)
    public String customer() {
        return "crm/customer";
    }

    @RequestMapping(value = "/find", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<Customer> find(@RequestBody QueryCustomerVo vo) {
        return customerService.find(vo);
    }

    @RequestMapping(value = "/findAllCustomerCategory", method = RequestMethod.POST)
    @ResponseBody
    public List<CustomerCategory> findAllCustomerCategory() {
        return customerService.findAllCustomerCategory();
    }

    @RequestMapping(value = "/findAllIndustry", method = RequestMethod.POST)
    @ResponseBody
    public List<Industry> findAllIndustry() {
        return customerService.findAllIndustry();
    }

    @RequestMapping(value = "/findAllSource", method = RequestMethod.POST)
    @ResponseBody
    public List<Source> findAllSource() {
        return customerService.findAllSource();
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(@RequestBody Customer customer) {
        customer.setCreateBy(getUser().getUserId());
        return customerService.insert(customer);
    }

    @RequestMapping(value = "/checkCustomerName", method = RequestMethod.POST)
    @ResponseBody
    public Result checkCustomerName(@RequestBody Customer customer) {
        return customerService.checkCustomerName(customer);
    }

    @RequestMapping(value = "/findById", method = RequestMethod.POST)
    @ResponseBody
    public Customer findById(@RequestBody Customer customer) {
        return customerService.findById(customer.getCustomerId());
    }

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    @ResponseBody
    public Result update(@RequestBody Customer customer) {
        return customerService.update(customer);
    }

    @RequestMapping(value = "/dashboard/{customerId}", method = RequestMethod.GET)
    public ModelAndView dashboard(@PathVariable int customerId) {
        ModelAndView vm = new ModelAndView("crm/customerDashboard");
        vm.addObject("customerId", customerId);
        return vm;
    }

    @RequestMapping(value = "/updateStar", method = RequestMethod.POST)
    @ResponseBody
    public Result updateStar(@RequestBody Customer customer) {
        return customerService.updateStar(customer);
    }

    @RequestMapping(value = "/updateLocation", method = RequestMethod.POST)
    @ResponseBody
    public Result updateLocation(@RequestBody Customer customer) {
        return customerService.updateLocation(customer);
    }
}

用户管理控制层:

@Controller
@RequestMapping("/user")
public class UserController extends AuthorizedController {

    @Autowired
    private UserService userService;

    @Autowired
    private HttpSession session;

    @RequestMapping(value = "", method = RequestMethod.GET)
    public String index() {
        return "sys/user";
    }

    @RequestMapping(value = "/find", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<User> find(@RequestBody QueryUserVo vo) {
        return userService.find(vo);
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(@RequestBody User user) {
        return userService.insert(user);
    }

    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    @ResponseBody
    public Result delete(@RequestBody List<Integer> ids) {
        return userService.deleteByIds(ids);
    }

    @RequestMapping(value = "/findById", method = RequestMethod.POST)
    @ResponseBody
    public User findById(@RequestBody User user) {
        return userService.findById(user.getUserId());
    }

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    @ResponseBody
    public Result update(@RequestBody User user) {
        Result result = userService.update(user);
        if (result.isSuccess() && user.getUserId() == getUser().getUserId()) {
            session.setAttribute("User", userService.findById(getUser().getUserId()));
        }
        return result;
    }

    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
    @ResponseBody
    public Result updateStatus(@RequestBody User user) {
        return userService.updateStatus(user);
    }

    @RequestMapping(value = "/checkUserName", method = RequestMethod.POST)
    @ResponseBody
    public Result checkUserName(@RequestBody User user) {
        return userService.checkUserName(user);
    }

    @RequestMapping(value = "/resetPassword", method = RequestMethod.POST)
    @ResponseBody
    public Result resetPassword(@RequestBody User user) {
        return userService.resetPassword(user);
    }

    @RequestMapping(value = "/profile", method = RequestMethod.GET)
    public String profile() {
        return "sys/profile";
    }

    @RequestMapping(value = "/updatePassword", method = RequestMethod.POST)
    @ResponseBody
    public Result updatePassword(@RequestBody UpdatePasswordVo vo) {
        return userService.updatePassword(vo);
    }
}

角色管理控制层:

@Controller
@RequestMapping("/role")
public class RoleController extends AuthorizedController {

    @Autowired
    private RoleService roleService;

    @RequestMapping(value = "", method = RequestMethod.GET)
    public String index() {
        return "sys/role";
    }

    @RequestMapping(value = "/findAll", method = RequestMethod.POST)
    @ResponseBody
    public List<Role> findAll() {
        return roleService.findAll();
    }

    @RequestMapping(value = "/checkRoleName", method = RequestMethod.POST)
    @ResponseBody
    public Result existRoleName(@RequestBody Role role) {
        return roleService.checkRoleName(role);
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(@RequestBody Role role) {
        return roleService.insert(role);
    }

    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    @ResponseBody
    public Result delete(@RequestBody List<Integer> ids) {
        return roleService.deleteByIds(ids);
    }

    @RequestMapping(value = "/findById", method = RequestMethod.POST)
    @ResponseBody
    public Role findById(@RequestBody Role role) {
        return roleService.findById(role.getRoleId());
    }

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    @ResponseBody
    public Result update(@RequestBody Role role) {
        return roleService.update(role);
    }

    @RequestMapping(value = "/user/{roleId}", method = RequestMethod.GET)
    public ModelAndView roleUser(@PathVariable int roleId) {
        ModelAndView vm = new ModelAndView("sys/roleUser");
        vm.addObject("roleId", roleId);
        return vm;
    }

    @RequestMapping(value = "/user/findUserInRole", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<User> findUserInRole(@RequestBody QueryRoleUserVo vo) {
        return roleService.findUserInRole(vo);
    }

    @RequestMapping(value = "/user/remove", method = RequestMethod.POST)
    @ResponseBody
    public Result deleteRoleUser(@RequestBody RoleUser roleUser) {
        return roleService.deleteRoleUser(roleUser);
    }

    @RequestMapping(value = "/user/findUserNotInRole", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<User> findUserNotInRole(@RequestBody QueryRoleUserVo vo) {
        return roleService.findUserNotInRole(vo);
    }

    @RequestMapping(value = "/user/add", method = RequestMethod.POST)
    @ResponseBody
    public Result addRoleUser(@RequestBody RoleUser roleUser) {
        return roleService.insertRoleUser(roleUser);
    }

    @RequestMapping(value = "/menu/{roleId}", method = RequestMethod.GET)
    public ModelAndView roleMenu(@PathVariable Integer roleId) {
        ModelAndView mv = new ModelAndView("sys/roleMenu");
        mv.addObject("roleId", roleId);
        return mv;
    }

    @RequestMapping(value = "/menu/saveMenu", method = RequestMethod.POST)
    @ResponseBody
    public Result saveMenu(@RequestBody Map map) {
        return roleService.saveRoleMenu((Integer) map.get("roleId"), (List<Integer>) map.get("menuIdList"));
    }

    @RequestMapping(value = "/fun/{roleId}", method = RequestMethod.GET)
    public ModelAndView roleFun(@PathVariable int roleId) {
        ModelAndView vm = new ModelAndView("sys/roleFun");
        vm.addObject("roleId", roleId);
        return vm;
    }
}

源码获取:博客首页 "资源" 里下载! 


http://www.niftyadmin.cn/n/1553979.html

相关文章

Java项目:流浪猫狗救助管理系统(java+SSM+JSP+bootstrap+jQuery+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 项目介绍 流浪猫狗救助管理系统。该项目分为前后台&#xff1b; 前台主要功能包括&#xff1a;会员的注册登陆,流浪猫狗知识&#xff0c;领养中心&#xff0c;团队活动&#xff0c;流浪宠物详情&#xff0c…

cpu占用高 mongo_解码Redis最易被忽视的CPU和内存占用高问题

文章转载自dbaplus社群作者介绍张鹏义&#xff0c;腾讯云数据库高级工程师&#xff0c;曾参与华为Taurus分布式数据研发及腾讯CynosDB for pg研发工作&#xff0c;现从事腾讯云Redis数据库研发工作。我们在使用Redis时&#xff0c;总会碰到一些redis-server端CPU及内存占用比较…

服务器如何加载md文件,如何安装 MDClub

MDClub 的安装非常便捷。在大多数情况下&#xff0c;只需不到 30 秒就能完成安装。服务器要求在安装 MDClub 之前&#xff0c;请检查你的服务器是否满足要求。如果你不了解你的服务器是否满足要求&#xff0c;也没关系&#xff0c;MDClub 的安装脚本会自动帮你完成检查。服务器…

Java项目:医院管理系统(java+SSM+JSP+bootstrap+jQuery+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 项目介绍 医院管理系统&#xff0c;主要分为管理员与普通员工两种角色&#xff1b; 管理员主要功能包括&#xff1a; 通知管理、员工管理、请假管理、考勤管理、招聘管理、部门管理、工资管理、系统管理&am…

dockerfile如何运行镜像内的脚本_.NET CORE IN DOCKER 在容器内编译并发布

Docker可以说是现在微服务&#xff0c;DevOps的基础&#xff0c;咱们.Net Core自然也得上Docker。.Net Core发布到Docker容器的教程网上也有不少&#xff0c;但是今天还是想来写一写。 你搜.Net core程序发布到Docker网上一般常见的有两种方案&#xff1a;1、在本地编译成Dll文…

Java项目:茶叶溯源系统(java+SSM+JSP+bootstrap+layUI+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 项目介绍 茶叶溯源系统&#xff0c;分为前台与后台。普通用户可在前台通过18位的编码查询茶叶的出售历史。 后台分为两种角色&#xff0c;管理员与经销商&#xff1b; 管理员主要功能包括&#xff1a; 主界…

服务器群集 虚拟化,Server Clustering on Virtualization一种虚拟化的服务器集群模型

摘要&#xff1a;With the rapid development of the economic and electronic commerce, the exchanging times between the enterprises and users is increasing as geometric series. However, the utilization rate of enterprise servers is only 15% to 30%. This paper…

Java项目:美食论坛系统(java+SSM+JSP+jQuery+LayUI+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 项目介绍 该项目主要分为前台与后台&#xff1b; 前台主要功能包括&#xff1a; 登录、注册&#xff1b;首页、我发表的贴子、意见建议&#xff1b;版块列表、帖子查看、发贴回贴等&#xff1b; 普通用户登…