| | |
| | | } |
| | | |
| | | protected Dept getOriginDept(){ |
| | | Dept dept = deptService.getTop(); |
| | | Dept dept = deptService.getTop(getHostId()); |
| | | if (dept == null) { |
| | | throw new CoolException("部门数据错误"); |
| | | } |
| | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | 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); |
| | |
| | | ,{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} |