中扬CRM客户关系管理系统
#
luxiaotao1123
2022-09-16 3640ae3908b0ad75baee22ba588e5cce4319e216
#
4个文件已修改
19 ■■■■ 已修改文件
src/main/java/com/zy/crm/common/web/BaseController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/system/service/DeptService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/system/service/impl/DeptServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/dept/dept.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/common/web/BaseController.java
@@ -111,7 +111,7 @@
    }
    protected Dept getOriginDept(){
        Dept dept = deptService.getTop();
        Dept dept = deptService.getTop(getHostId());
        if (dept == null) {
            throw new CoolException("部门数据错误");
        }
src/main/java/com/zy/crm/system/service/DeptService.java
@@ -1,12 +1,11 @@
package com.zy.crm.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.zy.crm.manager.entity.Node;
import com.zy.crm.system.entity.Dept;
public interface DeptService extends IService<Dept> {
    Dept getTop();
    Dept getTop(Long hostId);
    int getMemberCount(Long deptId);
src/main/java/com/zy/crm/system/service/impl/DeptServiceImpl.java
@@ -3,13 +3,12 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.exception.CoolException;
import com.zy.crm.manager.entity.Node;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zy.crm.system.entity.Dept;
import com.zy.crm.system.mapper.DeptMapper;
import com.zy.crm.system.service.DeptService;
import com.zy.crm.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@@ -20,10 +19,11 @@
    private UserService userService;
    @Override
    public Dept getTop() {
    public Dept getTop(Long hostId) {
        Dept top = this.selectOne(new EntityWrapper<Dept>().eq("level", 0));
        if (top == null) {
            top = new Dept();
            top.setHostId(hostId);
            top.setName("全部");
            top.setUuid("全部");
            top.setLevel(0);
src/main/webapp/views/dept/dept.html
@@ -155,13 +155,13 @@
                ,{type: 'numbers'}
                ,{field: 'name', align: 'left',title: '名称', minWidth: 150}
                // ,{field: 'uuid', align: 'center',title: '编号'}
                ,{field: 'type$', align: 'center',title: '类型'}
                ,{field: 'leading', align: 'center',title: '负责人'}
                ,{field: 'email', align: 'center',title: '邮箱'}
                ,{field: 'phone', align: 'center',title: '联系电话'}
                ,{field: 'img', align: 'center',title: '图片', hide: true}
                // ,{field: 'brief', align: 'center',title: '简要描述'}
                // ,{field: 'count', align: 'center',title: '数量'}
                ,{field: 'sort', align: 'center',title: '排序'}
                ,{field: 'status$', align: 'center',title: '状态'}
                // ,{field: 'status$', align: 'center',title: '状态'}
                ,{field: 'updateTime$', align: 'center',title: '修改时间'}
                ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true}
                ,{field: 'memo', align: 'center',title: '备注', hide: true}