IFrontDeptService.java 3.26 KB
package com.lhcredit.project.business.frontDept.service;

import com.lhcredit.framework.web.domain.Ztree;
import com.lhcredit.project.business.frontDept.domain.FrontDept;

import java.util.List;

/**
 * 公司部门 服务层
 *
 * @author lhcredit
 * @date 2024-05-08
 */
public interface IFrontDeptService {
    List<FrontDept> likeByName(String name);

    String getAllDeptNameForAdmin(Long id);


    String getParentDeptName(Long id);


    FrontDept getParentDept(Long id);

    /**
     * 查询公司部门信息
     *
     * @param id 公司部门ID
     * @return 公司部门信息
     */
    public FrontDept selectFrontDeptById(Long id);

    /**
     * 查询公司部门列表
     *
     * @param frontDept 公司部门信息
     * @return 公司部门集合
     */
    public List<FrontDept> selectFrontDeptList(FrontDept frontDept);

    /**
     * 字段转换
     * @param frontDept 公司部门信息
     * @return 公司部门信息
     */
    public FrontDept changeModel(FrontDept frontDept);

    /**
     * 列表转换
     *
     * @param frontDeptList 公司部门集合
     * @return 公司部门集合
     */
    public List<FrontDept> changeModel(List<FrontDept> frontDeptList);

    /**
     * 新增公司部门
     *
     * @param frontDept 公司部门信息
     * @return 结果
     */
    public int insertFrontDept(FrontDept frontDept);

    /**
     * 修改公司部门
     *
     * @param frontDept 公司部门信息
     * @return 结果
     */
    public int updateFrontDept(FrontDept frontDept);


    /**
     * g根据 父id 更新对应对公司全部部门的 biz_types(有效报告类型)
     * @param frontDept
     * @return
     */
    int updateFrontDeptByAncestors(FrontDept frontDept);

    /**
     * 删除部门管理信息
     *
     * @param id 部门ID
     * @return 结果
     */
    public int deleteFrontDeptById(Long id);

    /**
     * 删除公司部门信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteFrontDeptByIds(String ids);


    public void addSave(String headOffice,String entName,String branchOffices,String monitorBegin,String monitorEnd) throws Exception;

    public void addDept(Long parentId,String deptName,int sort);


    public void addCompay(FrontDept fd,Long parentId,String deptName,int sort);

    /**
     * 查询部门管理树
     *
     * @param frontDept 部门信息
     * @return 所有部门信息
     */
    public List<Ztree> selectDeptTree(FrontDept frontDept);

    List<FrontDept> findDeptTypeAll(String orgId);

    /**
     * 校验部门名称是否唯一
     *
     * @param frontDept 部门信息
     * @return 结果
     */
    public String checkDeptNameUnique(FrontDept frontDept);


    public List<Ztree> selectDeptTreeByOrgId(Long orgId);

    /**
     * 根据id 查询FrontDept
     * @param id
     * @return
     */
    FrontDept getFrontDeptById(Long id);

    /**
     * 根据 id 批量查询部门信息
     * @param ids
     * @return
     */
    List<FrontDept> getDeptListByIds(List<Long> ids);

    /**
     * 根据用户的orgid 查询对应的 org公司的父公司
     *
     * @param orgId
     * @return
     */
    FrontDept getParentOrgInfoByOrgId(Long orgId);

    FrontDept getFrontDeptByName(String orgName);
}