2022-05-20 15:00:03 +08:00
|
|
|
package com.engine.organization.mapper.department;
|
|
|
|
|
|
|
|
|
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
2022-05-23 17:46:37 +08:00
|
|
|
import java.util.Collection;
|
2022-05-20 15:00:03 +08:00
|
|
|
import java.util.List;
|
2022-05-26 10:11:02 +08:00
|
|
|
import java.util.Map;
|
2022-05-20 15:00:03 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Author weaver_cl
|
2022-06-14 11:07:48 +08:00
|
|
|
* @description:
|
2022-05-20 15:00:03 +08:00
|
|
|
* @Date 2022/5/20
|
|
|
|
|
* @Version V1.0
|
|
|
|
|
**/
|
|
|
|
|
public interface DepartmentMapper {
|
2022-11-29 09:54:18 +08:00
|
|
|
List<DepartmentPO> getDeptListByPId(@Param("PId") Integer PId);
|
2022-05-27 18:05:15 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有数据
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2022-11-29 09:54:18 +08:00
|
|
|
List<DepartmentPO> listAll(@Param("orderSql") String orderSql);
|
2022-05-23 17:46:37 +08:00
|
|
|
|
|
|
|
|
/**
|
2022-05-27 18:05:15 +08:00
|
|
|
* 根据No查询数据
|
2022-05-23 17:46:37 +08:00
|
|
|
*
|
2022-11-29 09:54:18 +08:00
|
|
|
* @param departmentCode
|
2022-05-23 17:46:37 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2022-11-29 09:54:18 +08:00
|
|
|
List<DepartmentPO> listByNo(@Param("departmentCode") String departmentCode);
|
2022-05-23 17:46:37 +08:00
|
|
|
|
2022-05-27 18:05:15 +08:00
|
|
|
/**
|
|
|
|
|
* 根据搜索条件查询数据
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2022-06-23 18:49:47 +08:00
|
|
|
List<DepartmentPO> listByFilter(@Param("departmentPO") DepartmentPO departmentPO, @Param("orderSql") String orderSql);
|
2022-05-26 10:11:02 +08:00
|
|
|
|
2022-05-23 17:46:37 +08:00
|
|
|
/**
|
2022-05-27 18:05:15 +08:00
|
|
|
* 浏览按钮展示数据用
|
2022-05-23 17:46:37 +08:00
|
|
|
*
|
|
|
|
|
* @param ids
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2022-05-27 18:05:15 +08:00
|
|
|
List<Map<String, Object>> listDeptsByIds(@Param("ids") Collection<Long> ids);
|
2022-05-23 17:46:37 +08:00
|
|
|
|
2022-06-20 18:31:11 +08:00
|
|
|
List<DepartmentPO> getDeptsByIds(@Param("ids") Collection<Long> ids);
|
|
|
|
|
|
2022-05-27 18:05:15 +08:00
|
|
|
/**
|
|
|
|
|
* 根据ID查询数据
|
|
|
|
|
*
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2022-11-29 09:54:18 +08:00
|
|
|
DepartmentPO getDeptById(@Param("id") Integer id);
|
2022-07-13 17:19:45 +08:00
|
|
|
|
2022-05-27 18:05:15 +08:00
|
|
|
/**
|
|
|
|
|
* 根据ID查询名称
|
|
|
|
|
*
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2022-11-29 09:54:18 +08:00
|
|
|
String getDeptNameById(@Param("id") Integer id);
|
2022-06-01 16:35:28 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有被引用的ID
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
List<String> listUsedId();
|
2022-06-23 16:55:26 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取最大排序
|
2022-06-23 18:49:47 +08:00
|
|
|
*
|
2022-06-23 16:55:26 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2022-11-29 09:54:18 +08:00
|
|
|
Double getMaxShowOrder();
|
2022-07-01 14:02:03 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据名称、上级 查询部门元素
|
2022-07-13 17:19:45 +08:00
|
|
|
*
|
2022-07-01 14:02:03 +08:00
|
|
|
* @param departmentName
|
2022-11-29 09:54:18 +08:00
|
|
|
* @param subCompanyId1
|
|
|
|
|
* @param supDepId
|
2022-07-01 14:02:03 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2022-11-29 09:54:18 +08:00
|
|
|
Integer getIdByNameAndPid(@Param("departmentName") String departmentName, @Param("subCompanyId1") Integer subCompanyId1, @Param("supDepId") Integer supDepId);
|
2022-07-26 09:40:13 +08:00
|
|
|
|
2022-11-29 09:54:18 +08:00
|
|
|
int checkRepeatNo(@Param("departmentCode") String departmentCode, @Param("id") Long id);
|
2022-10-12 15:23:24 +08:00
|
|
|
|
|
|
|
|
List<String> hasSubs();
|
2022-10-14 14:56:35 +08:00
|
|
|
|
2022-11-29 09:54:18 +08:00
|
|
|
int countUsedInJob(@Param("supDepId") Long supDepId);
|
2022-11-28 11:15:54 +08:00
|
|
|
|
2022-12-06 17:11:48 +08:00
|
|
|
String getIdByDepartmentCode(@Param("departmentCode") String departmentCode);
|
|
|
|
|
|
2022-12-08 17:10:31 +08:00
|
|
|
String getDepartmentPrincipal(@Param("deptId") Integer deptId);
|
2022-12-08 14:16:58 +08:00
|
|
|
|
2022-05-20 15:00:03 +08:00
|
|
|
}
|