wlzboy
6 天以前 09e6dc3fb7266620fafb5e341808a8eb36e080a1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
@@ -36,6 +36,7 @@
     */
    public SysDept selectDeptById(Long deptId);
    public List<SysDept> selectDeptListByParentId(Long parentId);
    /**
     * 根据ID查询所有子部门
     * 
@@ -115,4 +116,47 @@
     * @return 结果
     */
    public int deleteDeptById(Long deptId);
    /**
     * 根据departmentId查询部门
     *
     * @param departmentId SQL Server中的部门ID
     * @return 部门信息
     */
    public SysDept selectDeptByDepartmentId(@Param("departmentId") Integer departmentId);
    /**
     * 根据departmentId和父部门ID查询部门
     *
     * @param departmentId SQL Server中的部门ID
     * @param parentId 父部门ID
     * @return 部门信息
     */
    public SysDept selectDeptByDepartmentIdAndParentId(@Param("departmentId") Integer departmentId, @Param("parentId") Long parentId);
    /**
     * 获取指定部门ID的分公司ID(parent_id=100的部门)
     * 如果传入的就是分公司,直接返回;否则从ancestors中查找分公司ID
     *
     * @param deptId 部门ID
     * @return 分公司ID,如果找不到则返回null
     */
    public Long selectBranchCompanyIdByDeptId(@Param("deptId") Long deptId);
    /**
     * 根据编码列表查询分公司
     * 在service_order_class或dispatch_order_class中匹配
     *
     * @param orderCodes 编码列表
     * @return 分公司列表
     */
    public List<SysDept> selectBranchCompaniesByOrderCodes(@Param("orderCodes") List<String> orderCodes);
    /**
     * 根据service_class查询部门信息
     *
     * @param serviceClass 服务类别编码
     * @return 部门信息
     */
    public SysDept selectDeptByServiceClass(@Param("serviceClass") String serviceClass);
}