wlzboy
2025-11-11 9529220c815bfe6e43c992fde2f392be823450eb
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
@@ -132,4 +132,22 @@
     * @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);
}