|
|
|
package com.engine.organization.mapper.comp;
|
|
|
|
|
|
|
|
import com.engine.organization.entity.company.po.CompPO;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @description:
|
|
|
|
* @author:dxfeng
|
|
|
|
* @createTime: 2022/05/16
|
|
|
|
* @version: 1.0
|
|
|
|
*/
|
|
|
|
public interface CompMapper {
|
|
|
|
/**
|
|
|
|
* 列表查询
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> list(@Param("orderSql") String orderSql);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询所有被引用的ID
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<String> listUsedId();
|
|
|
|
|
|
|
|
List<String> listUsedIds();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据搜索条件查询数据
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> listByFilter(@Param("compPO") CompPO compPO, @Param("orderSql") String orderSql);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取顶级数据
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> listParent();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取子层级数据
|
|
|
|
*
|
|
|
|
* @param ids
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> listChild(@Param("ids") Collection ids);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取当前ID的子元素
|
|
|
|
*
|
|
|
|
* @param pid
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> listChildByPID(@Param("pid") String pid);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取当前ID的子元素个数
|
|
|
|
*
|
|
|
|
* @param pid
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
int countChildByPID(@Param("pid") long pid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据ID查询数据
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
CompPO listById(@Param("id") long id);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据No查询数据
|
|
|
|
*
|
|
|
|
* @param compNo
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> listByNo(@Param("compNo") String compNo);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 浏览按钮展示数据查询
|
|
|
|
*
|
|
|
|
* @param ids
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<Map<String, Object>> listCompsByIds(@Param("ids") Collection<Long> ids);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据ID批量查询数据
|
|
|
|
*
|
|
|
|
* @param ids
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
List<CompPO> getCompsByIds(@Param("ids") Collection<Long> ids);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 保存公司/分部基础信息
|
|
|
|
*
|
|
|
|
* @param compPO
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
int insertIgnoreNull(CompPO compPO);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 更新主表内容
|
|
|
|
*
|
|
|
|
* @param compPO
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
int updateBaseComp(CompPO compPO);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 更新禁用标记
|
|
|
|
*
|
|
|
|
* @param compPO
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
int updateForbiddenTagById(CompPO compPO);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 批量删除
|
|
|
|
*
|
|
|
|
* @param ids
|
|
|
|
*/
|
|
|
|
int deleteByIds(@Param("ids") Collection<Long> ids);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取最大排序
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
int getMaxShowOrder();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据名称和上级查找ID
|
|
|
|
*
|
|
|
|
* @param companyName
|
|
|
|
* @param parentCompany
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
Long getIdByNameAndPid(@Param("companyName") String companyName, @Param("parentCompany") Long parentCompany);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 统计顶层分部个数
|
|
|
|
*
|
|
|
|
* @param parentCompany
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
Integer countTopCompany(@Param("parentCompany") Long parentCompany);
|
|
|
|
|
|
|
|
}
|