新增:CRM 商业智能,合同金额排行榜和回款金额排行榜

This commit is contained in:
anhaohao
2024-01-28 20:06:56 +08:00
parent 7bb171512a
commit 65d7f8c4ab
24 changed files with 797 additions and 0 deletions

View File

@ -50,4 +50,12 @@ public interface DeptApi {
return CollectionUtils.convertMap(list, DeptRespDTO::getId);
}
/**
* 获得指定部门的所有子部门
*
* @param id 部门编号
* @return 子部门列表
*/
List<DeptRespDTO> getChildDeptList(Long id);
}

View File

@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.service.dept.DeptService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
@ -19,6 +20,7 @@ import java.util.List;
public class DeptApiImpl implements DeptApi {
@Resource
@Lazy // 延迟加载,解决相互依赖的问题
private DeptService deptService;
@Override
@ -38,4 +40,11 @@ public class DeptApiImpl implements DeptApi {
deptService.validateDeptList(ids);
}
@Override
public List<DeptRespDTO> getChildDeptList(Long id) {
List<DeptDO> childDeptList = deptService.getChildDeptList(id);
return BeanUtils.toBean(childDeptList, DeptRespDTO.class);
}
}