Springboot實現(xiàn)銷售團隊管理系統(tǒng)
項目編號:BS-XX-084
開發(fā)運行環(huán)境:
開發(fā)工具:IDEA /ECLIPSE
數(shù)據(jù)庫:MYSQL5.7
是否使用Maven: 是
JDK: 1.8
開發(fā)技術:
后臺:Springboot+springmvc+mybatis
前端:AdminLTE頁面模板,angularJs框架,Jquery框架,BootStrap框架,Echarts開發(fā)圖形報表
項目說明:
本項目是基于Springboot框架開發(fā)的一套用于管理銷售團隊的管理系統(tǒng),結(jié)構springmvc和mybatis開發(fā)實現(xiàn),前端采用:AdminLTE頁面模板,angularJs框架,Jquery框架,BootStrap框架,Echarts開發(fā)圖形報表。系統(tǒng)功能完整,頁面簡潔大方,系統(tǒng)具備完整的權限管理系統(tǒng),可以自行設定菜單、角色、權限,給用戶分配相應的權限,最大的亮點是前端界面設計的交互性非常好,操作也十分便利。目前設置共有三種角色:銷售員,團隊管理,系統(tǒng)管理員。
下面展示一下系統(tǒng)的相關功能:
系統(tǒng)登陸:

管理主界面
管理員具有所有操作功能,但主要是進行系統(tǒng)管理,業(yè)務管理交由銷售員和團隊領導去做

組織結(jié)構管理



給機構添加用戶

菜單管理

用戶管理

角色管理

為用戶設置角色

給角色分配菜單

銷售員進入系統(tǒng)

業(yè)務機會管理

客戶管理

聯(lián)系人管理

工作日報管理

銷售主管登陸:除了擁有銷售員的基本功能外,主要是查看團隊的日報工作進展

團隊日報

個人資料管理:各用戶都有

以上是展示的基于Springboot實現(xiàn)的銷售團隊管理系統(tǒng),系統(tǒng)的功能比較完整,最大的亮點是前端界面設計的交互性非常好,操作也十分便利,比較適合做畢業(yè)設計使用。
部分代碼:CustomerController
package com.powerteam.controller.crm;
import com.github.pagehelper.PageInfo;
import com.powerteam.controller.AuthorizedController;
import com.powerteam.model.crm.Customer;
import com.powerteam.model.crm.CustomerCategory;
import com.powerteam.model.crm.Industry;
import com.powerteam.model.crm.Source;
import com.powerteam.service.crm.CustomerService;
import com.powerteam.vo.Result;
import com.powerteam.vo.crm.QueryCustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;import java.util.List;
@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);
? ? }
}
CustomerService
package com.powerteam.service.crm;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.powerteam.mapper.crm.CustomerMapper;
import com.powerteam.model.crm.*;
import com.powerteam.vo.Result;
import com.powerteam.vo.crm.QueryCustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;import java.util.Date;
import java.util.List;@Service
public class CustomerService {? ? @Autowired
? ? private CustomerMapper customerMapper;? ? @Autowired
? ? private ShareGroupService shareGroupService;? ? @Autowired
? ? private ActivityService activityService;? ? public PageInfo<Customer> find(QueryCustomerVo vo) {
? ? ? ? if (!StringUtils.isEmpty(vo.getWord())) {
? ? ? ? ? ? vo.setWord("%" + vo.getWord() + "%");
? ? ? ? }? ? ? ? if (!vo.isDisablePaging()) {
? ? ? ? ? ? PageHelper.startPage(vo.getPageNum(), vo.getPageSize());
? ? ? ? }
? ? ? ? return new PageInfo<>(customerMapper.find(vo));
? ? }? ? public List<CustomerCategory> findAllCustomerCategory() {
? ? ? ? return customerMapper.findAllCustomerCategory();
? ? }? ? public List<Industry> findAllIndustry() {
? ? ? ? return customerMapper.findAllIndustry();
? ? }? ? public List<Source> findAllSource() {
? ? ? ? return customerMapper.findAllSource();
? ? }? ? @Transactional
? ? public Result insert(Customer customer) {
? ? ? ? customer.setCreateDate(new Date());
? ? ? ? customer.setOwner(customer.getCreateBy());
? ? ? ? Result result = new Result();? ? ? ? if (!checkCustomerName(customer).isSuccess()) {
? ? ? ? ? ? result.setMessage("客戶名稱重復");
? ? ? ? ? ? return result;
? ? ? ? }? ? ? ? if (customerMapper.insert(customer) > 0) {
? ? ? ? ? ? ShareGroup shareGroup = new ShareGroup();
? ? ? ? ? ? shareGroup.setResourceType(ResourceType.客戶);
? ? ? ? ? ? shareGroup.setResourceId(customer.getCustomerId());
? ? ? ? ? ? shareGroup.setUserId(customer.getCreateBy());? ? ? ? ? ? if (shareGroupService.insert(shareGroup).isSuccess()) {
? ? ? ? ? ? ? ? Activity activity = new Activity();
? ? ? ? ? ? ? ? activity.setResourceType(ResourceType.客戶);
? ? ? ? ? ? ? ? activity.setResourceId(customer.getCustomerId());
? ? ? ? ? ? ? ? activity.setActivityType(ActivityType.系統(tǒng)跟蹤);
? ? ? ? ? ? ? ? activity.setContent("創(chuàng)建了客戶");
? ? ? ? ? ? ? ? activity.setCreateDate(new Date());
? ? ? ? ? ? ? ? activity.setCreateBy(customer.getCreateBy());? ? ? ? ? ? ? ? if (activityService.insert(activity).isSuccess()) {
? ? ? ? ? ? ? ? ? ? result.setSuccess(true);
? ? ? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? ? ? result.setMessage("新增客戶失敗");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? result.setMessage("新增客戶失敗");
? ? ? ? ? ? }
? ? ? ? } else {
? ? ? ? ? ? result.setMessage("新增客戶失敗");
? ? ? ? }? ? ? ? return result;
? ? }? ? public Result checkCustomerName(Customer customer) {
? ? ? ? return new Result(!customerMapper.existCustomerName(customer));
? ? }? ? public Customer findById(Integer customerId) {
? ? ? ? return customerMapper.findById(customerId);
? ? }? ? @Transactional
? ? public Result update(Customer customer) {
? ? ? ? Result result = new Result();
? ? ? ? result.setSuccess(customerMapper.update(customer) > 0);
? ? ? ? return result;
? ? }? ? @Transactional
? ? public Result updateStar(Customer customer) {
? ? ? ? Result result = new Result();
? ? ? ? Customer model = findById(customer.getCustomerId());
? ? ? ? model.setStar(customer.getStar());
? ? ? ? result.setSuccess(customerMapper.update(model) > 0);
? ? ? ? return result;
? ? }? ? @Transactional
? ? public Result updateLocation(Customer customer) {
? ? ? ? Result result = new Result();
? ? ? ? Customer model = findById(customer.getCustomerId());
? ? ? ? model.setLng(customer.getLng());
? ? ? ? model.setLat(customer.getLat());
? ? ? ? result.setSuccess(customerMapper.update(model) > 0);
? ? ? ? return result;
? ? }}